changeset 363:64d5de8b1a68 gcc-4.3-cleanups

Initialize UseApiError to 0 (false) in audioDB constructors. (Previous gccs might or might not default to 0, depending on the phase of the moon; gcc 4.3 really doesn't.)
author mas01cr
date Wed, 12 Nov 2008 14:01:06 +0000
parents ee0a97b3a630
children 08d5f6fe348e
files audioDB.h common.cpp
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.h	Wed Nov 12 13:05:14 2008 +0000
+++ b/audioDB.h	Wed Nov 12 14:01:06 2008 +0000
@@ -302,6 +302,7 @@
   unsigned lisztLength;
 
   //for lib / API
+  int apierrortemp;
   unsigned UseApiError;
 
   // private methods
@@ -411,8 +412,6 @@
   // Web Services
   void startServer();
 
-  int apierrortemp;
-
   void ws_status(const char*dbName, char* hostport);
   void ws_query(const char*dbName, const char *featureFileName, const char* hostport);
   void ws_query_by_key(const char*dbName, const char *trackKey, const char* featureFileName, const char* hostport);
@@ -491,6 +490,8 @@
     exact_evaluation_queue(0),                  \
     lisztOffset(0),                             \
     lisztLength(0),                             \
+    apierrortemp(0),                            \
+    UseApiError(0),                             \
     lsh(0),					\
     lsh_in_core(false),				\
     lsh_use_u_functions(false),                 \
@@ -502,6 +503,5 @@
     lsh_param_b(0),				\
     lsh_param_ncols(0),                         \
     lsh_n_point_bits(0),                        \
-    vv(0),          \
-    apierrortemp(0)
+    vv(0)
 #endif
--- a/common.cpp	Wed Nov 12 13:05:14 2008 +0000
+++ b/common.cpp	Wed Nov 12 14:01:06 2008 +0000
@@ -53,15 +53,15 @@
  
 
     if(isServer) {
-    /* FIXME: I think this is leaky -- we never delete err.  actually
-       deleting it is tricky, though; it gets placed into some
-       soap-internal struct with uncertain extent... -- CSR,
-       2007-10-01 */
-    char *err = new char[256]; /* FIXME: overflows */
-    snprintf(err, 255, "%s: %s\n%s", a, b, sysFunc ? strerror(errno) : "");
-    /* FIXME: actually we could usefully do with a properly structured
-       type, so that we can throw separate faultstring and details.
-       -- CSR, 2007-10-01 */
+        /* FIXME: I think this is leaky -- we never delete err.
+           actually deleting it is tricky, though; it gets placed into
+           some soap-internal struct with uncertain extent... -- CSR,
+           2007-10-01 */
+        char *err = new char[256]; /* FIXME: overflows */
+        snprintf(err, 255, "%s: %s\n%s", a, b, sysFunc ? strerror(errno) : "");
+        /* FIXME: actually we could usefully do with a properly
+           structured type, so that we can throw separate faultstring
+           and details.  -- CSR, 2007-10-01 */
         throw(err);
     } else if (UseApiError){
         apierrortemp=-1;