Skip to content

Commit b3ab9b4

Browse files
committed
Suppress compiler warning in non-threaded build.
1 parent 6cbb235 commit b3ab9b4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/interfaces/ecpg/ecpglib/descriptor.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* dynamic SQL support routines
22
*
3-
* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.26 2007/10/03 11:11:12 meskes Exp $
3+
* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.27 2007/10/03 16:03:25 tgl Exp $
44
*/
55

66
#define POSTGRES_ECPG_INTERNAL
@@ -16,13 +16,14 @@
1616
#include "sql3types.h"
1717

1818
static void descriptor_free(struct descriptor *desc);
19-
static void descriptor_deallocate_all(struct descriptor *list);
2019

2120
/* We manage descriptors separately for each thread. */
2221
#ifdef ENABLE_THREAD_SAFETY
2322
static pthread_key_t descriptor_key;
2423
static pthread_once_t descriptor_once = PTHREAD_ONCE_INIT;
2524

25+
static void descriptor_deallocate_all(struct descriptor *list);
26+
2627
static void
2728
descriptor_destructor(void *arg)
2829
{
@@ -653,6 +654,8 @@ ECPGdeallocate_desc(int line, const char *name)
653654
return false;
654655
}
655656

657+
#ifdef ENABLE_THREAD_SAFETY
658+
656659
/* Deallocate all descriptors in the list */
657660
static void
658661
descriptor_deallocate_all(struct descriptor *list)
@@ -665,6 +668,8 @@ descriptor_deallocate_all(struct descriptor *list)
665668
}
666669
}
667670

671+
#endif /* ENABLE_THREAD_SAFETY */
672+
668673
bool
669674
ECPGallocate_desc(int line, const char *name)
670675
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy