]> git.proxmox.com Git - mirror_frr.git/commitdiff
build: test program needs to be warning-free
authorMark Stapp <mjs@voltanet.io>
Fri, 19 Feb 2021 16:09:52 +0000 (11:09 -0500)
committerMark Stapp <mjs@voltanet.io>
Mon, 22 Mar 2021 12:41:14 +0000 (08:41 -0400)
One of the configure-time test programs produces a warning with
gcc 9 (at least), so it fails if -Werror is enabled. Fix that.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
m4/ax_pthread.m4

index d383ad5c6d6a5061370800bb1dc89b7a334c0638..b7872d9870a5472e2c757f3639dd3204fc763151 100644 (file)
@@ -219,7 +219,7 @@ for flag in $ax_pthread_flags; do
         # functions on Solaris that doesn't have a non-functional libc stub.
         # We try pthread_create on general principles.
         AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
-                        static void routine(void *a) { a = 0; }
+                        static void routine(void *a) { if (a) a = 0; }
                         static void *start_routine(void *a) { return a; }],
                        [pthread_t th; pthread_attr_t attr;
                         pthread_create(&th, 0, start_routine, 0);