Changeset 2972 for box/trunk/lib


Ignore:
Timestamp:
22/06/2011 18:48:18 (11 months ago)
Author:
chris
Message:

Fix type aliasing that's strictly speaking incompatible and may actually be skipped by the compiler
(according to  http://blog.worldofcoding.com/2010/02/solving-gcc-44-strict-aliasing-problems.html).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/backupstore/BackupClientFileAttributes.cpp

    r2945 r2972  
    11841184         
    11851185        // Return the first 64 bits of the hash 
    1186         uint64_t result = *((uint64_t *)(digest.DigestAsData())); 
     1186        uint64_t result; 
     1187        memcpy(&result, digest.DigestAsData(), sizeof(result)); 
    11871188        return result; 
    11881189} 
Note: See TracChangeset for help on using the changeset viewer.