Fix warning.
authorDan Witte <dwitte@mozilla.com>
Tue, 20 Jul 2010 10:13:54 -0700
changeset 48512 5384ab5eb6c19553014439f6c76a1845517122a0
parent 48511 63647e3ee0d513a4a64c36dbd85b8725af9a9e1f
child 48513 7fd49595dc3a4082f5efde48f57fb663210b6bc1
child 48514 7497dbffa9a7e09bc8bdd7d3c695cadd1c53976e
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b2pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fix warning.
js/src/ctypes/CTypes.cpp
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -4024,17 +4024,17 @@ StructType::DefineInternal(JSContext* cx
     structSize = 0;
     structAlign = 0;
 
     for (jsuint i = 0; i < len; ++i) {
       js::AutoValueRooter item(cx);
       if (!JS_GetElement(cx, fieldsObj, i, item.jsval_addr()))
         return JS_FALSE;
 
-      JSObject* fieldType;
+      JSObject* fieldType = NULL;
       JSString* name = ExtractStructField(cx, item.jsval_value(), &fieldType);
       if (!name)
         return JS_FALSE;
 
       // Make sure each field name is unique, and add it to the hash.
       FieldInfoHash::AddPtr entryPtr = fields->lookupForAdd(name);
       if (entryPtr) {
         JS_ReportError(cx, "struct fields must have unique names");