Disable strict aliasing explicitly in the project makefiles, as this is apparently...
authorDean Camera <dean@fourwalledcubicle.com>
Thu, 15 Jul 2010 17:13:33 +0000 (17:13 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Thu, 15 Jul 2010 17:13:33 +0000 (17:13 +0000)
72 files changed:
Bootloaders/CDC/makefile
Bootloaders/DFU/makefile
Demos/Device/ClassDriver/AudioInput/makefile
Demos/Device/ClassDriver/AudioOutput/makefile
Demos/Device/ClassDriver/DualVirtualSerial/makefile
Demos/Device/ClassDriver/GenericHID/makefile
Demos/Device/ClassDriver/Joystick/makefile
Demos/Device/ClassDriver/Keyboard/makefile
Demos/Device/ClassDriver/KeyboardMouse/makefile
Demos/Device/ClassDriver/MIDI/makefile
Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
Demos/Device/ClassDriver/MassStorage/makefile
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
Demos/Device/ClassDriver/MassStorageKeyboard/makefile
Demos/Device/ClassDriver/Mouse/makefile
Demos/Device/ClassDriver/RNDISEthernet/makefile
Demos/Device/ClassDriver/VirtualSerial/makefile
Demos/Device/ClassDriver/VirtualSerialMouse/makefile
Demos/Device/Incomplete/Sideshow/makefile
Demos/Device/LowLevel/AudioInput/makefile
Demos/Device/LowLevel/AudioOutput/makefile
Demos/Device/LowLevel/DualVirtualSerial/makefile
Demos/Device/LowLevel/GenericHID/makefile
Demos/Device/LowLevel/Joystick/makefile
Demos/Device/LowLevel/Keyboard/makefile
Demos/Device/LowLevel/KeyboardMouse/makefile
Demos/Device/LowLevel/MIDI/makefile
Demos/Device/LowLevel/MassStorage/Lib/SCSI.c
Demos/Device/LowLevel/MassStorage/makefile
Demos/Device/LowLevel/Mouse/makefile
Demos/Device/LowLevel/RNDISEthernet/makefile
Demos/Device/LowLevel/VirtualSerial/makefile
Demos/DualRole/ClassDriver/MouseHostDevice/makefile
Demos/Host/ClassDriver/JoystickHostWithParser/makefile
Demos/Host/ClassDriver/KeyboardHost/makefile
Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
Demos/Host/ClassDriver/MIDIHost/makefile
Demos/Host/ClassDriver/MassStorageHost/makefile
Demos/Host/ClassDriver/MouseHost/makefile
Demos/Host/ClassDriver/MouseHostWithParser/makefile
Demos/Host/ClassDriver/PrinterHost/makefile
Demos/Host/ClassDriver/RNDISEthernetHost/makefile
Demos/Host/ClassDriver/StillImageHost/makefile
Demos/Host/ClassDriver/VirtualSerialHost/makefile
Demos/Host/Incomplete/BluetoothHost/makefile
Demos/Host/LowLevel/GenericHIDHost/makefile
Demos/Host/LowLevel/JoystickHostWithParser/makefile
Demos/Host/LowLevel/KeyboardHost/makefile
Demos/Host/LowLevel/KeyboardHostWithParser/makefile
Demos/Host/LowLevel/MIDIHost/makefile
Demos/Host/LowLevel/MassStorageHost/makefile
Demos/Host/LowLevel/MouseHost/makefile
Demos/Host/LowLevel/MouseHostWithParser/makefile
Demos/Host/LowLevel/PrinterHost/makefile
Demos/Host/LowLevel/RNDISEthernetHost/makefile
Demos/Host/LowLevel/StillImageHost/makefile
Demos/Host/LowLevel/VirtualSerialHost/makefile
Projects/AVRISP-MKII/makefile
Projects/Benito/makefile
Projects/Incomplete/MIDIToneGenerator/makefile
Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
Projects/Incomplete/StandaloneProgrammer/makefile
Projects/LEDNotifier/makefile
Projects/Magstripe/makefile
Projects/MissileLauncher/makefile
Projects/RelayBoard/makefile
Projects/TempDataLogger/Lib/SCSI.c
Projects/TempDataLogger/makefile
Projects/USBtoSerial/makefile
Projects/Webserver/Lib/SCSI.c
Projects/Webserver/makefile
Projects/XPLAINBridge/makefile

index d6ad1ac..ddb90c0 100644 (file)
@@ -211,6 +211,7 @@ CFLAGS += -ffunction-sections
 CFLAGS += -fpack-struct
 CFLAGS += -fshort-enums
 CFLAGS += -fno-inline-small-functions
+CFLAGS += -fno-strict-aliasing
 CFLAGS += -Wall
 CFLAGS += -Wstrict-prototypes
 CFLAGS += -Wundef
index ff033b3..909b3f7 100644 (file)
@@ -213,6 +213,7 @@ CFLAGS += -fdata-sections
 CFLAGS += -fpack-struct
 CFLAGS += -fshort-enums
 CFLAGS += -fno-inline-small-functions
+CFLAGS += -fno-strict-aliasing
 CFLAGS += -Wall
 CFLAGS += -Wstrict-prototypes
 CFLAGS += -Wundef
index bc94f66..13779aa 100644 (file)
@@ -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
index 25200e4..7ce4dbf 100644 (file)
@@ -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
index c0d0e5a..cc39c9e 100644 (file)
@@ -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
index b81f110..528ffa4 100644 (file)
@@ -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
index 27967df..623856b 100644 (file)
@@ -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
index 90599fb..597dc44 100644 (file)
@@ -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
index 597fde4..3053be8 100644 (file)
@@ -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
index 5da65fd..72f963d 100644 (file)
@@ -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
index 35d5b59..f0796ea 100644 (file)
@@ -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)
index e94193a..47be38d 100644 (file)
@@ -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
index 15955a7..35a0ea7 100644 (file)
@@ -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)
index 928aa0e..16d6712 100644 (file)
@@ -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
index 81e7be7..9d5ba54 100644 (file)
@@ -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
index c2a8f30..3cca063 100644 (file)
@@ -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
index bcde149..7ad4596 100644 (file)
@@ -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
index c204d62..7398cb6 100644 (file)
@@ -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
index 53a11d2..7c0985c 100644 (file)
@@ -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
index e143e8f..097b50a 100644 (file)
@@ -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
index a6a93c1..4f40181 100644 (file)
@@ -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
index 42feb0d..5e39dd3 100644 (file)
@@ -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
index 48c68ed..5a9d114 100644 (file)
@@ -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
index 11f3fa3..1dfd71c 100644 (file)
@@ -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
index 4c23fa9..6783aaa 100644 (file)
@@ -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
index ca51e50..ffa6c2d 100644 (file)
@@ -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
index a9985db..ffcd08b 100644 (file)
@@ -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
index 46c71c3..05c9265 100644 (file)
@@ -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)
index 6d0163d..1680e50 100644 (file)
@@ -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
index 27a9718..75b6a35 100644 (file)
@@ -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
index 883e8a5..f44e60a 100644 (file)
@@ -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
index 9cfd865..32d3a4b 100644 (file)
@@ -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
index 0bbf98c..bf18033 100644 (file)
@@ -218,6 +218,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
index 44b1325..0d05970 100644 (file)
@@ -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
index 6416f78..80da1aa 100644 (file)
@@ -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
index b9bac6c..a6ec354 100644 (file)
@@ -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
index 48227a2..598b82f 100644 (file)
@@ -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 += -Wundef
index e0fb282..abf2ba0 100644 (file)
@@ -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
index 489b215..8f31be5 100644 (file)
@@ -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
index 0a432c4..d1e3c2e 100644 (file)
@@ -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
index ebed083..5e4eec3 100644 (file)
@@ -211,6 +211,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
index e001745..a2b408c 100644 (file)
@@ -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 += -Wundef
index 0f4c060..0ef59bd 100644 (file)
@@ -211,6 +211,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
index da4565e..1d0c2bd 100644 (file)
@@ -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 += -Wundef
index d26cc64..0d226e9 100644 (file)
@@ -228,6 +228,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
index 43b75c9..7bfc85a 100644 (file)
@@ -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
index 6c46a61..f417cbd 100644 (file)
@@ -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
index b5666ad..c777b40 100644 (file)
@@ -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 += -Wundef
index 09fbb54..1bc1e00 100644 (file)
@@ -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
index f576744..406337a 100644 (file)
@@ -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 += -Wundef
index f512e2d..d6db628 100644 (file)
@@ -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
index 8c367b0..5cbec3d 100644 (file)
@@ -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 += -Wundef
index 712d995..26f49ad 100644 (file)
@@ -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
index c112108..01e5ec5 100644 (file)
@@ -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
index 5d8bf06..ee5454c 100644 (file)
@@ -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
index c9a2c1d..70c5aae 100644 (file)
@@ -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
index f72fae4..812834f 100644 (file)
@@ -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 += -Wundef
index 4ca9568..f4f1893 100644 (file)
@@ -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
index 256098e..1af674d 100644 (file)
@@ -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
index 0ac97d2..bda5faf 100644 (file)
@@ -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
index c1b106c..f69ab64 100644 (file)
@@ -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)
index ac80cc6..507c904 100644 (file)
@@ -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
index 805dac4..5b3e476 100644 (file)
@@ -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
index 8342466..d6f2bd0 100644 (file)
@@ -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
index 831469b..c381803 100644 (file)
@@ -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
index 6758446..b64169a 100644 (file)
@@ -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
index 5606ac7..7bb66d3 100644 (file)
@@ -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)
index 6e865eb..65e483a 100644 (file)
@@ -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
index 1960169..bb64484 100644 (file)
@@ -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
index 5606ac7..7bb66d3 100644 (file)
@@ -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)
index 643039c..e9a37ff 100644 (file)
@@ -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
index c2bff7e..9df8d1b 100644 (file)
@@ -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