Commit 04443ba5 authored by Eric Cano's avatar Eric Cano
Browse files

Worked around a "type-punned pointer" complain from gcc in SLC6.

parent 91190e6b
......@@ -115,11 +115,14 @@ namespace SCSI {
inline uint32_t toU32(const unsigned char(& t)[3])
unsigned char tmp[4];
tmp[0]=0;tmp[1]=t[0];tmp[2]=t[1]; tmp[3]=t[2];
union {
unsigned char tmp[4];
uint32_t val;
} u;
/* Like network, SCSI is BigEndian */
return ntohl (*((uint32_t *) tmp));
return ntohl (u.val);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment