Suppress compiler warning in non-threaded build.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 Oct 2007 16:03:25 +0000 (16:03 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 Oct 2007 16:03:25 +0000 (16:03 +0000)
src/interfaces/ecpg/ecpglib/descriptor.c

index 1f16a5f965c66f89ea724a95554c01f092326ad7..38ff7bb2055ec5797193158b52ecbb18914549c0 100644 (file)
 #include "sql3types.h"
 
 static void descriptor_free(struct descriptor *desc);
-static void descriptor_deallocate_all(struct descriptor *list);
 
 /* We manage descriptors separately for each thread. */
 #ifdef ENABLE_THREAD_SAFETY
 static pthread_key_t   descriptor_key;
 static pthread_once_t  descriptor_once = PTHREAD_ONCE_INIT;
 
+static void descriptor_deallocate_all(struct descriptor *list);
+
 static void
 descriptor_destructor(void *arg)
 {
@@ -653,6 +654,8 @@ ECPGdeallocate_desc(int line, const char *name)
        return false;
 }
 
+#ifdef ENABLE_THREAD_SAFETY
+
 /* Deallocate all descriptors in the list */
 static void
 descriptor_deallocate_all(struct descriptor *list)
@@ -665,6 +668,8 @@ descriptor_deallocate_all(struct descriptor *list)
        }
 }
 
+#endif /* ENABLE_THREAD_SAFETY */
+
 bool
 ECPGallocate_desc(int line, const char *name)
 {