openvpn.c: Avoid compiler warnings for sscanf with MinGW

openvpn.c:1709:29: warning: ISO C does not support the 'I'
 scanf flag [-Wformat=]
openvpn.c:1709:34: warning: format ‘%u’ expects argument
 of type ‘unsigned int *’, but argument 3 has type
 ‘long long unsigned int *’ [-Wformat=]

Switch to using portable identifiers.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
master
Frank Lichtenheld 2025-01-21 17:35:07 +01:00 committed by Gert Doering
parent ff0af59042
commit 913641ec41
1 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@
#include <richedit.h>
#include <time.h>
#include <commctrl.h>
#include <inttypes.h>
#ifndef WM_DPICHANGED
#define WM_DPICHANGED 0x02E0
@ -1706,7 +1707,7 @@ format_bytecount(wchar_t *buf, size_t len, unsigned long long c)
void
OnByteCount(connection_t *c, char *msg)
{
if (!msg || sscanf(msg, "%I64u,%I64u", &c->bytes_in, &c->bytes_out) != 2)
if (!msg || sscanf(msg, "%" SCNu64 ",%" SCNu64, &c->bytes_in, &c->bytes_out) != 2)
{
return;
}