]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
Revisit some -Wuseless-cast changes.
authorBruno Haible <bruno@clisp.org>
Fri, 8 May 2026 07:55:01 +0000 (09:55 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 8 May 2026 07:55:01 +0000 (09:55 +0200)
* lib/intprops-internal.h: Ignore -Wuseless-cast also with gcc 14, 15.
* lib/vasnprintf.c: Likewise. Also, fix a clang warning.

ChangeLog
lib/intprops-internal.h
lib/vasnprintf.c

index bdb714e86568a230bbecf0e19f5f226e01abc30f..64fd475fcfe09b7567d4f441547fcff031c5d156 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2026-05-08  Bruno Haible  <bruno@clisp.org>
 
+       Revisit some -Wuseless-cast changes.
+       * lib/intprops-internal.h: Ignore -Wuseless-cast also with gcc 14, 15.
+       * lib/vasnprintf.c: Likewise. Also, fix a clang warning.
+
        Revisit some -Wuseless-cast changes.
        * lib/obstack.in.h (obstack_free): Restore parentheses around macro
        argument.
index 6a72c24bca76089734bf00d8bdd9e43d8ba40ddc..a749cad1a4eab2737e51da0c5c65214354995874 100644 (file)
@@ -25,8 +25,8 @@
 # pragma GCC diagnostic ignored "-Wtype-limits"
 #endif
 
-/* This file uses many casts that might provoke -Wuseless-cast.  */
-#if 16 <= __GNUC__
+/* This file uses many casts that might provoke -Wuseless-cast warnings.  */
+#if 14 <= __GNUC__
 # pragma GCC diagnostic ignored "-Wuseless-cast"
 #endif
 
index 3162fd0b8a182bea897080c0482c0d512e484a5a..366a43786304dc8a595953b0f1a10cb75fd73c4e 100644 (file)
@@ -69,8 +69,9 @@
 # pragma GCC diagnostic ignored "-Wanalyzer-null-argument"
 #endif
 
-/* This code has a lot of parameterized pointer casts that may be no-ops.  */
-#if _GL_GNUC_PREREQ (16, 0) || 11 <= __clang_major__
+/* This code has a lot of parameterized pointer casts that may be no-ops,
+   depending on DCHAR_T and TCHAR_T.  */
+#if _GL_GNUC_PREREQ (14, 0)
 # pragma GCC diagnostic ignored "-Wuseless-cast"
 #endif