Test with -Wextra, fix library warnings due to unused function parameters.
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 13 Dec 2009 14:43:34 +0000 (14:43 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 13 Dec 2009 14:43:34 +0000 (14:43 +0000)
13 files changed:
Demos/Host/ClassDriver/MassStorageHost/makefile
LUFA/Drivers/Peripheral/SerialStream.c
LUFA/Drivers/USB/Class/Device/Audio.c
LUFA/Drivers/USB/Class/Device/Audio.h
LUFA/Drivers/USB/Class/Device/MIDI.c
LUFA/Drivers/USB/Class/Device/RNDIS.c
LUFA/Drivers/USB/Class/Host/HID.c
LUFA/Drivers/USB/Class/Host/MIDI.c
LUFA/Drivers/USB/Class/Host/MassStorage.c
LUFA/Drivers/USB/Class/Host/Printer.c
LUFA/Drivers/USB/Class/Host/RNDIS.c
LUFA/Drivers/USB/Class/Host/StillImage.c
LUFA/ManPages/ChangeLog.txt

index 88d5cf2..af3f577 100644 (file)
@@ -116,7 +116,7 @@ LUFA_PATH = ../../../..
 \r
 \r
 # LUFA library compile-time options\r
 \r
 \r
 # LUFA library compile-time options\r
-LUFA_OPTS  = -D USB_HOST_ONLY\r
+LUFA_OPTS  = -D USB_HOST_ONLY -Wextra\r
 LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
 LUFA_OPTS += -D USB_STREAM_TIMEOUT_MS=5000\r
 \r
 LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
 LUFA_OPTS += -D USB_STREAM_TIMEOUT_MS=5000\r
 \r
index f8839c9..0e7b24c 100644 (file)
@@ -35,12 +35,15 @@ FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _
 \r
 static int SerialStream_TxByte(char DataByte, FILE *Stream)\r
 {\r
 \r
 static int SerialStream_TxByte(char DataByte, FILE *Stream)\r
 {\r
+       (void)Stream;\r
+       \r
        Serial_TxByte(DataByte);\r
        Serial_TxByte(DataByte);\r
-\r
        return 0;\r
 }\r
 \r
 static int SerialStream_RxByte(FILE *Stream)\r
 {\r
        return 0;\r
 }\r
 \r
 static int SerialStream_RxByte(FILE *Stream)\r
 {\r
+       (void)Stream;\r
+\r
        return Serial_RxByte();\r
 }\r
        return Serial_RxByte();\r
 }\r
index abc7546..8f59980 100644 (file)
@@ -86,7 +86,7 @@ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* AudioInterfac
 \r
 void Audio_Device_USBTask(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)\r
 {\r
 \r
 void Audio_Device_USBTask(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)\r
 {\r
-\r
+       (void)AudioInterfaceInfo;\r
 }\r
 \r
 bool Audio_Device_IsSampleReceived(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)\r
 }\r
 \r
 bool Audio_Device_IsSampleReceived(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)\r
index 25ac6ef..cf79e15 100644 (file)
                        static inline int8_t Audio_Device_ReadSample8(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)\r
                        {\r
                                int8_t Sample;\r
                        static inline int8_t Audio_Device_ReadSample8(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)\r
                        {\r
                                int8_t Sample;\r
+                               \r
+                               (void)AudioInterfaceInfo;\r
 \r
                                Sample = Endpoint_Read_Byte();\r
 \r
 \r
                                Sample = Endpoint_Read_Byte();\r
 \r
                        {\r
                                int16_t Sample;\r
 \r
                        {\r
                                int16_t Sample;\r
 \r
+                               (void)AudioInterfaceInfo;\r
+\r
                                Sample = (int16_t)Endpoint_Read_Word_LE();\r
                                          \r
                                if (!(Endpoint_BytesInEndpoint()))\r
                                Sample = (int16_t)Endpoint_Read_Word_LE();\r
                                          \r
                                if (!(Endpoint_BytesInEndpoint()))\r
                        {\r
                                int32_t Sample;\r
 \r
                        {\r
                                int32_t Sample;\r
 \r
+                               (void)AudioInterfaceInfo;\r
+\r
                                Sample = (((uint32_t)Endpoint_Read_Byte() << 16) | Endpoint_Read_Word_LE());\r
                                          \r
                                if (!(Endpoint_BytesInEndpoint()))\r
                                Sample = (((uint32_t)Endpoint_Read_Byte() << 16) | Endpoint_Read_Word_LE());\r
                                          \r
                                if (!(Endpoint_BytesInEndpoint()))\r
index b49bb73..60119d2 100644 (file)
@@ -67,7 +67,7 @@ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter
 \r
 void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)\r
 {\r
 \r
 void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)\r
 {\r
-\r
+       (void)MIDIInterfaceInfo;\r
 }\r
 \r
 uint8_t MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)\r
 }\r
 \r
 uint8_t MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)\r
index 2b75641..44a895d 100644 (file)
@@ -335,6 +335,9 @@ static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RN
                                           const uint32_t OId, void* const QueryData, const uint16_t QuerySize,\r
                                           void* ResponseData, uint16_t* const ResponseSize)\r
 {\r
                                           const uint32_t OId, void* const QueryData, const uint16_t QuerySize,\r
                                           void* ResponseData, uint16_t* const ResponseSize)\r
 {\r
+       (void)QueryData;\r
+       (void)QuerySize;\r
+\r
        switch (OId)\r
        {\r
                case OID_GEN_SUPPORTED_LIST:\r
        switch (OId)\r
        {\r
                case OID_GEN_SUPPORTED_LIST:\r
@@ -443,9 +446,11 @@ static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RN
        }\r
 }\r
 \r
        }\r
 }\r
 \r
-static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, const uint32_t OId, void* SetData,\r
-                                        const uint16_t SetSize)\r
+static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, const uint32_t OId,\r
+                                        void* SetData, const uint16_t SetSize)\r
 {\r
 {\r
+       (void)SetSize;\r
+\r
        switch (OId)\r
        {\r
                case OID_GEN_CURRENT_PACKET_FILTER:\r
        switch (OId)\r
        {\r
                case OID_GEN_CURRENT_PACKET_FILTER:\r
index 9c02b69..75b37b0 100644 (file)
@@ -152,7 +152,7 @@ static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescri
 \r
 void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)\r
 {\r
 \r
 void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)\r
 {\r
-\r
+       (void)HIDInterfaceInfo;\r
 }\r
 \r
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)\r
 }\r
 \r
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)\r
index 104c738..f5bf4ac 100644 (file)
@@ -124,7 +124,7 @@ static uint8_t DComp_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const Current
 \r
 void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)\r
 {\r
 \r
 void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)\r
 {\r
-\r
+       (void)MIDIInterfaceInfo;\r
 }\r
 \r
 uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)\r
 }\r
 \r
 uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)\r
