From: Zebediah Figura zfigura@codeweavers.com
This works around a spurious gcc warning:
../wine/dlls/ntdll/unix/system.c: In function ‘NtQuerySystemInformation’: ../wine/dlls/ntdll/unix/system.c:3176:36: error: ‘%s’ directive output between 0 and 2147483644 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-truncation=] 3176 | snprintf( info, size, "%s%c%s%c%s%c%s", version, 0, wine_build, 0, buf.sysname, 0, buf.release ); | ^~ ~~~~~~~~~~ ../wine/dlls/ntdll/unix/system.c:3176:9: note: ‘snprintf’ output between 8 and 2147483780 bytes into a destination of size 4294967295 3176 | snprintf( info, size, "%s%c%s%c%s%c%s", version, 0, wine_build, 0, buf.sysname, 0, buf.release ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- dlls/ntdll/unix/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 83e0521a3c9..136fc80adf1 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -3172,8 +3172,8 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, struct utsname buf;
uname( &buf ); - len = strlen(version) + strlen(wine_build) + strlen(buf.sysname) + strlen(buf.release) + 4; snprintf( info, size, "%s%c%s%c%s%c%s", version, 0, wine_build, 0, buf.sysname, 0, buf.release ); + len = strlen(version) + strlen(wine_build) + strlen(buf.sysname) + strlen(buf.release) + 4; if (size < len) ret = STATUS_INFO_LENGTH_MISMATCH; break; }