From: Luis Lavena Date: 2011-11-29T00:10:22+09:00 Subject: [ruby-core:41371] Re: [ruby-trunk - Bug #5679][Open] Too many arguments for format warnings on mingw32 build On Mon, Nov 28, 2011 at 11:56 AM, KOSAKI Motohiro wrote: >> I can see the following warnings during mingw32 build. >> >> gc.c: In function 'gc_profile_result': >> gc.c:3581:4: warning: unknown conversion type character 'z' in format >> gc.c:3581:4: warning: unknown conversion type character 'z' in format >> gc.c:3581:4: warning: unknown conversion type character 'z' in format >> gc.c:3581:4: warning: format '%30.20f' expects type 'double', but argument 5 has type 'unsigned int' >> gc.c:3581:4: warning: too many arguments for format > > Where does 'z' come from? > PRI?SIZE from ruby.h Anyhow, I think this is coming from printf implementation of MinGW: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37768 And this: http://mingw-users.1079350.n2.nabble.com/quot-z-quot-format-in-printf-statements-td5804407.html Quoting: "On 05.12.2010 6:36, Simson Garfinkel wrote: > Hi. Another porting question. > > GCC on every platform I use has a %z format for size_t data. I even saw that on mingw with gcc 3.5 when run as a cross-compiler. But the %z format seems missing from the 4.x gcc running on Windows-hosted GCC. What should I do? > > bloom.c:221:5: warning: unknown conversion type character 'z' in format > CFLAGS="-D_GNU_SOURCE=1" works for me. " -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup�ry