diff options
author | Dean Camera <[email protected]> | 2010-07-15 17:13:33 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-07-15 17:13:33 +0000 |
commit | 9299735c75ba99347c7280b2e73064bef693989f (patch) | |
tree | e9034f3844a2dc1a2567d26c1ebe3c8407ca9493 /Projects | |
parent | f4710f6f8653219b432f3a843ce117d4f4c136fd (diff) | |
download | qmk_firmware-9299735c75ba99347c7280b2e73064bef693989f.tar.gz qmk_firmware-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 'Projects')
-rw-r--r-- | Projects/AVRISP-MKII/makefile | 1 | ||||
-rw-r--r-- | Projects/Benito/makefile | 1 | ||||
-rw-r--r-- | Projects/Incomplete/MIDIToneGenerator/makefile | 1 | ||||
-rw-r--r-- | Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c | 4 | ||||
-rw-r--r-- | Projects/Incomplete/StandaloneProgrammer/makefile | 1 | ||||
-rw-r--r-- | Projects/LEDNotifier/makefile | 1 | ||||
-rw-r--r-- | Projects/Magstripe/makefile | 3 | ||||
-rw-r--r-- | Projects/MissileLauncher/makefile | 1 | ||||
-rw-r--r-- | Projects/RelayBoard/makefile | 3 | ||||
-rw-r--r-- | Projects/TempDataLogger/Lib/SCSI.c | 4 | ||||
-rw-r--r-- | Projects/TempDataLogger/makefile | 1 | ||||
-rw-r--r-- | Projects/USBtoSerial/makefile | 1 | ||||
-rw-r--r-- | Projects/Webserver/Lib/SCSI.c | 4 | ||||
-rw-r--r-- | Projects/Webserver/makefile | 1 | ||||
-rw-r--r-- | Projects/XPLAINBridge/makefile | 1 |
15 files changed, 20 insertions, 8 deletions
diff --git a/Projects/AVRISP-MKII/makefile b/Projects/AVRISP-MKII/makefile index 4ca9568c9a..f4f1893515 100644 --- a/Projects/AVRISP-MKII/makefile +++ b/Projects/AVRISP-MKII/makefile @@ -234,6 +234,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/Projects/Benito/makefile b/Projects/Benito/makefile index 256098e904..1af674dd62 100644 --- a/Projects/Benito/makefile +++ b/Projects/Benito/makefile @@ -219,6 +219,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/Projects/Incomplete/MIDIToneGenerator/makefile b/Projects/Incomplete/MIDIToneGenerator/makefile index 0ac97d2c13..bda5fafabe 100644 --- a/Projects/Incomplete/MIDIToneGenerator/makefile +++ b/Projects/Incomplete/MIDIToneGenerator/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/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c index c1b106cea5..f69ab649bd 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c +++ b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c @@ -139,7 +139,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) */ static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const 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); @@ -257,7 +257,7 @@ static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa 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 >= VIRTUAL_MEMORY_BLOCKS) diff --git a/Projects/Incomplete/StandaloneProgrammer/makefile b/Projects/Incomplete/StandaloneProgrammer/makefile index ac80cc603e..507c904b2e 100644 --- a/Projects/Incomplete/StandaloneProgrammer/makefile +++ b/Projects/Incomplete/StandaloneProgrammer/makefile @@ -223,6 +223,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/Projects/LEDNotifier/makefile b/Projects/LEDNotifier/makefile index 805dac404a..5b3e476894 100644 --- a/Projects/LEDNotifier/makefile +++ b/Projects/LEDNotifier/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/Projects/Magstripe/makefile b/Projects/Magstripe/makefile index 8342466cb9..d6f2bd074d 100644 --- a/Projects/Magstripe/makefile +++ b/Projects/Magstripe/makefile @@ -220,10 +220,11 @@ CFLAGS += $(CDEFS) CFLAGS += -O$(OPT) CFLAGS += -funsigned-char CFLAGS += -funsigned-bitfields +CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums -CFLAGS += -ffunction-sections +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Projects/MissileLauncher/makefile b/Projects/MissileLauncher/makefile index 831469b1de..c381803398 100644 --- a/Projects/MissileLauncher/makefile +++ b/Projects/MissileLauncher/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/Projects/RelayBoard/makefile b/Projects/RelayBoard/makefile index 675844630e..b64169a67e 100644 --- a/Projects/RelayBoard/makefile +++ b/Projects/RelayBoard/makefile @@ -208,10 +208,11 @@ CFLAGS += $(CDEFS) CFLAGS += -O$(OPT) CFLAGS += -funsigned-char CFLAGS += -funsigned-bitfields +CFLAGS += -ffunction-sections CFLAGS += -fno-inline-small-functions CFLAGS += -fpack-struct CFLAGS += -fshort-enums -CFLAGS += -ffunction-sections +CFLAGS += -fno-strict-aliasing CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef diff --git a/Projects/TempDataLogger/Lib/SCSI.c b/Projects/TempDataLogger/Lib/SCSI.c index 5606ac7cad..7bb66d3b6b 100644 --- a/Projects/TempDataLogger/Lib/SCSI.c +++ b/Projects/TempDataLogger/Lib/SCSI.c @@ -138,7 +138,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) */ static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const 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* const MSInterfa 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 >= VIRTUAL_MEMORY_BLOCKS) diff --git a/Projects/TempDataLogger/makefile b/Projects/TempDataLogger/makefile index 6e865eb045..65e483aff7 100644 --- a/Projects/TempDataLogger/makefile +++ b/Projects/TempDataLogger/makefile @@ -225,6 +225,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/Projects/USBtoSerial/makefile b/Projects/USBtoSerial/makefile index 1960169507..bb64484854 100644 --- a/Projects/USBtoSerial/makefile +++ b/Projects/USBtoSerial/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/Projects/Webserver/Lib/SCSI.c b/Projects/Webserver/Lib/SCSI.c index 5606ac7cad..7bb66d3b6b 100644 --- a/Projects/Webserver/Lib/SCSI.c +++ b/Projects/Webserver/Lib/SCSI.c @@ -138,7 +138,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) */ static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const 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* const MSInterfa 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 >= VIRTUAL_MEMORY_BLOCKS) diff --git a/Projects/Webserver/makefile b/Projects/Webserver/makefile index 643039cfcc..e9a37ff8a9 100644 --- a/Projects/Webserver/makefile +++ b/Projects/Webserver/makefile @@ -238,6 +238,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/Projects/XPLAINBridge/makefile b/Projects/XPLAINBridge/makefile index c2bff7eb61..9df8d1b037 100644 --- a/Projects/XPLAINBridge/makefile +++ b/Projects/XPLAINBridge/makefile @@ -236,6 +236,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 |