From 31f121187dfdff8727e873a5a5c5b9a335414949 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Mon, 30 May 2011 11:39:12 -0400 Subject: [PATCH] Bug 659546 - Silence clang warnings about alignment requirement increase in nsID::Equals after bug 164580; r=bsmedberg --- xpcom/glue/nsID.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xpcom/glue/nsID.h b/xpcom/glue/nsID.h index 2abb34c2c7c..26da5d6bb96 100644 --- a/xpcom/glue/nsID.h +++ b/xpcom/glue/nsID.h @@ -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]; } /**