Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4172bd8

Browse files
committed
Suppress some "variable might be clobbered by longjmp" warnings.
Seen with an older gcc version. I'm not sure these represent any realrisk factor, but still a bit scary. Anyway we have lots of othervolatile-marked variables in this code, so a couple more won't hurt.
1 parentdfe18f1 commit4172bd8

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

‎src/pl/plperl/Util.xs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,38 @@
3636
staticvoid
3737
do_util_elog(intlevel,SV*msg)
3838
{
39-
MemoryContextoldcontext=CurrentMemoryContext;
40-
char*cmsg=NULL;
39+
MemoryContextoldcontext=CurrentMemoryContext;
40+
char*volatilecmsg=NULL;
4141

42-
PG_TRY();
43-
{
42+
PG_TRY();
43+
{
4444
cmsg=sv2cstr(msg);
45-
elog(level,"%s",cmsg);
45+
elog(level,"%s",cmsg);
4646
pfree(cmsg);
47-
}
48-
PG_CATCH();
49-
{
50-
ErrorData*edata;
47+
}
48+
PG_CATCH();
49+
{
50+
ErrorData*edata;
5151

52-
/* Must reset elog.c's state */
53-
MemoryContextSwitchTo(oldcontext);
54-
edata=CopyErrorData();
55-
FlushErrorState();
52+
/* Must reset elog.c's state */
53+
MemoryContextSwitchTo(oldcontext);
54+
edata=CopyErrorData();
55+
FlushErrorState();
5656

5757
if (cmsg)
5858
pfree(cmsg);
5959

60-
/* Punt the error to Perl */
61-
croak("%s",edata->message);
62-
}
63-
PG_END_TRY();
60+
/* Punt the error to Perl */
61+
croak("%s",edata->message);
62+
}
63+
PG_END_TRY();
6464
}
6565

6666
statictext*
6767
sv2text(SV*sv)
6868
{
69-
char*str=sv2cstr(sv);
69+
char*str=sv2cstr(sv);
70+
7071
returncstring_to_text(str);
7172
}
7273

‎src/pl/plpython/plpython.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ static PLyProcedure *
15161516
PLy_procedure_get(Oidfn_oid,boolis_trigger)
15171517
{
15181518
HeapTupleprocTup;
1519-
PLyProcedureEntry*entry;
1519+
PLyProcedureEntry*volatileentry;
15201520
boolfound;
15211521

15221522
procTup=SearchSysCache1(PROCOID,ObjectIdGetDatum(fn_oid));
@@ -3234,7 +3234,7 @@ PLy_spi_prepare(PyObject *self, PyObject *args)
32343234
void*tmpplan;
32353235
volatileMemoryContextoldcontext;
32363236
volatileResourceOwneroldowner;
3237-
intnargs;
3237+
volatileintnargs;
32383238

32393239
if (!PyArg_ParseTuple(args,"s|O",&query,&list))
32403240
returnNULL;
@@ -3470,7 +3470,7 @@ PLy_spi_execute_plan(PyObject *ob, PyObject *list, long limit)
34703470

34713471
PG_TRY();
34723472
{
3473-
char*nulls;
3473+
char*volatilenulls;
34743474
volatileintj;
34753475

34763476
if (nargs>0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp