about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-10 10:01:09 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:10 -0300
commitac0163c99145ac978fff453bb58b46856356c339 (patch)
tree80cc481bf06c5a9b21ac852934bfef82f0c9761a
parent0c8480a2698e20996b5f0dc89bae9058a1f9ea87 (diff)
downloadglibc-ac0163c99145ac978fff453bb58b46856356c339.tar.gz
glibc-ac0163c99145ac978fff453bb58b46856356c339.tar.xz
glibc-ac0163c99145ac978fff453bb58b46856356c339.zip
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.
-rw-r--r--iconvdata/gbk.c5
-rw-r--r--iconvdata/iso-2022-cn-ext.c5
-rw-r--r--iconvdata/iso-2022-cn.c5
3 files changed, 15 insertions, 0 deletions
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 e1d892dc1c..6a90731e4c 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
@@ -681,6 +685,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>