Closed GoogleCodeExporter closed 8 years ago
g++ compiles but issues the following warning:
...
miniz.c: In function ‘void* tdefl_write_image_to_png_file_in_memory(const
void*, int, int, int, size_t*)’:
miniz.c:2781:100: warning: narrowing conversion of
‘"\000\000\004\002\006"[num_chans]’ from ‘const char’ to ‘mz_uint8
{aka unsigned char}’ inside { } [-Wnarrowing]
0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,"\0\0\04\02\06"[num_chans],0,0,0,0,0,0,0,
^
....
using
$ g++ --version
g++ (GCC) 4.8.0 20130411 (prerelease)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Original comment by hdeancl...@gmail.com
on 25 May 2013 at 9:38
This should hopefully be fixed in v1.15. I have only compiled with clang v3.3
here, and not with -std=c11 though, but I did change this particular code in a
way that should avoid this problem.
Original comment by richge...@gmail.com
on 13 Oct 2013 at 5:24
Original issue reported on code.google.com by
toffale...@gmail.com
on 22 Jul 2012 at 7:31