Using G_GUINT64_FORMAT and friends causes format warnings with GCC on Windows
After upgrading GLib in the GStreamer build system, we noticed in the Windows targets that G_GINT64_MODIFIER is now 'll' instead of 'I64' after this change and it's causing the following warnings:
x86_64-w64-mingw32-gcc -m32 test.c -Wall test.c:In function 'main': test.c:10:17: warning: unknown conversion type character 'l' in format [-Wformat=] printf ("llu: %llu\n",large_unsigned);
test.c:10:9: warning: too many arguments for format [-Wformat-extra-args] printf ("llu: %llu\n",large_unsigned);
test.c:10:17: warning: unknown conversion type character 'l' in format [-Wformat=] printf ("llu: %llu\n",large_unsigned);
test.c:10:9: warning: too many arguments for format [-Wformat-extra-args] printf ("llu: %llu\n",large_unsigned);
test.c:13:17: warning: unknown conversion type character 'l' in format [-Wformat=] printf ("lld: %lld\n",large_signed);
test.c:13:9: warning: too many arguments for format [-Wformat-extra-args] printf ("lld: %lld\n",large_signed);
test.c:13:17: warning: unknown conversion type character 'l' in format [-Wformat=] printf ("lld: %lld\n",large_signed);
test.c:13:9: warning: too many arguments for format [-Wformat-extra-args] printf ("lld: %lld\n",large_signed);
We can reproduce the same behavior with GCC 4.6 and an old versions of MinGW and with GCC 8 and the last release of MinGW.
So far the only option to fix it we found is defining __USE_MINGW_ANSI_STDIO=1.
Edited by Andoni Morales