From 9632f3ef3585ab50217ff8107d50a6971318a7af Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 6 Mar 2013 01:09:57 +0100 Subject: [PATCH] Edit HACKING & introduce cppcheck Still a few todo according to cppcheck: [examples/pn53x-tamashell.c:165]: (style) Found obsolete function 'usleep'. It is recommended that new applications use the 'nanosleep' or 'setitimer' function [libnfc/buses/uart_posix.c:343]: (portability) Found non reentrant function 'readdir'. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r' [libnfc/drivers/acr122_pcsc.c:206]: [libnfc/drivers/acr122_pcsc.c:219]: [libnfc/drivers/acr122s.c:412]: [libnfc/drivers/acr122s.c:425]: [libnfc/drivers/acr122s.c:434]: [libnfc/drivers/arygon.c:181]: [libnfc/drivers/arygon.c:194]: [libnfc/drivers/arygon.c:203]: [libnfc/drivers/pn532_uart.c:158]: [libnfc/drivers/pn532_uart.c:171]: [libnfc/drivers/pn532_uart.c:180]: (portability) Found non reentrant function 'strtok'. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r' --- HACKING | 3 +++ 1 file changed, 3 insertions(+) diff --git a/HACKING b/HACKING index b6b8968..1ee667d 100644 --- a/HACKING +++ b/HACKING @@ -36,6 +36,9 @@ Here are some directions to get you started: $ scan-build ./configure $ make clean $ scan-build make + And by using cppcheck: + $ cppcheck --quiet --enable=all --std=c99 --std=posix \ + -I include -I libnfc -I libnfc/buses . 2.3 When Debianizing $ lintian --info --display-info --display-experimental *deb or (shorter version)