[Qgis-developer] Treat warnings as errors

Tim Sutton tim at linfiniti.com
Sun Feb 18 07:28:46 EST 2007


2007/2/18, Magnus Homann <magnus at homann.se>:
> Tim Sutton wrote:
> > Hi all
> >
> > I have added -Wall  -Werrors to svn cmake now.
> Compiling with QGISDEBUG is now impossible as there are "debugger
> probes" in the code (which only exists converts to text for the
> debugger), which is now "unused variables". I propose to remove this,
> there are functions available for displyaing QStrings in gdb.

Ah good point I didnt try compiling with debug. Yes we can remove it
or use a null assignment just to ensure the var has been 'used' once.

     67      // XXX - debugger probes
     68      //const char * scope_str = scope.toLocal8Bit().data();
     69      //const char * key_str   = key.toLocal8Bit().data();
      +         scope_str = 0; //avoid compiler warnings
      +         key_str = 0; //avoid compiler warnings

But I agree we can examine these things in gdb as strings and have
less debuggy stuff floating around in the code...



> Magnus
> --
> Magnus Homann
> magnus at homann.se
> +46 702 399 558

Tim Sutton

Visit http://qgis.org for a great Open Source GIS
Home Page: http://linfiniti.com
Skype: timlinux
MSN: tim_bdworld at msn.com
Yahoo: tim_bdworld at yahoo.com
Jabber: timlinux
Irc: timlinux on #qgis at freenode.net

More information about the Qgis-developer mailing list