Re: [AD] Unused parameter

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 13 December 2002 08:01, Eric Botcazou wrote:
[snip]
> Nevertheless applied.

If you are really worried about this issue, consider this perfectly 
valid C statement:

  modifiable_lvalue = expression;

There is no requirement for an assignment, so I could just as easily 
write:

  expression;

And typecasting is a perfectly legal expression. Typecasting to 'void' 
could be a bit dodgy (you can't declare void variables) but typecasting 
to anything else is fine:

void unused_params(int a, char* b)
{
	(int)a;
	(char*)b;
}

or even
	(void*)a;
	(void*)b;

Bye for now,
- -- 
Laurence Withers,  lwithers@xxxxxxxxxx
(GnuPG 04A646EA) http://www.lwithers.demon.co.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE9+i+JUdhclgSmRuoRAg4fAJ4ku003aPEFlI1FFJSKRd0qYvUwJQCfRXrp
rhOORqZ5R1r4DF7nOJKcmYE=
=7w6x
-----END PGP SIGNATURE-----



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/