On 2015-07-15 16:03, Nicolas Morey-Chaisemartin wrote:
> When adding both Wextra and Werror to CPPFLAGS, configure fails due to
> a warning during the pthread configuration phase:
>
> | #include <pthread.h>
> | static void routine(void *a) { a = 0; }
> | static void *start_routine(void *a) { return a; }
> | int
> | main ()
> | {
> | pthread_t th; pthread_attr_t attr;
> | pthread_create(&th, 0, start_routine, 0);
> | pthread_join(th, 0);
> | pthread_attr_init(&attr);
> | pthread_cleanup_push(routine, 0);
> | pthread_cleanup_pop(0) /* ; */
> | ;
> | return 0;
> | }
> configure:19696: result: no
> configure:19594: checking whether pthreads work without any flags
> configure:19687: gcc -o conftest -g -O2 -Wall -Werror -Wextra conftest.c
> >&5
> conftest.c: In function 'routine':
> conftest.c:64:51: error: parameter 'a' set but not used
> [-Werror=unused-but-set-parameter]
> static void routine(void *a) { a = 0; }
>
> Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]>
Reviewed-by: Anders Roxell <[email protected]>
Cheers,
Anders
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp