forked from mfulz_github/qmk_firmware
Test with -Wextra, fix library warnings due to unused function parameters.
This commit is contained in:
parent
32b7762325
commit
6648234157
|
@ -116,7 +116,7 @@ LUFA_PATH = ../../../..
|
|||
|
||||
|
||||
# LUFA library compile-time options
|
||||
LUFA_OPTS = -D USB_HOST_ONLY
|
||||
LUFA_OPTS = -D USB_HOST_ONLY -Wextra
|
||||
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
|
||||
LUFA_OPTS += -D USB_STREAM_TIMEOUT_MS=5000
|
||||
|
||||
|
|
|
@ -35,12 +35,15 @@ FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _
|
|||
|
||||
static int SerialStream_TxByte(char DataByte, FILE *Stream)
|
||||
{
|
||||
Serial_TxByte(DataByte);
|
||||
(void)Stream;
|
||||
|
||||
Serial_TxByte(DataByte);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int SerialStream_RxByte(FILE *Stream)
|
||||
{
|
||||
(void)Stream;
|
||||
|
||||
return Serial_RxByte();
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* AudioInterfac
|
|||
|
||||
void Audio_Device_USBTask(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
|
||||
{
|
||||
|
||||
(void)AudioInterfaceInfo;
|
||||
}
|
||||
|
||||
bool Audio_Device_IsSampleReceived(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
|
||||
|
|
|
@ -153,6 +153,8 @@
|
|||
{
|
||||
int8_t Sample;
|
||||
|
||||
(void)AudioInterfaceInfo;
|
||||
|
||||
Sample = Endpoint_Read_Byte();
|
||||
|
||||
if (!(Endpoint_BytesInEndpoint()))
|
||||
|
@ -175,6 +177,8 @@
|
|||
{
|
||||
int16_t Sample;
|
||||
|
||||
(void)AudioInterfaceInfo;
|
||||
|
||||
Sample = (int16_t)Endpoint_Read_Word_LE();
|
||||
|
||||
if (!(Endpoint_BytesInEndpoint()))
|
||||
|
@ -196,6 +200,8 @@
|
|||
{
|
||||
int32_t Sample;
|
||||
|
||||
(void)AudioInterfaceInfo;
|
||||
|
||||
Sample = (((uint32_t)Endpoint_Read_Byte() << 16) | Endpoint_Read_Word_LE());
|
||||
|
||||
if (!(Endpoint_BytesInEndpoint()))
|
||||
|
|
|
@ -67,7 +67,7 @@ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter
|
|||
|
||||
void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
|
||||
{
|
||||
|
||||
(void)MIDIInterfaceInfo;
|
||||
}
|
||||
|
||||
uint8_t MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
|
||||
|
|
|
@ -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,
|
||||
void* ResponseData, uint16_t* const ResponseSize)
|
||||
{
|
||||
(void)QueryData;
|
||||
(void)QuerySize;
|
||||
|
||||
switch (OId)
|
||||
{
|
||||
case OID_GEN_SUPPORTED_LIST:
|
||||
|
@ -443,9 +446,11 @@ static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RN
|
|||
}
|
||||
}
|
||||
|
||||
static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, const uint32_t OId, void* SetData,
|
||||
const uint16_t SetSize)
|
||||
static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, const uint32_t OId,
|
||||
void* SetData, const uint16_t SetSize)
|
||||
{
|
||||
(void)SetSize;
|
||||
|
||||
switch (OId)
|
||||
{
|
||||
case OID_GEN_CURRENT_PACKET_FILTER:
|
||||
|
|
|
@ -152,7 +152,7 @@ static uint8_t DComp_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescri
|
|||
|
||||
void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)
|
||||
{
|
||||
|
||||
(void)HIDInterfaceInfo;
|
||||
}
|
||||
|
||||
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
|
||||
|
|
|
@ -124,7 +124,7 @@ static uint8_t DComp_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const Current
|
|||
|
||||
void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
|
||||
{
|
||||
|
||||
(void)MIDIInterfaceInfo;
|
||||
}
|
||||
|
||||
uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
|
||||
|
@ -134,7 +134,7 @@ uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterface
|
|||
|
||||
Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipeNumber);
|
||||
|
||||
if (Pipe_IsReadWriteAllowed());
|
||||
if (Pipe_IsReadWriteAllowed())
|
||||
{
|
||||
uint8_t ErrorCode;
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ static uint8_t DComp_NextMSInterfaceEndpoint(void* const CurrentDescriptor)
|
|||
|
||||
void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
|
||||
{
|
||||
|
||||
(void)MSInterfaceInfo;
|
||||
}
|
||||
|
||||
static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, MS_CommandBlockWrapper_t* const SCSICommandBlock,
|
||||
|
|
|
@ -124,7 +124,7 @@ static uint8_t DComp_NextPRNTInterfaceEndpoint(void* CurrentDescriptor)
|
|||
|
||||
void PRNT_Host_USBTask(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
|
||||
{
|
||||
|
||||
(void)PRNTInterfaceInfo;
|
||||
}
|
||||
|
||||
uint8_t PRNT_Host_SetBidirectionalMode(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
|
||||
|
|
|
@ -207,7 +207,7 @@ static uint8_t DComp_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDe
|
|||
|
||||
void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo)
|
||||
{
|
||||
|
||||
(void)RNDISInterfaceInfo;
|
||||
}
|
||||
|
||||
static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
|
||||
|
|
|
@ -144,7 +144,7 @@ uint8_t DComp_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor)
|
|||
|
||||
void SImage_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
|
||||
{
|
||||
|
||||
(void)SIInterfaceInfo;
|
||||
}
|
||||
|
||||
static uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader)
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
* - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow
|
||||
* devices from timing out the data pipes
|
||||
* - Fixed the definition of the Endpoint_BytesInEndpoint() macro for the U4 series AVR parts
|
||||
* - Fixed MIDI host Class driver MIDI_Host_SendEventPacket() routine not properly checking for Pipe ready before writing
|
||||
* - Fixed use of deprecated struct initializers, removed library unused parameter warnings when compiled with -Wextra enabled
|
||||
*
|
||||
* \section Sec_ChangeLog091122 Version 091122
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue