Browse code

elminating warnings that crop up when using --with-libjson

Micah Snyder authored on 2017/08/29 06:49:17
Showing 3 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * HWP Stuff
3 3
  * 
4
- * Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
4
+ * Copyright (C) 2015, 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
5 5
  * 
6 6
  * Authors: Kevin Lin
7 7
  * 
... ...
@@ -316,7 +316,7 @@ int cli_hwp5header(cli_ctx *ctx, hwp5_header_t *hwp5)
316 316
         }
317 317
 
318 318
         /* magic */
319
-        cli_jsonstr(header, "Magic", hwp5->signature);
319
+        cli_jsonstr(header, "Magic", (char*)hwp5->signature);
320 320
 
321 321
         /* version */
322 322
         cli_jsonint(header, "RawVersion", hwp5->version);
... ...
@@ -569,7 +569,7 @@ static inline int parsehwp3_docinfo(cli_ctx *ctx, off_t offset, struct hwp3_doci
569 569
         }
570 570
 
571 571
         /* Printed File Name */
572
-        str = convert_hstr_to_utf8(hwp3_ptr+DI_PNAME, 40, "HWP3.x", &iret);
572
+        str = convert_hstr_to_utf8((char*)(hwp3_ptr+DI_PNAME), 40, "HWP3.x", &iret);
573 573
         if (!str || (iret == CL_EMEM))
574 574
             return CL_EMEM;
575 575
 
... ...
@@ -581,7 +581,7 @@ static inline int parsehwp3_docinfo(cli_ctx *ctx, off_t offset, struct hwp3_doci
581 581
         free(str);
582 582
 
583 583
         /* Annotation */
584
-        str = convert_hstr_to_utf8(hwp3_ptr+DI_ANNOTE, 24, "HWP3.x", &iret);
584
+        str = convert_hstr_to_utf8((char*)(hwp3_ptr+DI_ANNOTE), 24, "HWP3.x", &iret);
585 585
         if (!str || (iret == CL_EMEM))
586 586
             return CL_EMEM;
587 587
 
... ...
@@ -620,7 +620,7 @@ static inline int parsehwp3_docsummary(cli_ctx *ctx, off_t offset)
620 620
     }
621 621
 
622 622
     for (i = 0; i < NUM_DOCSUMMARY_FIELDS; i++) {
623
-        str = convert_hstr_to_utf8(hwp3_ptr+hwp3_docsummary_fields[i].offset, 112, "HWP3.x", &iret);
623
+        str = convert_hstr_to_utf8((char*)(hwp3_ptr + hwp3_docsummary_fields[i].offset), 112, "HWP3.x", &iret);
624 624
         if (!str || (iret == CL_EMEM))
625 625
             return CL_EMEM;
626 626
 
... ...
@@ -1843,10 +1843,10 @@ int cli_scanhwp3(cli_ctx *ctx)
1843 1843
 
1844 1844
 #if HAVE_JSON
1845 1845
     /*
1846
-    /* magic *
1846
+    // magic 
1847 1847
     cli_jsonstr(header, "Magic", hwp5->signature);
1848 1848
 
1849
-    /* version *
1849
+    // version
1850 1850
     cli_jsonint(header, "RawVersion", hwp5->version);
1851 1851
     */
1852 1852
 #endif
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  *  Extract component parts of OLE2 files (e.g. MS Office Documents)
3 3
  *
4
- *  Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
4
+ *  Copyright (C) 2015, 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
5 5
  *  Copyright (C) 2007-2008 Sourcefire, Inc.
6 6
  *
7 7
  *  Authors: Kevin Lin
... ...
@@ -170,7 +170,7 @@ typedef struct summary_ctx {
170 170
 
171 171
 /* string conversion */
172 172
 struct codepage_entry {
173
-    int16_t codepage;
173
+    uint16_t codepage;
174 174
     const char *encoding;
175 175
 };
176 176
 
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Extract component parts of various MS XML files (e.g. MS Office 2003 XML Documents)
3 3
  *
4
- * Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
4
+ * Copyright (C) 2015, 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
5 5
  * Copyright (C) 2007-2013 Sourcefire, Inc.
6 6
  *
7 7
  * Authors: Kevin Lin
... ...
@@ -308,7 +308,7 @@ static int msxml_parse_element(struct msxml_ctx *mxctx, xmlTextReaderPtr reader,
308 308
                         value = xmlTextReaderConstValue(reader);
309 309
 
310 310
                         cli_msxmlmsg("\t%s: %s\n", name, value);
311
-                        cli_jsonstr(attributes, name, (const char *)value);
311
+                        cli_jsonstr(attributes, (char*)name, (const char *)value);
312 312
                     }
313 313
                 }
314 314
                 else if (state == -1)