diff options
-rw-r--r-- | m4/attributes.m4 | 8 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/m4/attributes.m4 b/m4/attributes.m4 index ed15b6670..fa379a2fe 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -71,9 +71,11 @@ dnl Other compilers don't support -Werror per se, but they support dnl an equivalent flag: dnl - Sun Studio compiler supports -errwarn=%all AC_DEFUN([CC_CHECK_WERROR], [ - AC_CACHE_VAL([cc_cv_werror], - [CC_CHECK_CFLAGS([-Werror], [cc_cv_werror=-Werror], - [CC_CHECK_CFLAGS([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) + AC_CACHE_CHECK( + [for $CC way to treat warnings as errors], + [cc_cv_werror], + [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror], + [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) ]) ]) diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index a4047af4f..13f9b94c7 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -371,7 +371,7 @@ static void _insert_node (xine_t *this, size_t supported_types_size; for (supported_types_size=0; decoder_old->supported_types[supported_types_size] != 0; ++supported_types_size); types = calloc((supported_types_size+1), sizeof(uint32_t)); - memcpy(types, decoder_old->supported_types, supported_types_size); + memcpy(types, decoder_old->supported_types, supported_types_size*sizeof(uint32_t)); decoder_new->supported_types = types; } entry->priority = decoder_new->priority = decoder_old->priority; |