aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-07-15 17:13:33 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-07-15 17:13:33 +0000
commit9299735c75ba99347c7280b2e73064bef693989f (patch)
treee9034f3844a2dc1a2567d26c1ebe3c8407ca9493 /Demos/Device/LowLevel
parentf4710f6f8653219b432f3a843ce117d4f4c136fd (diff)
downloadlufa-9299735c75ba99347c7280b2e73064bef693989f.tar.gz
lufa-9299735c75ba99347c7280b2e73064bef693989f.tar.bz2
lufa-9299735c75ba99347c7280b2e73064bef693989f.zip
Disable strict aliasing explicitly in the project makefiles, as this is apparently enabled by default in newer AVR-GCC builds, and aliasing is used heavily for type-punning through the LUFA and third party library's codebase.
Diffstat (limited to 'Demos/Device/LowLevel')
-rw-r--r--Demos/Device/LowLevel/AudioInput/makefile1
-rw-r--r--Demos/Device/LowLevel/AudioOutput/makefile1
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/makefile1
-rw-r--r--Demos/Device/LowLevel/GenericHID/makefile1
-rw-r--r--Demos/Device/LowLevel/Joystick/makefile1
-rw-r--r--Demos/Device/LowLevel/Keyboard/makefile1
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/makefile1
-rw-r--r--Demos/Device/LowLevel/MIDI/makefile1
-rw-r--r--Demos/Device/LowLevel/MassStorage/Lib/SCSI.c4
-rw-r--r--Demos/Device/LowLevel/MassStorage/makefile1
-rw-r--r--Demos/Device/LowLevel/Mouse/makefile1
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/makefile1
-rw-r--r--Demos/Device/LowLevel/VirtualSerial/makefile3
13 files changed, 15 insertions, 3 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/makefile b/Demos/Device/LowLevel/AudioInput/makefile
index e143e8f3d..097b50a97 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 a6a93c140..4f401813b 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 42feb0de9..5e39dd33f 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 48c68edaa..5a9d11405 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 11f3fa3c7..1dfd71cdc 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 4c23fa911..6783aaaf6 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 ca51e506e..ffa6c2d65 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 a9985dba2..ffcd08bd1 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 46c71c35c..05c9265dd 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 6d0163db7..1680e501f 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 27a9718f1..75b6a3571 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 883e8a514..f44e60a49 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 9cfd8656f..32d3a4b81 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