[Pcsclite-muscle] Tracing feature in the client side

Maksim Ivanov emaxx
Thu Mar 10 04:13:44 PST 2016

Hello all,

I have a couple of small suggestions regarding the tracing feature of
the PC/SC-Lite's client side library. This feature is controlled by
the "DO_TRACE" preprocessor definition.

First, it's impossible to trigger this feature using the compiler
flags: for some reason, the winscard_clnt.c file contains directive
"#undef DO_TRACE". If it were a commented "#define" directive, then
this would be more useful: the feature could be triggered both by
editing the source file and by modifying the compiler flags.

Second, there is an inconsistency between the printf format specifier
and the passed value in the trace function, that produces a warning.
E.g. with clang 3.7.0:

> pcsc-lite/src-1.8.15/src/winscard_clnt.c:162:14: error: format specifies type 'unsigned long' but the argument has type 'pthread_t'
>       (aka 'struct __nc_basic_thread_data *') [-Werror,-Wformat]
>                 direction, pthread_self(), func);
>                            ^~~~~~~~~~~~~~


More information about the pcsclite-muscle mailing list