From d67561124622885e41d3c7693e6c24486dd1f71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 May 2008 16:59:48 +0200 Subject: Announce check for -Werror (and equivalent) flags and its result. --HG-- extra : transplant_source : %F0n%9C%FB%F9%B3%1E%A5P%D6%20%01%EF%83k8%7D%8A%D4%5B --- m4/attributes.m4 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 2b7175b1c..81e6586ce 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])]) ]) ]) -- cgit v1.2.3 From 92b68b45e3da1ca58cd1f3bbfe6849924a31a401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 May 2008 23:31:43 +0200 Subject: Copy all of the supported types not just 1/4 of it (4 being the size of uint32_t). --- src/xine-engine/load_plugins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index d08837dc5..80cfde12c 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -372,7 +372,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; -- cgit v1.2.3