diff --git a/src/3rdparty/libcroco/cr-cascade.c b/src/3rdparty/libcroco/cr-cascade.c index 9f8dbdf8d667303827e67ba0b17b83419f8c27ee..6bea30d544500a97b5fb7c4ad32d4fc1d830e723 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]) diff --git a/src/3rdparty/libcroco/cr-stylesheet.h b/src/3rdparty/libcroco/cr-stylesheet.h index 7ebaf7a60d146ca3b302819cda08d0d200ead7be..53101e6d27eb74e297282fab7bb1df2aaa5a3f75 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, diff --git a/src/3rdparty/libuemf/uemf_print.c b/src/3rdparty/libuemf/uemf_print.c index 28fe0b7c33dee84e061b04d44945c4ba0d114692..81c715bb6c91f77c172288510496285d7dbaac66 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;