Bug 589488 mark DEBUG only variables as ifdef DEBUG in storage; r,a=sdwilsh
authortimeless@mozdev.org
Tue, 08 Feb 2011 14:16:38 -0500
changeset 62155 d265cdc8c02c3c69335ec3506d057f30c53ebf5f
parent 62154 4861b373c5630e3715ec1b93abb08556e3a00422
child 62156 6f4c4e84943d63d7eaf3a1d0e8a56eb50da2c4aa
push idunknown
push userunknown
push dateunknown
reviewerssdwilsh
bugs589488
milestone2.0b12pre
Bug 589488 mark DEBUG only variables as ifdef DEBUG in storage; r,a=sdwilsh
storage/public/mozIStorageValueArray.idl
--- a/storage/public/mozIStorageValueArray.idl
+++ b/storage/public/mozIStorageValueArray.idl
@@ -106,68 +106,89 @@ interface mozIStorageValueArray : nsISup
    * Getters for native code that return their values as
    * the return type, for convenience and sanity.
    *
    * Not virtual; no vtable bloat.
    */
 
   inline PRInt32 AsInt32(PRUint32 idx) {
     PRInt32 v = 0;
-    nsresult rv = GetInt32(idx, &v);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      GetInt32(idx, &v);
     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
                       "Getting value failed, wrong column index?");
     return v;
   }
 
   inline PRInt64 AsInt64(PRUint32 idx) {
     PRInt64 v = 0;
-    nsresult rv = GetInt64(idx, &v);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      GetInt64(idx, &v);
     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
                       "Getting value failed, wrong column index?");
     return v;
   }
 
   inline double AsDouble(PRUint32 idx) {
     double v = 0.0;
-    nsresult rv = GetDouble(idx, &v);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      GetDouble(idx, &v);
     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
                       "Getting value failed, wrong column index?");
     return v;
   }
 
   inline const char* AsSharedUTF8String(PRUint32 idx, PRUint32 *len) {
     const char *str = nsnull;
     *len = 0;
-    nsresult rv = GetSharedUTF8String(idx, len, &str);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      GetSharedUTF8String(idx, len, &str);
     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
                       "Getting value failed, wrong column index?");
     return str;
   }
 
   inline const PRUnichar* AsSharedWString(PRUint32 idx, PRUint32 *len) {
     const PRUnichar *str = nsnull;
     *len = 0;
-    nsresult rv = GetSharedString(idx, len, &str);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      GetSharedString(idx, len, &str);
     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
                       "Getting value failed, wrong column index?");
     return str;
   }
 
   inline const PRUint8* AsSharedBlob(PRUint32 idx, PRUint32 *len) {
     const PRUint8 *blob = nsnull;
     *len = 0;
-    nsresult rv = GetSharedBlob(idx, len, &blob);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      GetSharedBlob(idx, len, &blob);
     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
                       "Getting value failed, wrong column index?");
     return blob;
   }
 
   inline PRBool IsNull(PRUint32 idx) {
     PRBool b = PR_FALSE;
-    nsresult rv = GetIsNull(idx, &b);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      GetIsNull(idx, &b);
     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv),
                       "Getting value failed, wrong column index?");
     return b;
   }
 
 %}
 
 };