public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-06-09 21:22 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:22 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5bee2ff5f8d1fb8d666b5bdfd8cfcbe26333696a

commit 5bee2ff5f8d1fb8d666b5bdfd8cfcbe26333696a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2024-04-02 15:55 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:55 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bd298bf72437d410b161853a83b59db268791ef5

commit bd298bf72437d410b161853a83b59db268791ef5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2024-02-09 17:34 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:34 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=23e837f5ba8b87f8b5e42917431c97afd701b900

commit 23e837f5ba8b87f8b5e42917431c97afd701b900
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2024-02-07 14:09 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:09 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=284b759477fe408a8b0a8cb57b6b6b2597efcceb

commit 284b759477fe408a8b0a8cb57b6b6b2597efcceb
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2024-01-29 17:59 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:59 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=767adde3c31910885f7b8ced9b6c859645eb40c6

commit 767adde3c31910885f7b8ced9b6c859645eb40c6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2023-12-21 18:56 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:56 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0c83d94c5181cae54175543baee3401cb355fe06

commit 0c83d94c5181cae54175543baee3401cb355fe06
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2023-09-28 17:54 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:54 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6d41bd98ff681e3b051b79626d1a9b86ac1fe46e

commit 6d41bd98ff681e3b051b79626d1a9b86ac1fe46e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2023-08-30 12:38 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:38 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7b464b34dfb10a1b1c13a49e37b8fc7dcec50668

commit 7b464b34dfb10a1b1c13a49e37b8fc7dcec50668
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2023-02-09 19:50 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:50 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d19b8414196b67c5dd7c0457ae442f292e294adf

commit d19b8414196b67c5dd7c0457ae442f292e294adf
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-10-28 17:43 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:43 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=848bfb238b6776677110c4b445d1d59695113333

commit 848bfb238b6776677110c4b445d1d59695113333
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 60aa62a26f..6f3ddfa1e0 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -86,6 +93,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -126,6 +136,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -142,6 +153,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -182,6 +196,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-10-04 13:01 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 13:01 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=466b53dc0e683bdc3216c3f4520ad459f0175f4f

commit 466b53dc0e683bdc3216c3f4520ad459f0175f4f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-06-09 13:19 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:19 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5bee2ff5f8d1fb8d666b5bdfd8cfcbe26333696a

commit 5bee2ff5f8d1fb8d666b5bdfd8cfcbe26333696a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-06-03 14:08 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:08 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b695975feb0f924f4a2e361e414e5936cb05e1a7

commit b695975feb0f924f4a2e361e414e5936cb05e1a7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-05-13 14:22 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:22 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=27047afdcb4ffe32358f3abb25282c8bf9e8b15e

commit 27047afdcb4ffe32358f3abb25282c8bf9e8b15e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-05-12 19:35 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:35 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4652500a1b49f905b29f4927795c80be3a7bf48e

commit 4652500a1b49f905b29f4927795c80be3a7bf48e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-05-10 18:26 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:26 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8a032b7c72ed87a1e5d45bac93da38e6b2020168

commit 8a032b7c72ed87a1e5d45bac93da38e6b2020168
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-04-29 14:06 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:06 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1b5838882dce484fc998fae23f4f54c27d0e6e97

commit 1b5838882dce484fc998fae23f4f54c27d0e6e97
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-04-04 12:56 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:56 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ce008829a477736daeaf02cf816c1a8aac93bcca

commit ce008829a477736daeaf02cf816c1a8aac93bcca
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-03-31 19:09 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:09 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1a4c70b54fecb15a6b83fb654b8f66580e095da2

commit 1a4c70b54fecb15a6b83fb654b8f66580e095da2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test
@ 2022-03-29 20:32 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:32 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b3324134538bdc47235215985f129112ea9327fe

commit b3324134538bdc47235215985f129112ea9327fe
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:46:34 2022 -0300

    stdio: Disable clang warning on scanf13 test

Diff:
---
 stdio-common/scanf13.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c
index 720224aa05..02d258ae9f 100644
--- a/stdio-common/scanf13.c
+++ b/stdio-common/scanf13.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <wchar.h>
+#include <libc-diag.h>
 
 int
 main (void)
@@ -20,6 +21,11 @@ main (void)
   } while (0)
 
   setlocale (LC_ALL, "de_DE.UTF-8");
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf ("A  \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B",
 	      "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4)
     FAIL ();
@@ -57,6 +63,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   memset (buf, '/', sizeof (buf));
   buf[0] = '\t';
@@ -85,6 +92,9 @@ main (void)
 	FAIL ();
       free (sp2);
     }
+  /* TODO: explain why clang need these.  */
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source");
   if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2)
     FAIL ();
   else
@@ -125,6 +135,7 @@ main (void)
 	FAIL ();
       free (sp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
   if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2)
     FAIL ();
   else
@@ -141,6 +152,9 @@ main (void)
 	FAIL ();
       free (lsp2);
     }
+  DIAG_PUSH_NEEDS_COMMENT_CLANG;
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args");
   if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2)
     FAIL ();
   else
@@ -181,6 +195,7 @@ main (void)
 	FAIL ();
       free (lsp4);
     }
+  DIAG_POP_NEEDS_COMMENT_CLANG;
 
   return result;
 }


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-04-02 15:55 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 21:22 [glibc/azanella/clang] stdio: Disable clang warning on scanf13 test Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:55 Adhemerval Zanella
2024-02-09 17:34 Adhemerval Zanella
2024-02-07 14:09 Adhemerval Zanella
2024-01-29 17:59 Adhemerval Zanella
2023-12-21 18:56 Adhemerval Zanella
2023-09-28 17:54 Adhemerval Zanella
2023-08-30 12:38 Adhemerval Zanella
2023-02-09 19:50 Adhemerval Zanella
2022-10-28 17:43 Adhemerval Zanella
2022-10-04 13:01 Adhemerval Zanella
2022-06-09 13:19 Adhemerval Zanella
2022-06-03 14:08 Adhemerval Zanella
2022-05-13 14:22 Adhemerval Zanella
2022-05-12 19:35 Adhemerval Zanella
2022-05-10 18:26 Adhemerval Zanella
2022-04-29 14:06 Adhemerval Zanella
2022-04-04 12:56 Adhemerval Zanella
2022-03-31 19:09 Adhemerval Zanella
2022-03-29 20:32 Adhemerval Zanella

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).