Bug 467948: Fix some "deprecated conversion from string constant" compiler warnings", round 2. r=dbaron
This commit is contained in:
@@ -334,23 +334,23 @@ GetArrayStringValue(CFArrayRef aArray, PRInt32 aIndex, nsAString& aResult)
|
|||||||
|
|
||||||
static
|
static
|
||||||
nsSafariProfileMigrator::PrefTransform gTransforms[] = {
|
nsSafariProfileMigrator::PrefTransform gTransforms[] = {
|
||||||
{ CFSTR("AlwaysShowTabBar"), _SPM(BOOL), "browser.tabs.autoHide", _SPM(SetBoolInverted), PR_FALSE, -1 },
|
{ CFSTR("AlwaysShowTabBar"), _SPM(BOOL), "browser.tabs.autoHide", _SPM(SetBoolInverted), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("AutoFillPasswords"), _SPM(BOOL), "signon.rememberSignons", _SPM(SetBool), PR_FALSE, -1 },
|
{ CFSTR("AutoFillPasswords"), _SPM(BOOL), "signon.rememberSignons", _SPM(SetBool), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("OpenNewTabsInFront"), _SPM(BOOL), "browser.tabs.loadInBackground", _SPM(SetBoolInverted), PR_FALSE, -1 },
|
{ CFSTR("OpenNewTabsInFront"), _SPM(BOOL), "browser.tabs.loadInBackground", _SPM(SetBoolInverted), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("NSDefaultOpenDir"), _SPM(STRING), "browser.download.dir", _SPM(SetDownloadFolder), PR_FALSE, -1 },
|
{ CFSTR("NSDefaultOpenDir"), _SPM(STRING), "browser.download.dir", _SPM(SetDownloadFolder), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("AutoOpenSafeDownloads"), _SPM(BOOL), nsnull, _SPM(SetDownloadHandlers), PR_FALSE, -1 },
|
{ CFSTR("AutoOpenSafeDownloads"), _SPM(BOOL), nsnull, _SPM(SetDownloadHandlers), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("DownloadsClearingPolicy"), _SPM(INT), "browser.download.manager.retention", _SPM(SetDownloadRetention), PR_FALSE, -1 },
|
{ CFSTR("DownloadsClearingPolicy"), _SPM(INT), "browser.download.manager.retention", _SPM(SetDownloadRetention), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitDefaultTextEncodingName"),_SPM(STRING), "intl.charset.default", _SPM(SetDefaultEncoding), PR_FALSE, -1 },
|
{ CFSTR("WebKitDefaultTextEncodingName"),_SPM(STRING), "intl.charset.default", _SPM(SetDefaultEncoding), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitStandardFont"), _SPM(STRING), "font.name.serif.", _SPM(SetFontName), PR_FALSE, -1 },
|
{ CFSTR("WebKitStandardFont"), _SPM(STRING), "font.name.serif.", _SPM(SetFontName), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitDefaultFontSize"), _SPM(INT), "font.size.serif.", _SPM(SetFontSize), PR_FALSE, -1 },
|
{ CFSTR("WebKitDefaultFontSize"), _SPM(INT), "font.size.serif.", _SPM(SetFontSize), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitFixedFont"), _SPM(STRING), "font.name.fixed.", _SPM(SetFontName), PR_FALSE, -1 },
|
{ CFSTR("WebKitFixedFont"), _SPM(STRING), "font.name.fixed.", _SPM(SetFontName), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitDefaultFixedFontSize"), _SPM(INT), "font.size.fixed.", _SPM(SetFontSize), PR_FALSE, -1 },
|
{ CFSTR("WebKitDefaultFixedFontSize"), _SPM(INT), "font.size.fixed.", _SPM(SetFontSize), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitMinimumFontSize"), _SPM(INT), "font.minimum-size.", _SPM(SetFontSize), PR_FALSE, -1 },
|
{ CFSTR("WebKitMinimumFontSize"), _SPM(INT), "font.minimum-size.", _SPM(SetFontSize), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitDisplayImagesKey"), _SPM(BOOL), "permissions.default.image", _SPM(SetDisplayImages), PR_FALSE, -1 },
|
{ CFSTR("WebKitDisplayImagesKey"), _SPM(BOOL), "permissions.default.image", _SPM(SetDisplayImages), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitJavaEnabled"), _SPM(BOOL), "security.enable_java", _SPM(SetBool), PR_FALSE, -1 },
|
{ CFSTR("WebKitJavaEnabled"), _SPM(BOOL), "security.enable_java", _SPM(SetBool), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitJavaScriptEnabled"), _SPM(BOOL), "javascript.enabled", _SPM(SetBool), PR_FALSE, -1 },
|
{ CFSTR("WebKitJavaScriptEnabled"), _SPM(BOOL), "javascript.enabled", _SPM(SetBool), PR_FALSE, { -1 } },
|
||||||
{ CFSTR("WebKitJavaScriptCanOpenWindowsAutomatically"),
|
{ CFSTR("WebKitJavaScriptCanOpenWindowsAutomatically"),
|
||||||
_SPM(BOOL), "dom.disable_open_during_load", _SPM(SetBoolInverted), PR_FALSE, -1 }
|
_SPM(BOOL), "dom.disable_open_during_load", _SPM(SetBoolInverted), PR_FALSE, { -1 } }
|
||||||
};
|
};
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public:
|
|||||||
struct PrefTransform {
|
struct PrefTransform {
|
||||||
CFStringRef keyName;
|
CFStringRef keyName;
|
||||||
PrefType type;
|
PrefType type;
|
||||||
char* targetPrefName;
|
const char* targetPrefName;
|
||||||
prefConverter prefSetterFunc;
|
prefConverter prefSetterFunc;
|
||||||
PRBool prefHasValue;
|
PRBool prefHasValue;
|
||||||
union {
|
union {
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ struct LiteralArray {
|
|||||||
#define GLYPHS LiteralArray
|
#define GLYPHS LiteralArray
|
||||||
|
|
||||||
struct TestEntry {
|
struct TestEntry {
|
||||||
TestEntry (char *aUTF8FamilyString,
|
TestEntry (const char *aUTF8FamilyString,
|
||||||
const gfxFontStyle& aFontStyle,
|
const gfxFontStyle& aFontStyle,
|
||||||
char *aString)
|
const char *aString)
|
||||||
: utf8FamilyString(aUTF8FamilyString),
|
: utf8FamilyString(aUTF8FamilyString),
|
||||||
fontStyle(aFontStyle),
|
fontStyle(aFontStyle),
|
||||||
stringType(S_ASCII),
|
stringType(S_ASCII),
|
||||||
@@ -116,10 +116,10 @@ struct TestEntry {
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TestEntry (char *aUTF8FamilyString,
|
TestEntry (const char *aUTF8FamilyString,
|
||||||
const gfxFontStyle& aFontStyle,
|
const gfxFontStyle& aFontStyle,
|
||||||
int stringType,
|
int stringType,
|
||||||
char *aString)
|
const char *aString)
|
||||||
: utf8FamilyString(aUTF8FamilyString),
|
: utf8FamilyString(aUTF8FamilyString),
|
||||||
fontStyle(aFontStyle),
|
fontStyle(aFontStyle),
|
||||||
stringType(stringType),
|
stringType(stringType),
|
||||||
@@ -211,11 +211,11 @@ struct TestEntry {
|
|||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *utf8FamilyString;
|
const char *utf8FamilyString;
|
||||||
gfxFontStyle fontStyle;
|
gfxFontStyle fontStyle;
|
||||||
|
|
||||||
int stringType;
|
int stringType;
|
||||||
char *string;
|
const char *string;
|
||||||
PRPackedBool isRTL;
|
PRPackedBool isRTL;
|
||||||
|
|
||||||
nsTArray<ExpectItem> expectItems;
|
nsTArray<ExpectItem> expectItems;
|
||||||
@@ -237,10 +237,10 @@ MakeContext ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
TestEntry*
|
TestEntry*
|
||||||
AddTest (char *utf8FamilyString,
|
AddTest (const char *utf8FamilyString,
|
||||||
const gfxFontStyle& fontStyle,
|
const gfxFontStyle& fontStyle,
|
||||||
int stringType,
|
int stringType,
|
||||||
char *string)
|
const char *string)
|
||||||
{
|
{
|
||||||
TestEntry te (utf8FamilyString,
|
TestEntry te (utf8FamilyString,
|
||||||
fontStyle,
|
fontStyle,
|
||||||
@@ -302,7 +302,7 @@ RunTest (TestEntry *test, gfxContext *ctx) {
|
|||||||
if (test->stringType == S_ASCII) {
|
if (test->stringType == S_ASCII) {
|
||||||
flags |= gfxTextRunFactory::TEXT_IS_ASCII | gfxTextRunFactory::TEXT_IS_8BIT;
|
flags |= gfxTextRunFactory::TEXT_IS_ASCII | gfxTextRunFactory::TEXT_IS_8BIT;
|
||||||
length = strlen(test->string);
|
length = strlen(test->string);
|
||||||
textRun = gfxTextRunWordCache::MakeTextRun(reinterpret_cast<PRUint8*>(test->string), length, fontGroup, ¶ms, flags);
|
textRun = gfxTextRunWordCache::MakeTextRun(reinterpret_cast<const PRUint8*>(test->string), length, fontGroup, ¶ms, flags);
|
||||||
} else {
|
} else {
|
||||||
NS_ConvertUTF8toUTF16 str(nsDependentCString(test->string));
|
NS_ConvertUTF8toUTF16 str(nsDependentCString(test->string));
|
||||||
length = str.Length();
|
length = str.Length();
|
||||||
|
|||||||
@@ -49,9 +49,9 @@
|
|||||||
|
|
||||||
struct iso_lang_map
|
struct iso_lang_map
|
||||||
{
|
{
|
||||||
char* iso_code;
|
const char* iso_code;
|
||||||
short mac_lang_code;
|
short mac_lang_code;
|
||||||
short mac_script_code;
|
short mac_script_code;
|
||||||
|
|
||||||
};
|
};
|
||||||
typedef struct iso_lang_map iso_lang_map;
|
typedef struct iso_lang_map iso_lang_map;
|
||||||
@@ -162,8 +162,8 @@ const iso_lang_map lang_list[] = {
|
|||||||
|
|
||||||
struct iso_country_map
|
struct iso_country_map
|
||||||
{
|
{
|
||||||
char* iso_code;
|
const char* iso_code;
|
||||||
short mac_region_code;
|
short mac_region_code;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct iso_country_map iso_country_map;
|
typedef struct iso_country_map iso_country_map;
|
||||||
|
|||||||
@@ -1341,8 +1341,7 @@ nsNSSCertificateDB::getCertNames(CERTCertList *certList,
|
|||||||
if (sc) *sc = DELIM;
|
if (sc) *sc = DELIM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!namestr) namestr = "";
|
nsAutoString certname = NS_ConvertASCIItoUTF16(namestr ? namestr : "");
|
||||||
nsAutoString certname = NS_ConvertASCIItoUTF16(namestr);
|
|
||||||
certstr.Append(PRUnichar(DELIM));
|
certstr.Append(PRUnichar(DELIM));
|
||||||
certstr += certname;
|
certstr += certname;
|
||||||
certstr.Append(PRUnichar(DELIM));
|
certstr.Append(PRUnichar(DELIM));
|
||||||
|
|||||||
Reference in New Issue
Block a user