Ticket #195 (assigned enhancement)

Opened 8 months ago

Last modified 2 months ago

Improve code quality by enabling more compiler warnings

Reported by: diederik Owned by: diederik
Priority: normal Milestone: kmess-2.0
Component: Deployment Version: 1.5
Keywords: Cc:

Description (last modified by valerio) (diff)

The quality of the code could be improved by enabling more compiler warnings, and fixing that code.

The most useful one (which currently is not enabled) is:

  • -Wold-style-cast - a warning is issued whenever a C-style (type) cast is performed instead of C++-style x_cast<type>() casts.

And less relevant for now:

  • -Wfatal-errors
  • -pedantic

Change History

Changed 8 months ago by valerio

I think "boom" :P

Changed 7 months ago by diederik

  • status changed from new to assigned

Enabled all except for:

  • -pedantic
  • -Wfatal-errors

Changed 7 months ago by diederik

  • description modified (diff)

Changed 5 months ago by valerio

The only warning I got is about the use of preprocessor "#warning"s.

Changed 3 months ago by diederik

The warnings don't seam to add much value. Instead I've sent a request to Coverity to be included in their free Open Source scans. We could also install the KDE source code checker ('Krazy') too :)

Changed 3 months ago by diederik

  • component changed from Other to Deployment

Changed 2 months ago by valerio

  • description modified (diff)

The only useful warning is 'old-style-cast' which generates thousands of warnings in our SVN code.

The others are pretty useless indeed; I suggest enabling old-style-cast alongside a major code reformatting - maybe with the help of some automatic code reformatter.

Note: See TracTickets for help on using tickets.