aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/TempDataLogger/Lib/SCSI.c
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 /Projects/TempDataLogger/Lib/SCSI.c
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 'Projects/TempDataLogger/Lib/SCSI.c')
-rw-r--r--Projects/TempDataLogger/Lib/SCSI.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Projects/TempDataLogger/Lib/SCSI.c b/Projects/TempDataLogger/Lib/SCSI.c
index 5606ac7ca..7bb66d3b6 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)