Subject: bug#78659: [PATCH] Pacify Clang's -Wformat-signedness.

From: Collin Funk <[email-masked]>
Date: Sun, 01 Jun 2025 18:04:32 -0700

Hi Eli and Paul,

Eli Zaretskii <[email-masked]> writes:

>> Date: Sat, 31 May 2025 23:47:15 -0700
>> Cc: [email-masked]
>> From: Paul Eggert <[email-masked]>
>> 
>> On 2025-05-31 23:24, Eli Zaretskii wrote:
>> > Paul, any comments or suggestions?
>> 
>> As a general rule of thumb, I wouldn't bother pacifying anything but the 
>> latest GCC, especially to work around false alarms (which these are). 
>> Since this is isn't the latest GCC and these are false alarms, I suggest 
>> ignoring the false alarms, or silencing them by using ./configure 
>> --disable-gcc-warnings.
>
> Agreed.

How about just disabling this warning if Clang is being used like we do
for many others?

Simple 1 line patch attached.

Collin

>From 8f482d6d176df05b642319bfc6c805c0d3e898cb Mon Sep 17 00:00:00 2001
Message-ID: <8f48[email-masked]>
From: Collin Funk <[email-masked]>
Date: Sun, 1 Jun 2025 18:01:33 -0700
Subject: [PATCH v2] Pacify Clang's -Wformat-signedness.

* configure.ac: Enable -Wno-format-signedness if Clang is being used.
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index bafbb748149..d7c27dae734 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1870,6 +1870,7 @@ AC_DEFUN
   # clang is unduly picky about some things.
   if test "$emacs_cv_clang" = yes; then
     gl_WARN_ADD([-Wno-bitwise-instead-of-logical])
+    gl_WARN_ADD([-Wno-format-signedness])
     gl_WARN_ADD([-Wno-missing-braces])
     gl_WARN_ADD([-Wno-null-pointer-arithmetic])
     gl_WARN_ADD([-Wno-implicit-const-int-float-conversion])
-- 
2.49.0