aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-03-25 12:12:08 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-03-25 12:12:08 +0000
commit00b6b0140fa76845edaa894e0feb3287e4977c73 (patch)
treedb1f24ab756c218a75f0b6049b0267ca9fea7489
parent0424bd4dbc8a6a22310e4081d2d5dc852a92ea4c (diff)
downloadlufa-00b6b0140fa76845edaa894e0feb3287e4977c73.tar.gz
lufa-00b6b0140fa76845edaa894e0feb3287e4977c73.tar.bz2
lufa-00b6b0140fa76845edaa894e0feb3287e4977c73.zip
Re-enable cppcheck static analysis unused function checks after adding in special-case suppressions to the event stub functions. Add missing function prototypes to the AudioInput and AudioOutput class driver device demos.
-rw-r--r--Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c11
-rw-r--r--BuildTests/StaticAnalysisTest/makefile1
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.h14
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/AudioOutput.h12
-rw-r--r--LUFA/DoxygenPages/LUFAPoweredProjects.txt1
-rw-r--r--LUFA/Drivers/USB/Class/Device/AudioClassDevice.c1
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDCClassDevice.c1
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDCClassHost.c1
-rw-r--r--LUFA/Drivers/USB/Core/Events.c1
9 files changed, 29 insertions, 14 deletions
diff --git a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c
index 200f40682..6063e1981 100644
--- a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c
+++ b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c
@@ -395,17 +395,6 @@ int write_usb_device(HANDLE h, void *buf, int len, int timeout)
return 1;
}
-void print_win32_err(void)
-{
- char buf[256];
- DWORD err;
-
- err = GetLastError();
- FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
- 0, buf, sizeof(buf), NULL);
- printf("err %ld: %s\n", err, buf);
-}
-
static HANDLE win32_teensy_handle = NULL;
int teensy_open(void)
diff --git a/BuildTests/StaticAnalysisTest/makefile b/BuildTests/StaticAnalysisTest/makefile
index 474b25979..d447d1999 100644
--- a/BuildTests/StaticAnalysisTest/makefile
+++ b/BuildTests/StaticAnalysisTest/makefile
@@ -21,7 +21,6 @@ MESSAGE_TEMPLATE = "{file}:{line}: {severity} ({id}): {message}"
# Checks to suppress so that generated warnings are discarded
SUPPRESS_WARNINGS = variableScope \
- unusedFunction \
missingInclude
# Extra paths to search for include files
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.h b/Demos/Device/ClassDriver/AudioInput/AudioInput.h
index 8a6812cf4..8eac645ce 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.h
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.h
@@ -82,6 +82,18 @@
void EVENT_USB_Device_Disconnect(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_ControlRequest(void);
-
+
+ void CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
+ const uint8_t Property,
+ const uint8_t EntityAddress,
+ const uint16_t Parameter,
+ uint16_t* const DataLength,
+ uint8_t* Data);
+ bool CALLBACK_Audio_Device_GetSetInterfaceProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
+ const uint8_t Property,
+ const uint8_t EntityAddress,
+ const uint16_t Parameter,
+ uint16_t* const DataLength,
+ uint8_t* Data);
#endif
diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
index ce31499b5..a26402cc2 100644
--- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
+++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
@@ -70,5 +70,17 @@
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_ControlRequest(void);
+ void CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
+ const uint8_t Property,
+ const uint8_t EntityAddress,
+ const uint16_t Parameter,
+ uint16_t* const DataLength,
+ uint8_t* Data);
+ bool CALLBACK_Audio_Device_GetSetInterfaceProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
+ const uint8_t Property,
+ const uint8_t EntityAddress,
+ const uint16_t Parameter,
+ uint16_t* const DataLength,
+ uint8_t* Data);
#endif
diff --git a/LUFA/DoxygenPages/LUFAPoweredProjects.txt b/LUFA/DoxygenPages/LUFAPoweredProjects.txt
index be5465081..fea7debb4 100644
--- a/LUFA/DoxygenPages/LUFAPoweredProjects.txt
+++ b/LUFA/DoxygenPages/LUFAPoweredProjects.txt
@@ -36,7 +36,6 @@
* The following are known hobbyist projects using LUFA. Most are open source, and show off interesting ways that the LUFA library
* can be incorporated into many different applications.
*
- * - Accelerometer Game Joystick: http://www.crictor.co.il/he/episodes/joystick/
* - Arcade Controller: http://fletchtronics.net/arcade-controller-made-petunia
* - Arcade Joystick: http://jamie.lentin.co.uk/embedded/arcade-joystick/
* - AttoBasic AVR BASIC interpreter: http://www.cappels.org/dproj/AttoBasic2_1/AttoBasic_2.1_with_USB_and_Arduino_support.html
diff --git a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
index 7a1f4b206..15fcd588d 100644
--- a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
@@ -211,6 +211,7 @@ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioIn
return true;
}
+// cppcheck-suppress unusedFunction
void Audio_Device_Event_Stub(void)
{
diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
index f0ddfcd96..5b5343860 100644
--- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c
@@ -352,6 +352,7 @@ static int CDC_Device_getchar_Blocking(FILE* Stream)
}
#endif
+// cppcheck-suppress unusedFunction
void CDC_Device_Event_Stub(void)
{
diff --git a/LUFA/Drivers/USB/Class/Host/CDCClassHost.c b/LUFA/Drivers/USB/Class/Host/CDCClassHost.c
index e1a972f39..63df6b0c5 100644
--- a/LUFA/Drivers/USB/Class/Host/CDCClassHost.c
+++ b/LUFA/Drivers/USB/Class/Host/CDCClassHost.c
@@ -504,6 +504,7 @@ static int CDC_Host_getchar_Blocking(FILE* Stream)
}
#endif
+// cppcheck-suppress unusedFunction
void CDC_Host_Event_Stub(void)
{
diff --git a/LUFA/Drivers/USB/Core/Events.c b/LUFA/Drivers/USB/Core/Events.c
index 5733aa838..227156548 100644
--- a/LUFA/Drivers/USB/Core/Events.c
+++ b/LUFA/Drivers/USB/Core/Events.c
@@ -32,6 +32,7 @@
#define __INCLUDE_FROM_USB_DRIVER
#include "Events.h"
+// cppcheck-suppress unusedFunction
void USB_Event_Stub(void)
{