[xpcom] ifdef out debug-only variable
authorKalle Vahlman <kalle.vahlman@movial.com>
Wed, 22 Apr 2009 10:28:07 +0000 (13:28 +0300)
committerKalle Vahlman <kalle.vahlman@movial.com>
Wed, 22 Apr 2009 10:28:07 +0000 (13:28 +0300)
xpcom-dbusservice/DBusMarshaling.cpp

index 7b8698ae17840412b8acc45e135a05e3fd9f5812..c6963aea1f7a3a41acb7392bc310744c5a6a48e7 100644 (file)
@@ -375,16 +375,19 @@ PRBool typesMatch(PRUint16 vType, int dType)
 void
 addVariantToIter(JSContext* cx, nsIVariant *aVariant, DBusMessageIter *aIter, DBusSignatureIter *aSigIter)
 {
-    char *element_signature = dbus_signature_iter_get_signature(aSigIter);
     int element_type = dbus_signature_iter_get_current_type(aSigIter);
 
     PRUint16 variant_type;
     aVariant->GetDataType(&variant_type);
 
+#ifdef DEBUG
+    char *element_signature = dbus_signature_iter_get_signature(aSigIter);
     BDBLOG(("addVariantToIter: signature \"%s\", type %c, variant type: %i\n",
            element_signature,
            element_type,
            variant_type));
+    dbus_free(element_signature);
+#endif
 
     if (dbus_type_is_basic(element_type))
     {
@@ -584,8 +587,6 @@ addVariantToIter(JSContext* cx, nsIVariant *aVariant, DBusMessageIter *aIter, DB
     {
         BDBLOG(("  unhandled\n"));
     }
-
-    dbus_free(element_signature);
 }
 
 static