[QGIS-trac] Re: [Quantum GIS] #1239: Compilation strict mode and warnings cleanup for GCC 4.1

Quantum GIS qgis at qgis.org
Sat Aug 23 10:11:40 EDT 2008


#1239: Compilation strict mode and warnings cleanup for GCC 4.1
----------------------------------------------------+-----------------------
        Reporter:  mloskot                          |         Owner:  nobody                          
            Type:  patch                            |        Status:  closed                          
        Priority:  minor: annoyance or enhancement  |     Milestone:                                  
       Component:  Build/Install                    |       Version:  HEAD                            
      Resolution:  fixed                            |      Keywords:  gcc  warnings strictness cleanup
Platform_version:  10.5                             |      Platform:  OS X                            
        Must_fix:  No                               |   Status_info:  0                               
----------------------------------------------------+-----------------------
Changes (by jef):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Replying to [ticket:1239 mloskot]:
 > I've prepared a patch for ''trunk/qgis'' subtree that enables more
 strict compilation with GCC 4.1 and cleans number of warnings.

 Thanks for the patch I applied it in r9133.  I didn't change the default
 compile, but the PEDANTIC mode.  PEDANTIC also enables more warnings for
 the MSVC build.  GCC 4.3 and MSVC identified some more problems.  And the
 debian package is now compiled in PEDANTIC mode.

 I got a bunch of warnings in Qt headers with strict aliasing (GCC 4.3.1
 and Qt 4.4.0). So I didn't enable that.
 > The only warning that hasn't been cleaned is
 > {{{
 > warning: ISO C++ forbids casting between pointer-to-function and
 pointer-to-object
 > }}}
 > but this is a well known issue of 'dlsym'' call used with C++ compiler
 (see #234).

 I made up a cast_to_fptr function with the union approach there.  Although
 that's not a (perfect) solution.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1239#comment:1>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list