Bug 334298 GetCSSFloatValue uses f uninitialized in a case that doesn't happen
r=glazou sr=neil git-svn-id: svn://10.0.0.236/trunk@196116 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
b45f12f200
commit
24550285b9
@ -75,7 +75,7 @@ static PRInt32 GetCSSFloatValue(nsIDOMCSSStyleDeclaration * aDecl,
|
||||
PRUint16 type;
|
||||
val->GetPrimitiveType(&type);
|
||||
|
||||
float f;
|
||||
float f = 0;
|
||||
switch (type) {
|
||||
case nsIDOMCSSPrimitiveValue::CSS_PX:
|
||||
// the value is in pixels, just get it
|
||||
@ -89,14 +89,12 @@ static PRInt32 GetCSSFloatValue(nsIDOMCSSStyleDeclaration * aDecl,
|
||||
res = val->GetStringValue(str);
|
||||
if (str.EqualsLiteral("thin"))
|
||||
f = 1;
|
||||
if (str.EqualsLiteral("medium"))
|
||||
else if (str.EqualsLiteral("medium"))
|
||||
f = 3;
|
||||
if (str.EqualsLiteral("thick"))
|
||||
else if (str.EqualsLiteral("thick"))
|
||||
f = 5;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
f = 0;
|
||||
}
|
||||
|
||||
return (PRInt32) f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user