[PATCH] malloc: Remove bin scanning from memalign (bug 30723)
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue Aug 15 11:58:16 GMT 2023
On 14/08/23 06:16, Florian Weimer wrote:
> * Andreas Schwab:
>
>> malloc.c: In function '_int_free':
>> malloc.c:4496:13: error: unused variable 'fwd' [-Werror=unused-variable]
>> 4496 | mchunkptr fwd; /* misc temp for linking */
>> | ^~~
>> malloc.c:4495:13: error: unused variable 'bck' [-Werror=unused-variable]
>> 4495 | mchunkptr bck; /* misc temp for linking */
>> | ^~~
>> malloc.c:4494:19: error: unused variable 'prevsize' [-Werror=unused-variable]
>> 4494 | INTERNAL_SIZE_T prevsize; /* size of previous contiguous chunk */
>> | ^~~~~~~~
>> malloc.c:4493:7: error: unused variable 'nextinuse' [-Werror=unused-variable]
>> 4493 | int nextinuse; /* true if nextchunk is used */
>> | ^~~~~~~~~
>> malloc.c:4492:19: error: unused variable 'nextsize' [-Werror=unused-variable]
>> 4492 | INTERNAL_SIZE_T nextsize; /* its size */
>> | ^~~~~~~~
>> malloc.c:4491:13: error: unused variable 'nextchunk' [-Werror=unused-variable]
>> 4491 | mchunkptr nextchunk; /* next contiguous chunk */
>> | ^~~~~~~~~
>> cc1: all warnings being treated as errors
>> make[2]: *** [../o-iterator.mk:9: /home/abuild/rpmbuild/BUILD/glibc-2.38.9000.31.g084fb31bc2/cc-base/malloc/malloc.o] Error 1
>
> Found it, I believe I'm not seeing this because of:
>
> commit 78ceef25d64efeeb6067d1cb282a00466e637e2a
> Author: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
> Date: Mon Jul 24 14:22:27 2023 -0300
>
> configure: Remove --enable-all-warnings option
>
> The option is not activelly tested and has bitrotten, to fix it
> would require a lot of work and multiple fixes. A better option
> would to evaluate each option and enable the warning if it makes
> sense.
> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
>
> diff --git a/Makeconfig b/Makeconfig
> index 77d7fd14df..c4dd9ea8f2 100644
> --- a/Makeconfig
> +++ b/Makeconfig
> @@ -857,12 +857,7 @@ host-test-program-cmd = $(host-built-program-cmd)
> endif
>
> # Extra flags to pass to GCC.
> -ifeq ($(all-warnings),yes)
> -+gccwarn := -Wall -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wmissing-noreturn -Wmissing-prototypes -Wmissing-declarations -Wcomment -Wcomments -Wtrigraphs -Wsign-compare -Wfloat-equal -Wmultichar
> -else
> -+gccwarn := -Wall -Wwrite-strings
> -endif
> -+gccwarn += -Wundef
> +gccwarn := -Wall -Wwrite-strings -Wundef
> ifeq ($(enable-werror),yes)
> +gccwarn += -Werror
> endif
>
> It dropped -Wall from glibc's default CFLAGS due to a typo (gccwarn
> instead of +gccwarn).
>
> Will test a fix with build-many-glibcs.py.
Oops, sorry about that and thanks for fixing this up.
More information about the Libc-alpha
mailing list