Bug 409384 - Firefox 3.0b2 fauks to compile with gcc 4.3, r=dwitte+dbaron a=damons

This commit is contained in:
benjamin@smedbergs.us 2008-02-26 14:44:41 -08:00
parent 0ac8d00ace
commit b48eae3354
3 changed files with 14 additions and 6 deletions

View File

@ -123,7 +123,7 @@ class nsCookie : public nsICookie2
// setters
inline void SetExpiry(PRInt64 aExpiry) { mExpiry = aExpiry; }
inline void SetLastAccessed(PRInt64 aTime) { mLastAccessed = aTime; }
inline void SetIsSession(PRBool aIsSession) { mIsSession = aIsSession; }
inline void SetIsSession(PRBool aIsSession) { mIsSession = (PRPackedBool) aIsSession; }
// set the creation id manually, overriding the monotonicity checks in Create().
// use with caution!
inline void SetCreationID(PRInt64 aID) { mCreationID = aID; }

View File

@ -770,13 +770,13 @@ nsCookieService::PrefChanged(nsIPrefBranch *aPrefBranch)
{
PRInt32 val;
if (NS_SUCCEEDED(aPrefBranch->GetIntPref(kPrefCookiesPermissions, &val)))
mCookiesPermissions = LIMIT(val, 0, 2, 0);
mCookiesPermissions = (PRUint8) LIMIT(val, 0, 2, 0);
if (NS_SUCCEEDED(aPrefBranch->GetIntPref(kPrefMaxNumberOfCookies, &val)))
mMaxNumberOfCookies = LIMIT(val, 0, 0xFFFF, 0xFFFF);
mMaxNumberOfCookies = (PRUint16) LIMIT(val, 0, 0xFFFF, 0xFFFF);
if (NS_SUCCEEDED(aPrefBranch->GetIntPref(kPrefMaxCookiesPerHost, &val)))
mMaxCookiesPerHost = LIMIT(val, 0, 0xFFFF, 0xFFFF);
mMaxCookiesPerHost = (PRUint16) LIMIT(val, 0, 0xFFFF, 0xFFFF);
}
/******************************************************************************

View File

@ -315,7 +315,12 @@ struct nsCharTraits<PRUnichar>
ASCIIToLower( char_type c )
{
if (c < 0x100)
return (c >= 'A' && c <= 'Z') ? c + ('a' - 'A') : c;
{
if (c >= 'A' && c <= 'Z')
return char_type(c + ('a' - 'A'));
return c;
}
else
{
if (c == 0x212A) // KELVIN SIGN
@ -570,7 +575,10 @@ struct nsCharTraits<char>
char_type
ASCIIToLower( char_type c )
{
return (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c;
if (c >= 'A' && c <= 'Z')
return char_type(c + ('a' - 'A'));
return c;
}
static