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

Commit80dc7e2

Browse files
committed
Clean up some minor gcc warnings. I'm not touching the
major one, though, which is the truly ugly stores into libpq privatestorage. Can't you find a better way to do this?
1 parent9392299 commit80dc7e2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/interfaces/libpgeasy/libpgeasy.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ static PGresult *res = NULL;
3030

3131
staticinton_error_state=ON_ERROR_STOP;
3232

33-
staticin_result_block= FALSE;
34-
staticwas_get_unset_result= FALSE;
33+
staticintin_result_block= FALSE;
34+
staticintwas_get_unset_result= FALSE;
3535

3636
/* LOCAL VARIABLES */
3737
staticinttuple;
@@ -214,6 +214,7 @@ get_result()
214214
was_get_unset_result= TRUE;
215215

216216
/* we have to store the fetch location somewhere */
217+
/* XXX THIS IS A NO-NO */
217218
cmdstatus[0]=NUL;
218219
memcpy(&cmdstatus[1],&tuple,sizeof(tuple));
219220

@@ -235,13 +236,16 @@ set_result(PGresult *newres)
235236
halt("set_result called with null result pointer\n");
236237

237238
if (res!=NULL&&was_get_unset_result== FALSE)
239+
{
238240
if (in_result_block== FALSE)
239241
PQclear(res);
240242
else
241243
{
244+
/* XXX THIS IS A NO-NO */
242245
cmdstatus[0]=NUL;
243246
memcpy(&cmdstatus[1],&tuple,sizeof(tuple));
244247
}
248+
}
245249

246250
in_result_block= TRUE;
247251
was_get_unset_result= FALSE;
@@ -270,6 +274,8 @@ unset_result(PGresult *oldres)
270274
halt("Unset of result without being set.\n");
271275

272276
was_get_unset_result= TRUE;
277+
278+
/* XXX THIS IS A NO-NO */
273279
cmdstatus[0]=NUL;
274280
memcpy(&cmdstatus[1],&tuple,sizeof(tuple));
275281
in_result_block= FALSE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp