2011/2/5 Ludovic Rousseau <ludovic.rouss...@gmail.com>:
> Hello,
>
> I recently discovered the clang [1] compiler frontend. This frontend
> generates warnings more or less like gcc.
> But the LLVM compiler also has a static analysis feature used with
> "clang --analyze" and can discover real bugs.
>
> I recompiled the OpenSC source code using:
> $ make CC="clang --analyze"
> and will correct bugs/warning as I discover them.
>
> clang is available on standard Mac OS X Snow Leopard and as a Debian
> package [2].
> I recommend to use it on your C or C++ projects.
>
> Bye
>
> [1] http://clang.llvm.org/
> [2] http://packages.debian.org/squeeze/clang

Note: I will not change/fix code with a problem like:

pkcs15.c:1033:3: warning: Value stored to 'r' is never read
                r = sc_pkcs15_parse_df(p15card, df);
                ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The easy way to solve the warning is to just remove the affectation.
But that would hide the real problem: the return value is not checked.

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to