← Back to team overview

maria-developers team mailing list archive

Re: Compiler warning about assigned but not used variables fixed

 


> -----Original Message-----
> From: maria-developers-
> bounces+wlad=montyprogram.com@xxxxxxxxxxxxxxxxxxx [mailto:maria-
> developers-bounces+wlad=montyprogram.com@xxxxxxxxxxxxxxxxxxx] On
> Behalf Of Sergei Golubchik
> Sent: Dienstag, 18. Oktober 2011 10:15
> To: maria-developers@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Maria-developers] Compiler warning about assigned but not
> used variables fixed 

> try not to overuse #ifdef's, (*)
> prefer __attribute__((unused)) instead.

> it is less error-prone and results in a more maintainable and readable
> code.

This really depends on what you're used:)  With anything but gcc,
__attribute__((unused)) is a lengthy zero-effect macro. I did not find
double-underscore macros really readable, but it must be just me.





Follow ups

References