mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-27 12:15:39 +03:00
malloc: Fix Os build on some ABIs
I have not checked with all versions for all ABIs, but I saw failures with gcc-14 on arm, alpha, hppa, i686, sparc, sh4, and microblaze. Reviewed-by: Collin Funk <collin.funk1@gmail.com>
This commit is contained in:
@@ -3305,10 +3305,16 @@ tcache_get_align (size_t nb, size_t alignment)
|
|||||||
mangled = true;
|
mangled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* GCC compiling for -Os warns on some architectures that csize may be
|
||||||
|
uninitialized. However, if 'te' is not NULL, csize is always
|
||||||
|
initialized in the loop above. */
|
||||||
|
DIAG_PUSH_NEEDS_COMMENT;
|
||||||
|
DIAG_IGNORE_Os_NEEDS_COMMENT (12, "-Wmaybe-uninitialized");
|
||||||
if (te != NULL
|
if (te != NULL
|
||||||
&& csize == nb
|
&& csize == nb
|
||||||
&& PTR_IS_ALIGNED (te, alignment))
|
&& PTR_IS_ALIGNED (te, alignment))
|
||||||
return tag_new_usable (tcache_get_n (tc_idx, tep, mangled));
|
return tag_new_usable (tcache_get_n (tc_idx, tep, mangled));
|
||||||
|
DIAG_POP_NEEDS_COMMENT;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user