From f152aaffa35bbea27f7b01e555d8006db9788d19 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 6 Mar 2013 10:54:54 +0100 Subject: [PATCH] Edit HACKING: cppcheck v1.58 --- HACKING | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/HACKING b/HACKING index 1ee667d..e457137 100644 --- a/HACKING +++ b/HACKING @@ -23,22 +23,31 @@ Here are some directions to get you started: 2.1 When using autotools $ autoreconf -Wall -vis 2.2 When compiling - $ export CFLAGS="-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing \ - -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused \ - -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \ - -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs \ - -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition \ - -Wbad-function-cast -Wnested-externs -Wmissing-declarations" - $ ./configure - $ make clean - $ make - You can chase even more issues by using clang: - $ 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.2.1 Using extra flags: + $ export CFLAGS="-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing \ + -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused \ + -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \ + -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs \ + -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition \ + -Wbad-function-cast -Wnested-externs -Wmissing-declarations" + $ ./configure + $ make clean + $ make + 2.2.2 Using clang: + $ scan-build ./configure + $ make clean + $ scan-build make + 2.2.3 Using cppcheck (v1.58 or higher): + $ cppcheck --quiet \ + -I include -I libnfc -I libnfc/buses -I libnfc/chips -I libnfc/drivers \ + --check-config . + $ cppcheck --quiet --enable=all --std=posix --std=c99 \ + -I include -I libnfc -I libnfc/buses -I libnfc/chips -I libnfc/drivers \ + -DLOG -D__linux__ \ + -DDRIVER_PN53X_USB_ENABLED -DDRIVER_ACR122_PCSC_ENABLED \ + -DDRIVER_ACR122_USB_ENABLED -DDRIVER_ACR122S_ENABLED \ + -DDRIVER_PN532_UART_ENABLED -DDRIVER_ARYGON_ENABLED \ + --force . 2.3 When Debianizing $ lintian --info --display-info --display-experimental *deb or (shorter version)