Skip to content

Commit 1e091ad

Browse files
committed
Add 'volatile' declarations to silence gcc warnings about longjmp.
Shouldn't create any portability problems, since we have a configure test to #define away volatile if the compiler doesn't support it.
1 parent f884130 commit 1e091ad

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/pl/tcl/pltcl.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language (PL)
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.18 2000/01/15 22:43:23 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.19 2000/02/27 07:18:29 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -417,7 +417,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
417417
char *stroid;
418418
Tcl_HashEntry *hashent;
419419
int hashnew;
420-
pltcl_proc_desc *prodesc;
420+
pltcl_proc_desc * volatile prodesc;
421421
Tcl_DString tcl_cmd;
422422
Tcl_DString list_tmp;
423423
int tcl_rc;
@@ -739,7 +739,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
739739
int hashnew;
740740
pltcl_proc_desc *prodesc;
741741
TupleDesc tupdesc;
742-
HeapTuple rettup;
742+
volatile HeapTuple rettup;
743743
Tcl_DString tcl_cmd;
744744
Tcl_DString tcl_trigtup;
745745
Tcl_DString tcl_newtup;
@@ -1289,13 +1289,13 @@ pltcl_SPI_exec(ClientData cdata, Tcl_Interp *interp,
12891289
int spi_rc;
12901290
char buf[64];
12911291
int count = 0;
1292-
char *arrayname = NULL;
1293-
int query_idx;
1292+
char * volatile arrayname = NULL;
1293+
volatile int query_idx;
12941294
int i;
12951295
int loop_rc;
12961296
int ntuples;
1297-
HeapTuple *tuples;
1298-
TupleDesc tupdesc = NULL;
1297+
HeapTuple * volatile tuples;
1298+
volatile TupleDesc tupdesc = NULL;
12991299
sigjmp_buf save_restart;
13001300

13011301
char *usage = "syntax error - 'SPI_exec "
@@ -1701,20 +1701,20 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp *interp,
17011701
{
17021702
int spi_rc;
17031703
char buf[64];
1704-
int i,
1705-
j;
1704+
volatile int i;
1705+
int j;
17061706
int loop_body;
17071707
Tcl_HashEntry *hashent;
17081708
pltcl_query_desc *qdesc;
1709-
char *nulls = NULL;
1710-
char *arrayname = NULL;
1709+
char * volatile nulls = NULL;
1710+
char * volatile arrayname = NULL;
17111711
int count = 0;
17121712
int callnargs;
17131713
static char **callargs = NULL;
17141714
int loop_rc;
17151715
int ntuples;
1716-
HeapTuple *tuples = NULL;
1717-
TupleDesc tupdesc = NULL;
1716+
HeapTuple * volatile tuples = NULL;
1717+
volatile TupleDesc tupdesc = NULL;
17181718
sigjmp_buf save_restart;
17191719

17201720
char *usage = "syntax error - 'SPI_execp "

0 commit comments

Comments
 (0)