From adf2c161f0bf46d9dbfd6ef649371e0f00dfcc52 Mon Sep 17 00:00:00 2001 From: Kishore Debnath Date: Sat, 19 Jan 2019 21:03:31 -0500 Subject: [PATCH 1/3] Supressing warning: '~/src/3rdparty/libuemf/uemf_print.c:47:25' by explicitly performing const unsigned char * typecasting --- src/3rdparty/libuemf/uemf_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/libuemf/uemf_print.c b/src/3rdparty/libuemf/uemf_print.c index 28fe0b7c33..81c715bb6c 100644 --- a/src/3rdparty/libuemf/uemf_print.c +++ b/src/3rdparty/libuemf/uemf_print.c @@ -44,7 +44,7 @@ Code based on example crc32b here: http://www.hackersdelight.org/hdcodetxt/crc.c.txt */ uint32_t lu_crc32(const char *record, uint32_t Size){ - const unsigned char *message = record; + const unsigned char *message = (const unsigned char*) record; uint32_t i, j; uint32_t crc, mask; -- GitLab From 2178e22d7197b1628f2d270110d1968bda7248ff Mon Sep 17 00:00:00 2001 From: Kishore Debnath Date: Sat, 19 Jan 2019 21:20:42 -0500 Subject: [PATCH 2/3] Supressing warning: '~/src/3rdparty/libcroco/cr-cascade.c:200:47' by removing checks on address to contents of address. And also removing hard-coded array size with NB_ORIGINS. --- src/3rdparty/libcroco/cr-cascade.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/libcroco/cr-cascade.c b/src/3rdparty/libcroco/cr-cascade.c index 9f8dbdf8d6..6bea30d544 100644 --- a/src/3rdparty/libcroco/cr-cascade.c +++ b/src/3rdparty/libcroco/cr-cascade.c @@ -39,7 +39,7 @@ struct _CRCascadePriv { *sheets[ORIGIN_AUTHOR] or sheets[ORIGIN_USER] *of sheets[ORIGIN_UA] ; */ - CRStyleSheet *sheets[3]; + CRStyleSheet *sheets[NB_ORIGINS]; guint ref_count; }; @@ -197,7 +197,7 @@ cr_cascade_destroy (CRCascade * a_this) if (PRIVATE (a_this)) { gulong i = 0; - for (i = 0; PRIVATE (a_this)->sheets && i < NB_ORIGINS; i++) { + for (i = 0; (i < NB_ORIGINS) && (PRIVATE (a_this)->sheets[i] != NULL); i++) { if (PRIVATE (a_this)->sheets[i]) { if (cr_stylesheet_unref (PRIVATE (a_this)->sheets[i]) -- GitLab From ee992734db2527a0827e76cf97df2a2fc80c8850 Mon Sep 17 00:00:00 2001 From: Kishore Debnath Date: Sat, 19 Jan 2019 21:30:04 -0500 Subject: [PATCH 3/3] Fixing a typo: ORIGIN_END to NB_ORIGIN. ORIGIN_END makes no sense here or could be a previous field name of enum now renamed, which was forgot to get renamed in the comment section. --- src/3rdparty/libcroco/cr-stylesheet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/libcroco/cr-stylesheet.h b/src/3rdparty/libcroco/cr-stylesheet.h index 7ebaf7a60d..53101e6d27 100644 --- a/src/3rdparty/libcroco/cr-stylesheet.h +++ b/src/3rdparty/libcroco/cr-stylesheet.h @@ -40,7 +40,7 @@ enum CRStyleOrigin /*Please don't change the order of *the values enumerated here ... *New values should be added at the end, - *just before ORIGIN_END. + *just before NB_ORIGIN. */ ORIGIN_UA = 0, ORIGIN_USER, -- GitLab