-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 30/05/13 12:56, Dmitry Timoshkov wrote:
Christian Costa <titan.costa(a)gmail.com> wrote:
and no modern gcc/other compiler that I can find cares. It was probably added because of a tool that warned of the unused parameter ... So it all goes in circles. ;)
Ciao, Marcus
So what about action = NULL instead? A checker tool should be instructed to ignore that kind of a warning instead. There are many legitimate cases when a function doesn't use all of its parameters, in that cases there is no need to take any special action to silence a warning IMHO.
There is also __attribute__((unused_parameter)) but it's gcc specific.
How is that better than 'unused = unused'? And it's even more typing...
Just cast it to void: (void)unused_param; Thats the tidiest way IMHO. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRp0UeAAoJEIsWlGmq62Ig8mUH/06blo3lMqfU025dpA5NExVF mY/gTzccONBMP8uBxBey/qrwagG/zJI4Wq+nbDMRnoIEk9AayDqlL2KSVCcXQIH9 sTqQPLkpaYsfbvQixryWZ17W0y49Rmam3d9NzSlvVmjcKFcQuE8ke78wkIwMiOfN tJxKDwP4gETXH/867dWIVfdxB3LBGJpp2K02yspPW4lkTQ7u0WjKzElcm4icurQg W2vUVgvRJjcfPdiMpM2z99LJA83qnJifJ6Vf83qdqkf58oDqPVew59A9m8FFD4ev FGSq/o++UrJPvn27gOCmuIMC9L106FaABzP0euzuY8nlV5tlCyCBpw5nW3r4lVo= =8d7n -----END PGP SIGNATURE-----