[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #64384] *printf() replacements break -Wformat
From: |
Bruno Haible |
Subject: |
[bug #64384] *printf() replacements break -Wformat |
Date: |
Thu, 14 Sep 2023 10:13:11 -0400 (EDT) |
Update of bug #64384 (project gettext):
Category: Build => Programmer interface
Status: None => Fixed
Assigned to: None => haible
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
Thanks for the report and suggestion.
Implemented through
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=a36d1168bb8a3950982ad7b13e72c86c7e4458ca
Test case:
#include <stdio.h>
#include <libintl.h>
int main ()
{
printf ("missing: %d %d\n", 42);
printf ("wrong: %llx\n", 17);
}
Compilation on mingw:
Before:
$ $CC -I /usr/local/mingw64/include -Wall -S foo.c
After:
$ $CC -I /usr/local/mingw64/include -Wall -S foo.c
foo.c: In function ‘main’:
foo.c:6:25: warning: format ‘%d’ expects a matching ‘int’ argument
[-Wformat=]
printf ("missing: %d %d\n", 42);
^
foo.c:7:22: warning: format ‘%llx’ expects argument of type ‘long long
unsigned int’, but argument 2 has type ‘int’ [-Wformat=]
printf ("wrong: %llx\n", 17);
^
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64384>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #64384] *printf() replacements break -Wformat,
Bruno Haible <=