зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1108932 - Fix -Wunused-const-variable warning-as-error in nsCSPParser.cpp. r=ckerschb
This commit is contained in:
Родитель
a8eb079cb4
Коммит
d157605c05
|
@ -51,13 +51,12 @@ static const char16_t DOLLAR = '$';
|
||||||
static const char16_t AMPERSAND = '&';
|
static const char16_t AMPERSAND = '&';
|
||||||
static const char16_t OPENBRACE = '(';
|
static const char16_t OPENBRACE = '(';
|
||||||
static const char16_t CLOSINGBRACE = ')';
|
static const char16_t CLOSINGBRACE = ')';
|
||||||
static const char16_t COMMA = ',';
|
|
||||||
static const char16_t EQUALS = '=';
|
static const char16_t EQUALS = '=';
|
||||||
static const char16_t ATSYMBOL = '@';
|
static const char16_t ATSYMBOL = '@';
|
||||||
|
|
||||||
static uint32_t kSubHostPathCharacterCutoff = 512;
|
static const uint32_t kSubHostPathCharacterCutoff = 512;
|
||||||
|
|
||||||
static const char* kHashSourceValidFns [] = { "sha256", "sha384", "sha512" };
|
static const char *const kHashSourceValidFns [] = { "sha256", "sha384", "sha512" };
|
||||||
static const uint32_t kHashSourceValidFnsLen = 3;
|
static const uint32_t kHashSourceValidFnsLen = 3;
|
||||||
|
|
||||||
/* ===== nsCSPTokenizer ==================== */
|
/* ===== nsCSPTokenizer ==================== */
|
||||||
|
@ -135,21 +134,20 @@ nsCSPParser::~nsCSPParser()
|
||||||
CSPPARSERLOG(("nsCSPParser::~nsCSPParser"));
|
CSPPARSERLOG(("nsCSPParser::~nsCSPParser"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
bool
|
|
||||||
isCharacterToken(char16_t aSymbol)
|
isCharacterToken(char16_t aSymbol)
|
||||||
{
|
{
|
||||||
return (aSymbol >= 'a' && aSymbol <= 'z') ||
|
return (aSymbol >= 'a' && aSymbol <= 'z') ||
|
||||||
(aSymbol >= 'A' && aSymbol <= 'Z');
|
(aSymbol >= 'A' && aSymbol <= 'Z');
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
static bool
|
||||||
isNumberToken(char16_t aSymbol)
|
isNumberToken(char16_t aSymbol)
|
||||||
{
|
{
|
||||||
return (aSymbol >= '0' && aSymbol <= '9');
|
return (aSymbol >= '0' && aSymbol <= '9');
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
static bool
|
||||||
isValidHexDig(char16_t aHexDig)
|
isValidHexDig(char16_t aHexDig)
|
||||||
{
|
{
|
||||||
return (isNumberToken(aHexDig) ||
|
return (isNumberToken(aHexDig) ||
|
||||||
|
@ -690,7 +688,6 @@ nsCSPParser::hashSource()
|
||||||
NS_ConvertUTF16toUTF8(mCurToken).get(),
|
NS_ConvertUTF16toUTF8(mCurToken).get(),
|
||||||
NS_ConvertUTF16toUTF8(mCurValue).get()));
|
NS_ConvertUTF16toUTF8(mCurValue).get()));
|
||||||
|
|
||||||
|
|
||||||
// Check if mCurToken starts and ends with "'"
|
// Check if mCurToken starts and ends with "'"
|
||||||
if (mCurToken.First() != SINGLEQUOTE ||
|
if (mCurToken.First() != SINGLEQUOTE ||
|
||||||
mCurToken.Last() != SINGLEQUOTE) {
|
mCurToken.Last() != SINGLEQUOTE) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче