aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-12-13 14:09:25 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-12-13 14:09:25 +0000
commit3705330dd32f54cf15842511b7657d2f321c11ad (patch)
tree5efa5e70e4a7d338befde10772f6a73ba80c69d3 /LUFA
parent307ba254d5ef8bcdd9b9aa1bdb277041e79d6563 (diff)
downloadlufa-3705330dd32f54cf15842511b7657d2f321c11ad.tar.gz
lufa-3705330dd32f54cf15842511b7657d2f321c11ad.tar.bz2
lufa-3705330dd32f54cf15842511b7657d2f321c11ad.zip
Use -pedantic compile time option to find and correct several minor code errors.
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/DriverStubs/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/BUMBLEB/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/EVK527/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/STK525/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/STK526/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/USBKEY/Joystick.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/Printer.c40
-rw-r--r--LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h2
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.c20
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.h2
10 files changed, 38 insertions, 38 deletions
diff --git a/LUFA/DriverStubs/Joystick.h b/LUFA/DriverStubs/Joystick.h
index a09f8db9b..ce193f55b 100644
--- a/LUFA/DriverStubs/Joystick.h
+++ b/LUFA/DriverStubs/Joystick.h
@@ -80,7 +80,7 @@
static inline void Joystick_Init(void)
{
// TODO: Initialize joystick port pins as inputs with pull-ups
- };
+ }
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
diff --git a/LUFA/Drivers/Board/BUMBLEB/Joystick.h b/LUFA/Drivers/Board/BUMBLEB/Joystick.h
index edcf5320f..8723771e5 100644
--- a/LUFA/Drivers/Board/BUMBLEB/Joystick.h
+++ b/LUFA/Drivers/Board/BUMBLEB/Joystick.h
@@ -90,7 +90,7 @@
{
DDRD &= ~JOY_MASK;
PORTD |= JOY_MASK;
- };
+ }
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
diff --git a/LUFA/Drivers/Board/EVK527/Joystick.h b/LUFA/Drivers/Board/EVK527/Joystick.h
index ae90c2be6..c73c0ad9b 100644
--- a/LUFA/Drivers/Board/EVK527/Joystick.h
+++ b/LUFA/Drivers/Board/EVK527/Joystick.h
@@ -93,7 +93,7 @@
PORTF |= JOY_FMASK;
PORTC |= JOY_CMASK;
- };
+ }
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
diff --git a/LUFA/Drivers/Board/STK525/Joystick.h b/LUFA/Drivers/Board/STK525/Joystick.h
index b74655eca..2de765522 100644
--- a/LUFA/Drivers/Board/STK525/Joystick.h
+++ b/LUFA/Drivers/Board/STK525/Joystick.h
@@ -93,7 +93,7 @@
PORTB |= JOY_BMASK;
PORTE |= JOY_EMASK;
- };
+ }
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
diff --git a/LUFA/Drivers/Board/STK526/Joystick.h b/LUFA/Drivers/Board/STK526/Joystick.h
index c15b21284..3b021dea8 100644
--- a/LUFA/Drivers/Board/STK526/Joystick.h
+++ b/LUFA/Drivers/Board/STK526/Joystick.h
@@ -90,7 +90,7 @@
DDRB &= ~JOY_BMASK;
PORTB |= JOY_BMASK;
- };
+ }
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
diff --git a/LUFA/Drivers/Board/USBKEY/Joystick.h b/LUFA/Drivers/Board/USBKEY/Joystick.h
index 332dd56a3..7bc140dbb 100644
--- a/LUFA/Drivers/Board/USBKEY/Joystick.h
+++ b/LUFA/Drivers/Board/USBKEY/Joystick.h
@@ -93,7 +93,7 @@
PORTB |= JOY_BMASK;
PORTE |= JOY_EMASK;
- };
+ }
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.c b/LUFA/Drivers/USB/Class/Host/Printer.c
index d85ac15cf..cb9bd6ec9 100644
--- a/LUFA/Drivers/USB/Class/Host/Printer.c
+++ b/LUFA/Drivers/USB/Class/Host/Printer.c
@@ -135,11 +135,11 @@ uint8_t PRNT_Host_SetBidirectionalMode(USB_ClassInfo_PRNT_Host_t* const PRNTInte
USB_ControlRequest = (USB_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_INTERFACE),
- bRequest: REQ_SetInterface,
- wValue: PRNTInterfaceInfo->State.AlternateSetting,
- wIndex: PRNTInterfaceInfo->State.InterfaceNumber,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_INTERFACE),
+ .bRequest = REQ_SetInterface,
+ .wValue = PRNTInterfaceInfo->State.AlternateSetting,
+ .wIndex = PRNTInterfaceInfo->State.InterfaceNumber,
+ .wLength = 0,
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
@@ -155,11 +155,11 @@ uint8_t PRNT_Host_GetPortStatus(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceIn
{
USB_ControlRequest = (USB_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- bRequest: REQ_GetPortStatus,
- wValue: 0,
- wIndex: PRNTInterfaceInfo->State.InterfaceNumber,
- wLength: sizeof(uint8_t),
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bRequest = REQ_GetPortStatus,
+ .wValue = 0,
+ .wIndex = PRNTInterfaceInfo->State.InterfaceNumber,
+ .wLength = sizeof(uint8_t),
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
@@ -171,11 +171,11 @@ uint8_t PRNT_Host_SoftReset(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
{
USB_ControlRequest = (USB_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
- bRequest: REQ_SoftReset,
- wValue: 0,
- wIndex: PRNTInterfaceInfo->State.InterfaceNumber,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bRequest = REQ_SoftReset,
+ .wValue = 0,
+ .wIndex = PRNTInterfaceInfo->State.InterfaceNumber,
+ .wLength = 0,
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
@@ -215,11 +215,11 @@ uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo
USB_ControlRequest = (USB_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- bRequest: REQ_GetDeviceID,
- wValue: 0,
- wIndex: PRNTInterfaceInfo->State.InterfaceNumber,
- wLength: sizeof(DeviceIDStringLength),
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bRequest = REQ_GetDeviceID,
+ .wValue = 0,
+ .wIndex = PRNTInterfaceInfo->State.InterfaceNumber,
+ .wLength = sizeof(DeviceIDStringLength),
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
index 84a6f0cf0..1b73ec34d 100644
--- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
+++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
@@ -263,7 +263,7 @@
{
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
- *CurrConfigLoc += CurrDescriptorSize;
+ *((uint8_t**)CurrConfigLoc) += CurrDescriptorSize;
*BytesRem -= CurrDescriptorSize;
}
diff --git a/LUFA/Drivers/USB/LowLevel/Host.c b/LUFA/Drivers/USB/LowLevel/Host.c
index e10d34781..6d425b2d5 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.c
+++ b/LUFA/Drivers/USB/LowLevel/Host.c
@@ -296,11 +296,11 @@ uint8_t USB_Host_GetDeviceDescriptor(void* const DeviceDescriptorPtr)
{
USB_ControlRequest = (USB_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_GetDescriptor,
- wValue: (DTYPE_Device << 8),
- wIndex: 0,
- wLength: sizeof(USB_Descriptor_Device_t),
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_GetDescriptor,
+ .wValue = (DTYPE_Device << 8),
+ .wIndex = 0,
+ .wLength = sizeof(USB_Descriptor_Device_t),
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
@@ -312,11 +312,11 @@ uint8_t USB_Host_GetDeviceStringDescriptor(uint8_t Index, void* const Buffer, ui
{
USB_ControlRequest = (USB_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_GetDescriptor,
- wValue: (DTYPE_String << 8) | Index,
- wIndex: 0,
- wLength: BufferLength,
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_GetDescriptor,
+ .wValue = (DTYPE_String << 8) | Index,
+ .wIndex = 0,
+ .wLength = BufferLength,
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h
index 97257d706..120576794 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.h
@@ -1032,7 +1032,7 @@
return (4 << EPSIZE0);
else
return (5 << EPSIZE0);
- };
+ }
#endif