From 7416ebd7c6591c95a0ae79be8ed10203714d385d Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 29 Feb 2012 17:04:04 +0000 Subject: [PATCH] Update StaticAnalysisTest to check for missing header files. Fix found incorrect header file paths in the demos and projects. --- BuildTests/StaticAnalysisTest/makefile | 12 ++++++++---- .../ClassDriver/MassStorage/Lib/DataflashManager.h | 4 ++-- Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h | 4 ++-- .../MassStorageKeyboard/Lib/DataflashManager.h | 4 ++-- .../ClassDriver/MassStorageKeyboard/Lib/SCSI.h | 4 ++-- .../VirtualSerialMassStorage/Lib/DataflashManager.h | 4 ++-- .../ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h | 4 ++-- .../Incomplete/Sideshow/Lib/SideshowCommands.h | 2 +- .../LowLevel/MassStorage/Lib/DataflashManager.h | 4 ++-- Demos/Device/LowLevel/MassStorage/Lib/SCSI.h | 4 ++-- Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h | 2 +- .../LowLevel/MassStorageHost/Lib/MassStoreCommands.h | 2 +- .../StandaloneProgrammer/Lib/DataflashManager.h | 4 ++-- Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h | 4 ++-- Projects/TempDataLogger/Lib/DataflashManager.h | 4 ++-- Projects/Webserver/Lib/DataflashManager.h | 2 +- Projects/Webserver/Lib/uIPManagement.h | 8 ++++---- 17 files changed, 38 insertions(+), 34 deletions(-) diff --git a/BuildTests/StaticAnalysisTest/makefile b/BuildTests/StaticAnalysisTest/makefile index 766bf080ce..44c7d5f820 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 3144c87ad4..18606eaf1c 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h +++ b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include - #include "MassStorage.h" - #include "Descriptors.h" + #include "../MassStorage.h" + #include "../Descriptors.h" #include #include diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h index 635bd067fb..d446623821 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h +++ b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h @@ -42,8 +42,8 @@ #include - #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 8ef430aa5a..f7552dc4a8 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include - #include "MassStorageKeyboard.h" - #include "Descriptors.h" + #include "../MassStorageKeyboard.h" + #include "../Descriptors.h" #include #include diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h index cc4581dea8..5c3d3bf97c 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h @@ -42,8 +42,8 @@ #include - #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 dbcbb5dde2..1d12386587 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.h +++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include - #include "VirtualSerialMassStorage.h" - #include "Descriptors.h" + #include "../VirtualSerialMassStorage.h" + #include "../Descriptors.h" #include #include diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h index 214ddafb5f..83d5646c48 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h +++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.h @@ -42,8 +42,8 @@ #include - #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 963164bc92..4f4b5c170b 100644 --- a/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.h +++ b/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.h @@ -36,7 +36,7 @@ #include #include - #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 ab68049f93..d70a86c19e 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h +++ b/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include - #include "MassStorage.h" - #include "Descriptors.h" + #include "../MassStorage.h" + #include "../Descriptors.h" #include #include diff --git a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.h b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.h index 244daaa914..b0065cd13b 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.h +++ b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.h @@ -44,8 +44,8 @@ #include #include - #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 cd2ff55787..8bf8bdfaf2 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h @@ -40,7 +40,7 @@ #include #include - #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 5e4e04da41..5b050e8b12 100644 --- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h +++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h @@ -39,7 +39,7 @@ /* Includes: */ #include - #include "MassStorageHost.h" + #include "../MassStorageHost.h" #include diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h index f470907e6c..d353477dac 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h +++ b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include - #include "StandaloneProgrammer.h" - #include "Descriptors.h" + #include "../StandaloneProgrammer.h" + #include "../Descriptors.h" #include #include diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h index 955a8fec9c..a0940a796a 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h +++ b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h @@ -42,8 +42,8 @@ #include - #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 f93d505898..5d598cad59 100644 --- a/Projects/TempDataLogger/Lib/DataflashManager.h +++ b/Projects/TempDataLogger/Lib/DataflashManager.h @@ -39,8 +39,8 @@ /* Includes: */ #include - #include "TempDataLogger.h" - #include "Descriptors.h" + #include "../TempDataLogger.h" + #include "../Descriptors.h" #include #include diff --git a/Projects/Webserver/Lib/DataflashManager.h b/Projects/Webserver/Lib/DataflashManager.h index bdc27a2a0f..af76f7f629 100644 --- a/Projects/Webserver/Lib/DataflashManager.h +++ b/Projects/Webserver/Lib/DataflashManager.h @@ -39,7 +39,7 @@ /* Includes: */ #include - #include "Descriptors.h" + #include "../Descriptors.h" #include #include diff --git a/Projects/Webserver/Lib/uIPManagement.h b/Projects/Webserver/Lib/uIPManagement.h index d51df090b6..390d3c4480 100644 --- a/Projects/Webserver/Lib/uIPManagement.h +++ b/Projects/Webserver/Lib/uIPManagement.h @@ -44,10 +44,10 @@ #include #include - #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). */