diff --git a/BuildTests/StaticAnalysisTest/makefile b/BuildTests/StaticAnalysisTest/makefile index 766bf080ce455f0709decb378531188874a35d22..44c7d5f820592082ad1d704bfa946d17f0eae730 100644 --- a/BuildTests/StaticAnalysisTest/makefile +++ b/BuildTests/StaticAnalysisTest/makefile @@ -9,15 +9,19 @@ # Static anlysis of the entire LUFA source tree, using the free cross-platform "cppcheck" tool. # Path to the root of the LUFA tree to scan -LUFA_ROOT_PATH = ../../ +LUFA_ROOT_PATH = ../../ # Filenames or directories (including fragments) to exclude from the analysis -EXCLUDE_LIST = HostLoaderApp/ FATFs/ PetiteFATFs/ uip/ +EXCLUDE_LIST = HostLoaderApp/ FATFs/ PetiteFATFs/ uip/ # Output message template for found warnings and errors -MESSAGE_TEMPLATE = "{file}({line}): {severity} ({id}): {message}" +MESSAGE_TEMPLATE = "{file}({line}): {severity} ({id}): {message}" + +# Checks to suppress so that generated warnings are discarded +SUPPRESS_WARNINGS = variableScope unusedFunction missingInclude all: - cppcheck -q -f --error-exitcode=1 --inline-suppr --enable=style --suppress=variableScope --template $(MESSAGE_TEMPLATE) $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH) + cppcheck -q --std=c99 --check-config $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH) + cppcheck -q -f --std=c99 --error-exitcode=1 --inline-suppr --enable=all $(SUPPRESS_WARNINGS:%=--suppress=%) --template $(MESSAGE_TEMPLATE) $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH) %: \ No newline at end of file diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h index 3144c87ad46a3658b16f962b63013e33da2770ad..18606eaf1cbc4cf2eb2b5caf2fd00d1d3214fa88 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h +++ b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include <avr/io.h> - #include "MassStorage.h" - #include "Descriptors.h" + #include "../MassStorage.h" + #include "../Descriptors.h" #include <LUFA/Common/Common.h> #include <LUFA/Drivers/USB/USB.h> diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h index 635bd067fbf8bfc1ec029464330a4617725bd0d5..d4466238212510130d6fa25febcc44f63e0a584e 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h +++ b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h @@ -42,8 +42,8 @@ #include <LUFA/Drivers/USB/USB.h> - #include "MassStorage.h" - #include "Descriptors.h" + #include "../MassStorage.h" + #include "../Descriptors.h" #include "DataflashManager.h" /* Macros: */ diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h index 8ef430aa5a1b78f481d69c49530d299b42b7821e..f7552dc4a8cb4a2eff9dcadabb6e8fbd919d6017 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include <avr/io.h> - #include "MassStorageKeyboard.h" - #include "Descriptors.h" + #include "../MassStorageKeyboard.h" + #include "../Descriptors.h" #include <LUFA/Common/Common.h> #include <LUFA/Drivers/USB/USB.h> diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h index cc4581dea81af980c724fc5f0bfecc601a2161a0..5c3d3bf97cf321d9c161fea2f81ed957d171b555 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h @@ -42,8 +42,8 @@ #include <LUFA/Drivers/USB/USB.h> - #include "MassStorageKeyboard.h" - #include "Descriptors.h" + #include "../MassStorageKeyboard.h" + #include "../Descriptors.h" #include "DataflashManager.h" /* Macros: */ diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.h b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.h index dbcbb5dde2be46ec02c48fd13327cda14f83c99d..1d123865879dcc66e570905dfd509e1290b5cfb5 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.h +++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include <avr/io.h> - #include "VirtualSerialMassStorage.h" - #include "Descriptors.h" + #include "../VirtualSerialMassStorage.h" + #include "../Descriptors.h" #include <LUFA/Common/Common.h> #include <LUFA/Drivers/USB/USB.h> diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h index 214ddafb5facffba6567d6b782658f1ee9b56902..83d5646c48c2c89a366e8519bc44f3b3a5d9f672 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h +++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h @@ -42,8 +42,8 @@ #include <LUFA/Drivers/USB/USB.h> - #include "VirtualSerialMassStorage.h" - #include "Descriptors.h" + #include "../VirtualSerialMassStorage.h" + #include "../Descriptors.h" #include "DataflashManager.h" /* Macros: */ diff --git a/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.h b/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.h index 963164bc92ebef4ccdf34a77a2305a22c61be544..4f4b5c170bc93f4e5e244908cb7f783fb7db2b05 100644 --- a/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.h +++ b/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.h @@ -36,7 +36,7 @@ #include <stdbool.h> #include <string.h> - #include "Sideshow.h" + #include "../Sideshow.h" #include "SideshowCommon.h" #include "SideshowApplications.h" #include "SideshowContent.h" diff --git a/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h b/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h index ab68049f93d8b99792f760befe2d52495418cda5..d70a86c19ea08041e964fc29232be15e018e131a 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h +++ b/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include <avr/io.h> - #include "MassStorage.h" - #include "Descriptors.h" + #include "../MassStorage.h" + #include "../Descriptors.h" #include <LUFA/Common/Common.h> #include <LUFA/Drivers/USB/USB.h> diff --git a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.h b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.h index 244daaa9145964ed51a1ad065972d9670b81c78a..b0065cd13b26e6cd843119ec3f3e119b64e86fe1 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.h +++ b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.h @@ -44,8 +44,8 @@ #include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/Board/LEDs.h> - #include "MassStorage.h" - #include "Descriptors.h" + #include "../MassStorage.h" + #include "../Descriptors.h" #include "DataflashManager.h" /* Macros: */ diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h index cd2ff557876634f8a26c79a4f0631e4bc8e53be8..8bf8bdfaf2e5d41f1c499f33b6e865ed629f4fb9 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h @@ -40,7 +40,7 @@ #include <avr/io.h> #include <stdbool.h> - #include "RNDISEthernet.h" + #include "../RNDISEthernet.h" #include "Ethernet.h" /* External Variables: */ diff --git a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h index 5e4e04da41be270664e07f6b57d7fe613505636b..5b050e8b12e7d1d45f91b4b65792406ff6a92bb9 100644 --- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h +++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h @@ -39,7 +39,7 @@ /* Includes: */ #include <avr/io.h> - #include "MassStorageHost.h" + #include "../MassStorageHost.h" #include <LUFA/Drivers/USB/USB.h> diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h index f470907e6c97c8f5ad7c9ad21519728838a8d73d..d353477dacb79f37d883d2f9193af9ddf5cacc42 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h +++ b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include <avr/io.h> - #include "StandaloneProgrammer.h" - #include "Descriptors.h" + #include "../StandaloneProgrammer.h" + #include "../Descriptors.h" #include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/Board/Dataflash.h> diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h index 955a8fec9c7b6b0cd31cd801b4f0d43d45d5a757..a0940a796a8934385c3e07bea4647b8f92b18472 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h +++ b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h @@ -42,8 +42,8 @@ #include <LUFA/Drivers/USB/USB.h> - #include "StandaloneProgrammer.h" - #include "Descriptors.h" + #include "../StandaloneProgrammer.h" + #include "../Descriptors.h" #include "DataflashManager.h" /* Macros: */ diff --git a/Projects/TempDataLogger/Lib/DataflashManager.h b/Projects/TempDataLogger/Lib/DataflashManager.h index f93d505898f75947c53e4ed01b58eb3bdc3be6bf..5d598cad592c2a961a9b03d63ddcbe307d79f0e7 100644 --- a/Projects/TempDataLogger/Lib/DataflashManager.h +++ b/Projects/TempDataLogger/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include <avr/io.h> - #include "TempDataLogger.h" - #include "Descriptors.h" + #include "../TempDataLogger.h" + #include "../Descriptors.h" #include <LUFA/Common/Common.h> #include <LUFA/Drivers/USB/USB.h> diff --git a/Projects/Webserver/Lib/DataflashManager.h b/Projects/Webserver/Lib/DataflashManager.h index bdc27a2a0f842d725a7a7841fe5bfd9c3ceeeae7..af76f7f629e2c6613acaf91a2d35b6df455a384b 100644 --- a/Projects/Webserver/Lib/DataflashManager.h +++ b/Projects/Webserver/Lib/DataflashManager.h @@ -39,7 +39,7 @@ /* Includes: */ #include <avr/io.h> - #include "Descriptors.h" + #include "../Descriptors.h" #include <LUFA/Common/Common.h> #include <LUFA/Drivers/USB/USB.h> diff --git a/Projects/Webserver/Lib/uIPManagement.h b/Projects/Webserver/Lib/uIPManagement.h index d51df090b68bb4b2687f1904ca5bafce9fe28fb8..390d3c44802db7cb41d746726152327900a2cab9 100644 --- a/Projects/Webserver/Lib/uIPManagement.h +++ b/Projects/Webserver/Lib/uIPManagement.h @@ -44,10 +44,10 @@ #include <uip-split.h> #include <timer.h> - #include "Lib/DHCPClientApp.h" - #include "Lib/DHCPServerApp.h" - #include "Lib/HTTPServerApp.h" - #include "Lib/TELNETServerApp.h" + #include "DHCPClientApp.h" + #include "DHCPServerApp.h" + #include "HTTPServerApp.h" + #include "TELNETServerApp.h" /* Macros: */ /** IP address that the webserver should use once connected to a RNDIS device (when DHCP is disabled). */