diff options
Diffstat (limited to 'Demos/Device/LowLevel')
-rw-r--r-- | Demos/Device/LowLevel/AudioInput/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/AudioOutput/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/DualVirtualSerial/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/GenericHID/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/Joystick/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/Keyboard/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/KeyboardMouse/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/MIDI/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/MassStorage/Lib/SCSI.c | 4 | ||||
-rw-r--r-- | Demos/Device/LowLevel/MassStorage/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/Mouse/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/RNDISEthernet/makefile | 1 | ||||
-rw-r--r-- | Demos/Device/LowLevel/VirtualSerial/makefile | 3 |
13 files changed, 15 insertions, 3 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/makefile b/Demos/Device/LowLevel/AudioInput/makefile index e143e8f3d3..097b50a971 100644 --- a/Demos/Device/LowLevel/AudioInput/makefile +++ b/Demos/Device/LowLevel/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/LowLevel/AudioOutput/makefile b/Demos/Device/LowLevel/AudioOutput/makefile index a6a93c1404..4f401813ba 100644 --- a/Demos/Device/LowLevel/AudioOutput/makefile +++ b/Demos/Device/LowLevel/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/LowLevel/DualVirtualSerial/makefile b/Demos/Device/LowLevel/DualVirtualSerial/makefile index 42feb0de9d..5e39dd33fb 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/makefile +++ b/Demos/Device/LowLevel/DualVirtualSerial/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/LowLevel/GenericHID/makefile b/Demos/Device/LowLevel/GenericHID/makefile index 48c68edaa4..5a9d114054 100644 --- a/Demos/Device/LowLevel/GenericHID/makefile +++ b/Demos/Device/LowLevel/GenericHID/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/LowLevel/Joystick/makefile b/Demos/Device/LowLevel/Joystick/makefile index 11f3fa3c72..1dfd71cdcd 100644 --- a/Demos/Device/LowLevel/Joystick/makefile +++ b/Demos/Device/LowLevel/Joystick/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/LowLevel/Keyboard/makefile b/Demos/Device/LowLevel/Keyboard/makefile index 4c23fa9115..6783aaaf6d 100644 --- a/Demos/Device/LowLevel/Keyboard/makefile +++ b/Demos/Device/LowLevel/Keyboard/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/LowLevel/KeyboardMouse/makefile b/Demos/Device/LowLevel/KeyboardMouse/makefile index ca51e506e0..ffa6c2d650 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/makefile +++ b/Demos/Device/LowLevel/KeyboardMouse/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/LowLevel/MIDI/makefile b/Demos/Device/LowLevel/MIDI/makefile index a9985dba26..ffcd08bd19 100644 --- a/Demos/Device/LowLevel/MIDI/makefile +++ b/Demos/Device/LowLevel/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/LowLevel/MassStorage/Lib/SCSI.c b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c index 46c71c35cf..05c9265dd3 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c +++ b/Demos/Device/LowLevel/MassStorage/Lib/SCSI.c @@ -136,7 +136,7 @@ bool SCSI_DecodeSCSICommand(void) */ static void SCSI_Command_Inquiry(void) { - uint16_t AllocationLength = SwapEndian_16(*(uint32_t*)&CommandBlock.SCSICommandData[3]); + uint16_t AllocationLength = SwapEndian_16(*(uint16_t*)&CommandBlock.SCSICommandData[3]); uint16_t BytesTransferred = (AllocationLength < sizeof(InquiryData))? AllocationLength : sizeof(InquiryData); @@ -259,7 +259,7 @@ static void SCSI_Command_ReadWrite_10(const bool IsDataRead) BlockAddress = SwapEndian_32(*(uint32_t*)&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*)&CommandBlock.SCSICommandData[7]); + TotalBlocks = SwapEndian_16(*(uint16_t*)&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/LowLevel/MassStorage/makefile b/Demos/Device/LowLevel/MassStorage/makefile index 6d0163db7a..1680e501f4 100644 --- a/Demos/Device/LowLevel/MassStorage/makefile +++ b/Demos/Device/LowLevel/MassStorage/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/LowLevel/Mouse/makefile b/Demos/Device/LowLevel/Mouse/makefile index 27a9718f12..75b6a35714 100644 --- a/Demos/Device/LowLevel/Mouse/makefile +++ b/Demos/Device/LowLevel/Mouse/makefile @@ -212,6 +212,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/LowLevel/RNDISEthernet/makefile b/Demos/Device/LowLevel/RNDISEthernet/makefile index 883e8a5142..f44e60a496 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/makefile +++ b/Demos/Device/LowLevel/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/LowLevel/VirtualSerial/makefile b/Demos/Device/LowLevel/VirtualSerial/makefile index 9cfd8656fa..32d3a4b814 100644 --- a/Demos/Device/LowLevel/VirtualSerial/makefile +++ b/Demos/Device/LowLevel/VirtualSerial/makefile @@ -210,9 +210,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 |