Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
04443ba5
Commit
04443ba5
authored
Aug 07, 2013
by
Eric Cano
Browse files
Worked around a "type-punned pointer" complain from gcc in SLC6.
parent
91190e6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
SCSI/Structures.hh
View file @
04443ba5
...
...
@@ -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
;
u
.
tmp
[
0
]
=
0
;
u
.
tmp
[
1
]
=
t
[
0
];
u
.
tmp
[
2
]
=
t
[
1
];
u
.
tmp
[
3
]
=
t
[
2
];
/* Like network, SCSI is BigEndian */
return
ntohl
(
*
((
uint32_t
*
)
tmp
)
);
return
ntohl
(
u
.
val
);
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment