public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2024-01-29 18:00 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 18:00 UTC (permalink / raw)
  To: glibc-cvs

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

commit 0e430c26e1e6fd9af357f8ff0f4f8aaefb0f0970
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 8ff6b074b0..d0ebbbfc94 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2024-04-02 15:56 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:56 UTC (permalink / raw)
  To: glibc-cvs

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

commit 9913d21cc9cf6e52a598fe814d8c32a1a27b96e1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 8ff6b074b0..d0ebbbfc94 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2024-02-09 17:34 Adhemerval Zanella
  0 siblings, 0 replies; 10+ 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=53e0080c7c48cc00a132e40652f5f6e7a3efba51

commit 53e0080c7c48cc00a132e40652f5f6e7a3efba51
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 8ff6b074b0..d0ebbbfc94 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2024-02-07 14:09 Adhemerval Zanella
  0 siblings, 0 replies; 10+ 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=f7dd40394b36423d8f37d5127931973e4601e256

commit f7dd40394b36423d8f37d5127931973e4601e256
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 8ff6b074b0..d0ebbbfc94 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2023-12-21 18:56 Adhemerval Zanella
  0 siblings, 0 replies; 10+ 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=f903387cf2edc009d82d27b95c61eb279b20f17d

commit f903387cf2edc009d82d27b95c61eb279b20f17d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 67a7d621f5..c9c55fdad2 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2023-09-28 17:54 Adhemerval Zanella
  0 siblings, 0 replies; 10+ 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=e2291b785395f383da63feec174c4dd274868a38

commit e2291b785395f383da63feec174c4dd274868a38
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 67a7d621f5..c9c55fdad2 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2023-08-30 12:39 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:39 UTC (permalink / raw)
  To: glibc-cvs

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

commit 004696fef4a29219b7b47e04b904bdb27407237a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 67a7d621f5..c9c55fdad2 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2023-02-09 19:51 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:51 UTC (permalink / raw)
  To: glibc-cvs

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

commit 6b378444a0a6792de9f10bf58345f99a268c3d42
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 67a7d621f5..c9c55fdad2 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2022-10-28 17:44 Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:44 UTC (permalink / raw)
  To: glibc-cvs

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

commit 207b242f1c47e4a652d6990baa6f31a076a2719c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 83b3e5594a..6f109ba330 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c
@ 2022-10-04 13:01 Adhemerval Zanella
  0 siblings, 0 replies; 10+ 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=21a5f4ed3e978b88e2cc1f48b47ee437dc07443e

commit 21a5f4ed3e978b88e2cc1f48b47ee437dc07443e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 16:03:16 2022 -0300

    stdio: Suppress clang warnings for tst-unlockedio.c
    
    Clang issues the following warnings:
    
      tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (blah, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~~           ^~~~
      tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (--cp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fwrite_unlocked (cp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~~            ^~~~
      tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from -0 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (buf, 0, -0.0, fp) != 0
               ~~~~~~~~~~~~~~          ^~~~
      tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (--wp, 0.25, 16, fp) != 0
               ~~~~~~~~~~~~~~        ^~~~
      tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
      'size_t' (aka 'unsigned long') changes value from 0.25 to 0
      [-Werror,-Wliteral-conversion]
            || fread_unlocked (wp++, 16, 0.25, fp) != 0
               ~~~~~~~~~~~~~~            ^~~~

Diff:
---
 stdio-common/tst-unlockedio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c
index 83b3e5594a..6f109ba330 100644
--- a/stdio-common/tst-unlockedio.c
+++ b/stdio-common/tst-unlockedio.c
@@ -51,6 +51,9 @@ do_test (void)
      fread_unlocked below as well.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  /* clang warns about the implicit conversion from double to size_t,
+     which is required by this tests.  */
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0
       || f != fp + 1
@@ -104,6 +107,7 @@ do_test (void)
   /* See explanation above.  */
   DIAG_PUSH_NEEDS_COMMENT;
   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero");
+  DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion");
   if (ftello (fp) != 0
       || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0
       || f != fp + 1

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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 18:00 [glibc/azanella/clang] stdio: Suppress clang warnings for tst-unlockedio.c Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:56 Adhemerval Zanella
2024-02-09 17:34 Adhemerval Zanella
2024-02-07 14:09 Adhemerval Zanella
2023-12-21 18:56 Adhemerval Zanella
2023-09-28 17:54 Adhemerval Zanella
2023-08-30 12:39 Adhemerval Zanella
2023-02-09 19:51 Adhemerval Zanella
2022-10-28 17:44 Adhemerval Zanella
2022-10-04 13:01 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).