]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/glibc/glibc-2.25-gcc-7.patch
gcc: fix gmp download
[ipfire-2.x.git] / src / patches / glibc / glibc-2.25-gcc-7.patch
1 diff --git a/malloc/hooks.c b/malloc/hooks.c
2 index 4398c0a017..2c6cebc889 100644
3 --- a/malloc/hooks.c
4 +++ b/malloc/hooks.c
5 @@ -347,11 +347,18 @@ realloc_check (void *oldmem, size_t bytes, const void *caller)
6 newmem = _int_realloc (&main_arena, oldp, oldsize, nb);
7 }
8
9 + DIAG_PUSH_NEEDS_COMMENT;
10 +#if __GNUC_PREREQ (7, 0)
11 + /* GCC 7 warns about magic_p may be used uninitialized. But we never
12 + reach here if magic_p is uninitialized. */
13 + DIAG_IGNORE_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
14 +#endif
15 /* mem2chunk_check changed the magic byte in the old chunk.
16 If newmem is NULL, then the old chunk will still be used though,
17 so we need to invert that change here. */
18 if (newmem == NULL)
19 *magic_p ^= 0xFF;
20 + DIAG_POP_NEEDS_COMMENT;
21
22 __libc_lock_unlock (main_arena.mutex);
23