mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-02-26 21:57:22 +03:00
tests: ensure compiler knows the argv[0] is non-NULL
../tests/redirect-test.c /usr/i686-w64-mingw32/sys-root/mingw/include/winbase.h: In function 'WinMain': ../../tests/redirect-test.c:318:5: error: '%s' directive argument is null [-Werror=format-overflow=] 318 | fprintf(log_f, "argc %d argv[0] %s \n", argc, argv[0]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../tests/redirect-test.c:318:5: error: '%s' directive argument is null [-Werror=format-overflow=] Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
7f9aba52c7
commit
041857e677
@ -315,6 +315,7 @@ int WINAPI WinMain(HINSTANCE hInstance G_GNUC_UNUSED, HINSTANCE hPrevInstance G_
|
|||||||
assert(log_f);
|
assert(log_f);
|
||||||
setbuf(log_f, NULL);
|
setbuf(log_f, NULL);
|
||||||
|
|
||||||
|
assert(argv[0]);
|
||||||
fprintf(log_f, "argc %d argv[0] %s \n", argc, argv[0]);
|
fprintf(log_f, "argc %d argv[0] %s \n", argc, argv[0]);
|
||||||
|
|
||||||
if (argc >= 1) {
|
if (argc >= 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user