bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test-verify.c: avoid -Wmissing-declarations warnings


From: Bernhard Voelker
Subject: test-verify.c: avoid -Wmissing-declarations warnings
Date: Fri, 30 Oct 2020 02:51:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

I noticed a new build failure in coreutils when configuring with 
--enable-gcc-warnings.
GCC is 10.2.1.
Fixed with the attached. Tested with the following. Fails before, succeeds 
after:

CFLAGS='-Werror -Wmissing-declarations' ./gnulib-tool --create-testdir --test 
--dir /tmp/x --with-tests verify

Symptoms:
...
gcc -DHAVE_CONFIG_H -I. -I../../gltests  -DGNULIB_STRICT_CHECKING=1 -I. 
-I../../gltests -I.. -I../../gltests/.. -I../gllib \
  -I../../gltests/../gllib   -Werror -Wmissing-declarations -MT test-verify.o 
-MD -MP -MF .deps/test-verify.Tpo -c \
  -o test-verify.o ../../gltests/test-verify.c
../../gltests/test-verify.c:84:1: error: no previous declaration for 
‘test_assume_expressions’ [-Werror=missing-declarations]
   84 | test_assume_expressions (state *s)
      | ^~~~~~~~~~~~~~~~~~~~~~~
../../gltests/test-verify.c:94:1: error: no previous declaration for 
‘test_assume_optimization’ [-Werror=missing-declarations]
   94 | test_assume_optimization (int x)
      | ^~~~~~~~~~~~~~~~~~~~~~~~
../../gltests/test-verify.c:106:1: error: no previous declaration for 
‘test_assume_noreturn’ [-Werror=missing-declarations]
  106 | test_assume_noreturn (void)
      | ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Have a nice day,
Berny

Attachment: 0001-test-verify.c-avoid-Wmissing-declarations-warnings.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]