Fix "strict aliasing rules" warnings

Treated as errors when trying to build the test_app_server for x86_64.
This commit is contained in:
Adrien Destugues
2014-09-02 10:16:01 +02:00
parent dc83a48d25
commit e94bd4810e
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -19,7 +19,9 @@ typedef struct pattern {
inline bool
operator==(const pattern& a, const pattern& b)
{
return (*(uint64*)a.data == *(uint64*)b.data);
uint64* pa = (uint64*)a.data;
uint64* pb = (uint64*)b.data;
return (*pa == *pb);
}