Bug 659546 - Silence clang warnings about alignment requirement increase in nsID::Equals after bug 164580; r=bsmedberg

This commit is contained in:
Ehsan Akhgari 2011-05-30 11:39:12 -04:00
parent 15ac80982f
commit 31f121187d

View File

@ -73,9 +73,10 @@ struct nsID {
*/
inline PRBool Equals(const nsID& other) const {
// First cast to void* in order to silence the alignment warnings.
return
((PRUint64*) &m0)[0] == ((PRUint64*) &other.m0)[0] &&
((PRUint64*) &m0)[1] == ((PRUint64*) &other.m0)[1];
((PRUint64*)(void*) &m0)[0] == ((PRUint64*)(void*) &other.m0)[0] &&
((PRUint64*)(void*) &m0)[1] == ((PRUint64*)(void*) &other.m0)[1];
}
/**