Projects
home:lf14:branches:Mega:23.09
glibc
_service:tar_scm:backport-clang-0044-malloc-Sup...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-clang-0044-malloc-Suppress-clang-warning-on-tst-aligned-alloc.patch of Package glibc
From cb40ee75995a53b234b3e5c613d4f8a6db002e0b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Thu, 27 Jul 2023 15:55:42 -0300 Subject: [PATCH] malloc: Suppress clang warning on tst-aligned-alloc --- malloc/tst-aligned-alloc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/malloc/tst-aligned-alloc.c b/malloc/tst-aligned-alloc.c index 8bd6527147..23616dfa5b 100644 --- a/malloc/tst-aligned-alloc.c +++ b/malloc/tst-aligned-alloc.c @@ -55,18 +55,31 @@ do_test (void) if (p2 == NULL) FAIL_EXIT1 ("aligned_alloc(1, 64) failed"); + /* clang warns that alignment is not a power of 2, which is what the + test means to do. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment"); p3 = aligned_alloc (65, 64); + DIAG_POP_NEEDS_COMMENT_CLANG; if (p3 != NULL) FAIL_EXIT1 ("aligned_alloc(65, 64) did not fail"); + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wnon-power-of-two-alignment"); p4 = aligned_alloc (0, 64); + DIAG_POP_NEEDS_COMMENT_CLANG; if (p4 != NULL) FAIL_EXIT1 ("aligned_alloc(0, 64) did not fail"); + /* clang warns that alignment must be 4294967296 or smaller, which is + what the test means to do. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (18.0, "-Wbuiltin-assume-aligned-alignment"); /* This is an alignment like 0x80000000...UL */ p5 = aligned_alloc (SIZE_MAX / 2 + 1, 64); + DIAG_POP_NEEDS_COMMENT_CLANG; if (p5 != NULL) FAIL_EXIT1 ("aligned_alloc(SIZE_MAX/2+1, 64) did not fail"); -- 2.39.3
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2