On Mar 28, 2010, at 14:25 , webmas...@opensc-project.org wrote: > Revision: 4155 > Author: ludovic.rousseau > Date: 2010-03-28 11:25:01 +0000 (Sun, 28 Mar 2010) > > Log Message: > ----------- > Fix > parse.c: In function ?\226?\128?\152scconf_item_find?\226?\128?\153: > parse.c:80: warning: unused parameter ?\226?\128?\152key?\226?\128?\153
This is a type of warning that could maybe even be left as it is for internal API-s (which is almost everything in OpenSC which is not PKCS#11) as it allows to optimize/clean the API, if you see a lot of unused parameters warnings. There's a tip in stackoverflow that allows to keep the warning in debug/developer mode: http://stackoverflow.com/questions/1486904/how-do-i-best-silence-a-warning-about-unused-variables/1670083#1670083 (copypasted here): """ #ifdef UNUSED #elif defined(__GNUC__) # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) #elif defined(__LCLINT__) # define UNUSED(x) /*...@unused@*/ x #else # define UNUSED(x) x #endif void dcc_mon_siginfo_handler(int UNUSED(whatsig)) """ For example, I got annoyed about the "unused parameter slot" warning in reader-pcsc.c and IMHO the right thing was to get rid of the 99.9% unused slot abstraction on reader layer. I don't know how many of the internal API-s can or should be refactored now or some time in the future but it would be nice to see such warnings in some mode. -- Martin Paljak http://martin.paljak.pri.ee +3725156495 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel