[collectd] Standards conformance

Sebastian Harl sh at tokkee.org
Fri Apr 17 11:12:13 CEST 2009


Hi,

On Fri, Apr 17, 2009 at 10:52:15AM +0200, Florian Forster wrote:
> I think I'll add a configure flag for something like a ???maintainer mode???
> or something

"Maintainer mode" is not a very good name for that, since that might be
confused with AM_MAINTAINER_MODE ...

[...]
> which will
>  - enable all those standard-flags
>  - add "-g -O0" to the CFLAGS
>  - maybe change the default prefix to /tmp/collectd

... also, I'd rather go for something like this:

 - one flag (something like "strict standard compliance") to enable all
   those standard flags

 - adding "-g -O0" to CFLAGS might be done if debugging is enabled, but
   I'm not sure about that since I don't know if any end users might use
   that as well - also, passing custom CFLAGS to configure is not that
   big of a deal imho ... ;-)

 - possibly add another flag to enable even further warnings [1]

I'm not sure if any of that should touch the default prefix. I'm usually
using `pwd`/target/ during development and I guess everybody has his /
her personal favorite ;-)

Just my 2c ... ;-)

Cheers,
Sebastian

[1] Something like the following comes to my mind:

  "Harding" options:
  CPPFLAGS += -D_FORTIFY_SOURCE=2
  CFLAGS += -Wformat -Wformat-security

  (that's what I usually use, see http://wiki.debian.org/Hardening for
  some more ideas)

  strict compiler tests:
  CFLAGS += -Wbad-function-cast -Wcast-align -Wcast-qual -Wconversion
	    -Wdeclaration-after-statement -Wmissing-prototypes
	    -Wpointer-arith -Wshadow -Wstrict-prototypes
            -Wunreachable-code -Wvla

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090417/5b6dc7f4/attachment.pgp 


More information about the collectd mailing list