[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] GCC 4.6.1



Jean-François Lemaire wrote:
How about getting rid of the unused variable? Sounds much better to me.

That was just an example of explicit warning message ;-)

To get rid of an unused variable, the best is o remove it completely from the source.

If for any reason, the variable must stay there, the standard way to make any compiler happy is to cast it to void:

int a;
(void)a;

This is usally wrapped in a UNUSED macro, as in FreeMiNT:
# define UNUSED(x)	(void) x

int a;
UNUSED(a);

--
Vincent Rivière