summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-23 10:46:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-23 14:16:07 +0100
commitd733a88e61631094bece5d1490ecf8f71877536c (patch)
treeb7b4e47b2b4afb79c6b4ca20a7cd6858c973f03b /hwpfilter
parent0bf59c89ce739892ed55854acdf6e9dde2681cd1 (diff)
coverity#707899 Uninitialized scalar field
Change-Id: I49c6e56412e10155ddb2b8f4b492a3420e1b6718
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hinfo.cxx3
-rw-r--r--hwpfilter/source/hinfo.h20
2 files changed, 18 insertions, 5 deletions
diff --git a/hwpfilter/source/hinfo.cxx b/hwpfilter/source/hinfo.cxx
index 98f66a5028b1..38d3b22fe659 100644
--- a/hwpfilter/source/hinfo.cxx
+++ b/hwpfilter/source/hinfo.cxx
@@ -66,8 +66,7 @@ HWPInfo::HWPInfo()
HWPInfo::~HWPInfo(void)
{
- if (info_block)
- delete[]info_block;
+ delete[] info_block;
info_block = 0;
}
diff --git a/hwpfilter/source/hinfo.h b/hwpfilter/source/hinfo.h
index d3591b5ec68d..00bc6046c9b4 100644
--- a/hwpfilter/source/hinfo.h
+++ b/hwpfilter/source/hinfo.h
@@ -33,7 +33,7 @@ class CHTMLOut;
/**
* Information of page (phisical)
*/
-typedef struct
+struct PaperInfo
{
unsigned char paper_kind;
unsigned char paper_direction;
@@ -46,7 +46,21 @@ typedef struct
hunit header_length;
hunit footer_length;
hunit gutter_length;
-} PaperInfo;
+ PaperInfo()
+ : paper_kind(0)
+ , paper_direction(0)
+ , paper_height(0)
+ , paper_width(0)
+ , top_margin(0)
+ , bottom_margin(0)
+ , left_margin(0)
+ , right_margin(0)
+ , header_length(0)
+ , footer_length(0)
+ , gutter_length(0)
+ {
+ }
+};
/* ?????? ??????, ???????? ???? */
struct PaperBackInfo
@@ -146,7 +160,7 @@ class DLLEXPORT HWPInfo
*/
PaperInfo paper;
- PaperBackInfo back_info;
+ PaperBackInfo back_info;
/**
* Sets the attribute of read-only or read/write.
*/