Opened 8 years ago
Closed 8 years ago
#6184 closed defect (fixed)
Compilation error gdal 2.1 trunk with gcc 5.1
Reported by: | manuelgrizonnet | Owned by: | Kurt Schwehr |
---|---|---|---|
Priority: | normal | Milestone: | 2.1.0 |
Component: | default | Version: | svn-trunk |
Severity: | blocker | Keywords: | |
Cc: |
Description
I've got a compilation error with gdal 2.1 trunk (revision 31183) with gcc (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4) on Fedora 22:
pngdataset.cpp:1373:47: error: reinterpret_cast from type 'const char*' to type 'GByte* {aka unsigned char*}' casts away qualifiers
if( reinterpret_cast<GByte *>( pszStr )[i] >= 128 )
It seems that a "const-cast" is missing somewhere.
I don't use any specific compiler options ("./configure;make"). It sounds weird that this error does not pop up for other people (with other compilers) so perhaps something wrong on my side but I can't find it.
Thanks for the bug report! Indeed, that does look like I should have added a const_cast. Working on it now.