@@ -134,7 +134,7 @@ uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterface
        \r
        Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipeNumber);\r
 \r
        \r
        Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipeNumber);\r
 \r
-       if (Pipe_IsReadWriteAllowed());\r
+       if (Pipe_IsReadWriteAllowed())\r
        {\r
                uint8_t ErrorCode;\r
 \r
        {\r
                uint8_t ErrorCode;\r
 \r
index ca07175..59057ed 100644 (file)
@@ -129,7 +129,7 @@ static uint8_t DComp_NextMSInterfaceEndpoint(void* const CurrentDescriptor)
 \r
 void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)\r
 {\r
 \r
 void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)\r
 {\r
-       \r
+       (void)MSInterfaceInfo;\r
 }\r
 \r
 static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, MS_CommandBlockWrapper_t* const SCSICommandBlock,\r
 }\r
 \r
 static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, MS_CommandBlockWrapper_t* const SCSICommandBlock,\r
index cb9bd6e..788c0b5 100644 (file)
@@ -124,7 +124,7 @@ static uint8_t DComp_NextPRNTInterfaceEndpoint(void* CurrentDescriptor)
 \r
 void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)\r
 {\r
 \r
 void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)\r
 {\r
-       \r
+       (void)PRNTInterfaceInfo;\r
 }\r
 \r
 uint8_t PRNT_Host_SetBidirectionalMode(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)\r
 }\r
 \r
 uint8_t PRNT_Host_SetBidirectionalMode(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)\r
index b226748..1e85bd0 100644 (file)
@@ -207,7 +207,7 @@ static uint8_t DComp_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDe
 \r
 void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo)\r
 {\r
 \r
 void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo)\r
 {\r
-\r
+       (void)RNDISInterfaceInfo;\r
 }\r
 \r
 static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,\r
 }\r
 \r
 static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,\r
index 5a958cf..67d5cde 100644 (file)
@@ -144,7 +144,7 @@ uint8_t DComp_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor)
 \r
 void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)\r
 {\r
 \r
 void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)\r
 {\r
-\r
+       (void)SIInterfaceInfo;\r
 }\r
 \r
 static uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader)\r
 }\r
 \r
 static uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader)\r
index 99cb773..791a170 100644 (file)
@@ -59,6 +59,8 @@
   *  - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow \r
   *    devices from timing out the data pipes\r
   *  - Fixed the definition of the Endpoint_BytesInEndpoint() macro for the U4 series AVR parts\r
   *  - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow \r
   *    devices from timing out the data pipes\r
   *  - Fixed the definition of the Endpoint_BytesInEndpoint() macro for the U4 series AVR parts\r
+  *  - Fixed MIDI host Class driver MIDI_Host_SendEventPacket() routine not properly checking for Pipe ready before writing\r
+  *  - Fixed use of deprecated struct initializers, removed library unused parameter warnings when compiled with -Wextra enabled\r
   *\r
   *  \section Sec_ChangeLog091122 Version 091122\r
   *\r
   *\r
   *  \section Sec_ChangeLog091122 Version 091122\r
   *\r