Skip to content

Commit e4a05c7

Browse files
committed
Silence compiler warnings about unused values.
Per gripe from Kevin Grittner.
1 parent 13fe298 commit e4a05c7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

contrib/hstore/hstore_io.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,11 +1305,13 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
13051305
{
13061306
/*
13071307
* might be a number. See if we can input it as a numeric
1308-
* value
1308+
* value. Ignore any actual parsed value.
13091309
*/
13101310
char *endptr = "junk";
1311+
long lval;
13111312

1312-
(void) strtol(src->data, &endptr, 10);
1313+
lval = strtol(src->data, &endptr, 10);
1314+
(void) lval;
13131315
if (*endptr == '\0')
13141316
{
13151317
/*
@@ -1321,7 +1323,10 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
13211323
else
13221324
{
13231325
/* not an int - try a double */
1324-
(void) strtod(src->data, &endptr);
1326+
double dval;
1327+
1328+
dval = strtod(src->data, &endptr);
1329+
(void) dval;
13251330
if (*endptr == '\0')
13261331
is_number = true;
13271332
}

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