Hi,
I've just started developing with Eclipse and the Avr-GCC (WinAVR) toolchain and I get a few false positives with codan. They're irritating and out of harmony (I like clean code) so I'm trying to alleviate them where possible. For those that don't know, one aspect of Avr-GCC is a flash memory management library that uses some C extensions to move RAM type initialisation into flash (avr/pgmspace.h header) and manage it all via a set of macros. One specific macro for managing strings (so you can pass info back and forth through a serial port etc) is PSTR(s) which expands thus:
# define PSTR(s) (__extension__({static char __c[] PROGMEM = (s); &__c[0];}))
That "&__c[0];" is getting interpretted as a Codan warning "Statement has no effect {0}" when it's actually the return value of the PSTR macro (why not just regular macros? why have __extension__ in there? If it needs to be a function, be a useful function and return the pointer it's generating)
I'd like to supress it either by fixing the avr toolchain (beyond me today) or supress the error in this instance (add an exception to codan's generation of this message).