public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] iconvdata: Suppress clang warning on locale definitions Date: Tue, 2 Apr 2024 15:52:10 +0000 (GMT) [thread overview] Message-ID: <20240402155210.55AE2385801D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=438349d2aed5e6832664032f3c1da83471e9334d commit 438349d2aed5e6832664032f3c1da83471e9334d Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Thu Mar 10 10:01:09 2022 -0300 iconvdata: Suppress clang warning on locale definitions clang issues an warning adding '{unsigned} int' to a string does not append to the string, however it is exactly what code means here. Diff: --- iconvdata/gbk.c | 5 +++++ iconvdata/iso-2022-cn-ext.c | 5 +++++ iconvdata/iso-2022-cn.c | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/iconvdata/gbk.c b/iconvdata/gbk.c index d1365ca188..59bfda1b24 100644 --- a/iconvdata/gbk.c +++ b/iconvdata/gbk.c @@ -13212,6 +13212,10 @@ static const char __gbk_from_ucs4_tab12[][2] = } #include <iconv/loop.c> +/* clang issues an warning adding 'unsigned int' to a string does not append + to the string, however it is exactly what code means here. */ +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wstring-plus-int"); /* Next, define the other direction. */ #define MIN_NEEDED_INPUT MIN_NEEDED_TO @@ -13493,6 +13497,7 @@ static const char __gbk_from_ucs4_tab12[][2] = #define LOOP_NEED_FLAGS #include <iconv/loop.c> +DIAG_POP_NEEDS_COMMENT_CLANG; /* Now define the toplevel functions. */ #include <iconv/skeleton.c> diff --git a/iconvdata/iso-2022-cn-ext.c b/iconvdata/iso-2022-cn-ext.c index 0be9278740..942a5e0542 100644 --- a/iconvdata/iso-2022-cn-ext.c +++ b/iconvdata/iso-2022-cn-ext.c @@ -387,6 +387,10 @@ enum #define LOOP_NEED_FLAGS #include <iconv/loop.c> +/* clang issues an warning adding 'int' to a string does not append + to the string, however it is exactly what code means here. */ +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wstring-plus-int"); /* Next, define the other direction. */ #define MIN_NEEDED_INPUT TO_LOOP_MIN_NEEDED_FROM @@ -669,6 +673,7 @@ DIAG_POP_NEEDS_COMMENT; #define LOOP_NEED_FLAGS #include <iconv/loop.c> +DIAG_POP_NEEDS_COMMENT_CLANG; /* Now define the toplevel functions. */ #include <iconv/skeleton.c> diff --git a/iconvdata/iso-2022-cn.c b/iconvdata/iso-2022-cn.c index 0990595e96..2f0fb5987d 100644 --- a/iconvdata/iso-2022-cn.c +++ b/iconvdata/iso-2022-cn.c @@ -227,6 +227,10 @@ enum #define UPDATE_PARAMS *setp = set | ann #include <iconv/loop.c> +/* clang issues an warning adding 'int' to a string does not append + to the string, however it is exactly what code means here. */ +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wstring-plus-int"); /* Next, define the other direction. */ #define MIN_NEEDED_INPUT TO_LOOP_MIN_NEEDED_FROM @@ -401,6 +405,7 @@ enum #define UPDATE_PARAMS *setp = set | ann #include <iconv/loop.c> +DIAG_POP_NEEDS_COMMENT_CLANG; /* Now define the toplevel functions. */ #include <iconv/skeleton.c>
next reply other threads:[~2024-04-02 15:52 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-02 15:52 Adhemerval Zanella [this message] -- strict thread matches above, loose matches on Subject: below -- 2024-04-17 20:06 Adhemerval Zanella 2024-02-09 17:30 Adhemerval Zanella 2024-02-07 14:05 Adhemerval Zanella 2024-01-29 17:55 Adhemerval Zanella 2023-12-21 18:52 Adhemerval Zanella 2023-09-28 17:50 Adhemerval Zanella 2023-08-30 12:35 Adhemerval Zanella 2023-02-09 19:47 Adhemerval Zanella 2022-10-28 17:40 Adhemerval Zanella 2022-10-04 12:58 Adhemerval Zanella
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240402155210.55AE2385801D@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).