diff options
Diffstat (limited to 'Demos/Device/ClassDriver')
-rw-r--r-- | Demos/Device/ClassDriver/AudioInput/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/AudioOutput/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/DualVirtualSerial/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/GenericHID/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/Joystick/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/Keyboard/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/KeyboardMouse/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/MIDI/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c | 4 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/MassStorage/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c | 4 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/MassStorageKeyboard/makefile | 3 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/Mouse/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/RNDISEthernet/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/VirtualSerial/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/VirtualSerialMouse/makefile | 1 |
16 files changed, 19 insertions, 5 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/makefile b/Demos/Device/ClassDriver/AudioInput/makefile index bc94f6612..13779aad3 100644 --- a/Demos/Device/ClassDriver/AudioInput/makefile +++ b/Demos/Device/ClassDriver/AudioInput/makefile @@ -213,6 +213,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/AudioOutput/makefile b/Demos/Device/ClassDriver/AudioOutput/makefile index 25200e45a..7ce4dbfdc 100644 --- a/Demos/Device/ClassDriver/AudioOutput/makefile +++ b/Demos/Device/ClassDriver/AudioOutput/makefile @@ -214,6 +214,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/makefile b/Demos/Device/ClassDriver/DualVirtualSerial/makefile index c0d0e5a4f..cc39c9e18 100644 --- a/Demos/Device/ClassDriver/DualVirtualSerial/makefile +++ b/Demos/Device/ClassDriver/DualVirtualSerial/makefile @@ -214,6 +214,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/GenericHID/makefile b/Demos/Device/ClassDriver/GenericHID/makefile index b81f110cd..528ffa40a 100644 --- a/Demos/Device/ClassDriver/GenericHID/makefile +++ b/Demos/Device/ClassDriver/GenericHID/makefile @@ -215,6 +215,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/Joystick/makefile b/Demos/Device/ClassDriver/Joystick/makefile index 27967df70..623856bc9 100644 --- a/Demos/Device/ClassDriver/Joystick/makefile +++ b/Demos/Device/ClassDriver/Joystick/makefile @@ -215,6 +215,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/Keyboard/makefile b/Demos/Device/ClassDriver/Keyboard/makefile index 90599fb18..597dc44f6 100644 --- a/Demos/Device/ClassDriver/Keyboard/makefile +++ b/Demos/Device/ClassDriver/Keyboard/makefile @@ -215,6 +215,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/KeyboardMouse/makefile b/Demos/Device/ClassDriver/KeyboardMouse/makefile index 597fde477..3053be854 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/makefile +++ b/Demos/Device/ClassDriver/KeyboardMouse/makefile @@ -215,6 +215,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/MIDI/makefile b/Demos/Device/ClassDriver/MIDI/makefile index 5da65fd72..72f963d5f 100644 --- a/Demos/Device/ClassDriver/MIDI/makefile +++ b/Demos/Device/ClassDriver/MIDI/makefile @@ -213,6 +213,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c index 35d5b5952..f0796eaed 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c +++ b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c @@ -138,7 +138,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo) */ static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo) { - uint16_t AllocationLength = SwapEndian_16(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]); + uint16_t AllocationLength = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]); uint16_t BytesTransferred = (AllocationLength < sizeof(InquiryData))? AllocationLength : sizeof(InquiryData); @@ -256,7 +256,7 @@ static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]); /* Load in the 16-bit total blocks (SCSI uses big-endian, so have to reverse the byte order) */ - TotalBlocks = SwapEndian_16(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]); + TotalBlocks = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]); /* Check if the block address is outside the maximum allowable value for the LUN */ if (BlockAddress >= LUN_MEDIA_BLOCKS) diff --git a/Demos/Device/ClassDriver/MassStorage/makefile b/Demos/Device/ClassDriver/MassStorage/makefile index e94193a8c..47be38dbd 100644 --- a/Demos/Device/ClassDriver/MassStorage/makefile +++ b/Demos/Device/ClassDriver/MassStorage/makefile @@ -217,6 +217,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c index 15955a772..35a0ea7e7 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c @@ -148,7 +148,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo) */ static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo) { - uint16_t AllocationLength = SwapEndian_16(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]); + uint16_t AllocationLength = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]); uint16_t BytesTransferred = (AllocationLength < sizeof(InquiryData))? AllocationLength : sizeof(InquiryData); @@ -309,7 +309,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]); /* Load in the 16-bit total blocks (SCSI uses big-endian, so have to reverse the byte order) */ - TotalBlocks = SwapEndian_16(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]); + TotalBlocks = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]); /* Check if the block address is outside the maximum allowable value for the LUN */ if (BlockAddress >= LUN_MEDIA_BLOCKS) diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/makefile b/Demos/Device/ClassDriver/MassStorageKeyboard/makefile index 928aa0eb7..16d6712fd 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/makefile +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/makefile @@ -224,9 +224,10 @@ CFLAGS += -O$(OPT) CFLAGS += -funsigned-char CFLAGS += -funsigned-bitfields CFLAGS += -ffunction-sections +CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums -CFLAGS += -finline-limit=20 +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/Mouse/makefile b/Demos/Device/ClassDriver/Mouse/makefile index 81e7be756..9d5ba5438 100644 --- a/Demos/Device/ClassDriver/Mouse/makefile +++ b/Demos/Device/ClassDriver/Mouse/makefile @@ -215,6 +215,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes #CFLAGS += -mshort-calls diff --git a/Demos/Device/ClassDriver/RNDISEthernet/makefile b/Demos/Device/ClassDriver/RNDISEthernet/makefile index c2a8f3058..3cca06370 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/makefile +++ b/Demos/Device/ClassDriver/RNDISEthernet/makefile @@ -226,6 +226,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/VirtualSerial/makefile b/Demos/Device/ClassDriver/VirtualSerial/makefile index bcde14912..7ad4596cb 100644 --- a/Demos/Device/ClassDriver/VirtualSerial/makefile +++ b/Demos/Device/ClassDriver/VirtualSerial/makefile @@ -214,6 +214,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/makefile b/Demos/Device/ClassDriver/VirtualSerialMouse/makefile index c204d6299..7398cb6d0 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMouse/makefile +++ b/Demos/Device/ClassDriver/VirtualSerialMouse/makefile @@ -216,6 +216,7 @@ CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef |