mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Suppress compiler warning in non-threaded build.
This commit is contained in:
parent
6cbb2353cb
commit
b3ab9b45da
@ -1,6 +1,6 @@
|
|||||||
/* dynamic SQL support routines
|
/* dynamic SQL support routines
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.26 2007/10/03 11:11:12 meskes Exp $
|
* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.27 2007/10/03 16:03:25 tgl Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define POSTGRES_ECPG_INTERNAL
|
#define POSTGRES_ECPG_INTERNAL
|
||||||
@ -16,13 +16,14 @@
|
|||||||
#include "sql3types.h"
|
#include "sql3types.h"
|
||||||
|
|
||||||
static void descriptor_free(struct descriptor *desc);
|
static void descriptor_free(struct descriptor *desc);
|
||||||
static void descriptor_deallocate_all(struct descriptor *list);
|
|
||||||
|
|
||||||
/* We manage descriptors separately for each thread. */
|
/* We manage descriptors separately for each thread. */
|
||||||
#ifdef ENABLE_THREAD_SAFETY
|
#ifdef ENABLE_THREAD_SAFETY
|
||||||
static pthread_key_t descriptor_key;
|
static pthread_key_t descriptor_key;
|
||||||
static pthread_once_t descriptor_once = PTHREAD_ONCE_INIT;
|
static pthread_once_t descriptor_once = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
|
static void descriptor_deallocate_all(struct descriptor *list);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
descriptor_destructor(void *arg)
|
descriptor_destructor(void *arg)
|
||||||
{
|
{
|
||||||
@ -653,6 +654,8 @@ ECPGdeallocate_desc(int line, const char *name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_THREAD_SAFETY
|
||||||
|
|
||||||
/* Deallocate all descriptors in the list */
|
/* Deallocate all descriptors in the list */
|
||||||
static void
|
static void
|
||||||
descriptor_deallocate_all(struct descriptor *list)
|
descriptor_deallocate_all(struct descriptor *list)
|
||||||
@ -665,6 +668,8 @@ descriptor_deallocate_all(struct descriptor *list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* ENABLE_THREAD_SAFETY */
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ECPGallocate_desc(int line, const char *name)
|
ECPGallocate_desc(int line, const char *name)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user