bug-gnulib
[Top][All Lists]
Advanced

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

Re: Compiler warning in file-has-acl.c


From: Bruno Haible
Subject: Re: Compiler warning in file-has-acl.c
Date: Thu, 25 May 2023 22:17:22 +0200

Hi,

Sven Joachim wrote:
> I get this error building coreutils from git (make V=1):
> 
> ,----
> | gcc  -I. -I./lib  -Ilib -I./lib -Isrc -I./src  -Werror -Wall 
> -Warith-conversion -Wbad-function-cast -Wcast-align=strict -Wdate-time 
> -Wdisabled-optimization -Wduplicated-cond -Wextra -Wformat-signedness 
> -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-declarations 
> -Wmissing-include-dirs -Wnull-dereference -Wopenmp-simd -Woverlength-strings 
> -Wpacked -Wpointer-arith -Wshadow -Wstrict-prototypes 
> -Wsuggest-attribute=cold -Wsuggest-attribute=const -Wsuggest-attribute=format 
> -Wsuggest-attribute=malloc -Wsuggest-attribute=noreturn 
> -Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types 
> -Wsync-nand -Wtrampolines -Wunknown-pragmas -Wvariadic-macros -Wvla 
> -Wwrite-strings -Warray-bounds=2 -Wattribute-alias=2 -Wbidi-chars=any,ucn 
> -Wformat=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2 -Wuse-after-free=3 
> -Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-sign-compare 
> -Wno-unused-parameter -Wno-format-nonliteral -fdiagnostics-show-option 
> -funit-at-a-time -Wno-return-local-addr -Wno-stringop-overflow -Wno-cast-qual 
> -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef 
> -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion 
> -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits 
> -Wno-unsuffixed-float-constants -g -O2 -MT lib/libcoreutils_a-file-has-acl.o 
> -MD -MP -MF lib/.deps/libcoreutils_a-file-has-acl.Tpo -c -o 
> lib/libcoreutils_a-file-has-acl.o `test -f 'lib/file-has-acl.c' || echo 
> './'`lib/file-has-acl.c
> | lib/file-has-acl.c: In function 'have_xattr':
> | lib/file-has-acl.c:54:1: error: function might be candidate for attribute 
> 'pure' if it is known to return normally [-Werror=suggest-attribute=pure]
> |    54 | have_xattr (char const *attr, char const *listbuf, ssize_t listsize)
> |       | ^~~~~~~~~~
> | cc1: all warnings being treated as errors
> | make[2]: *** [Makefile:13267: lib/libcoreutils_a-file-has-acl.o] Error 1
> `----

A GCC bug has been registered for this:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914

Thanks for the report.

Bruno






reply via email to

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