mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Silence compiler warnings about unused values.
Per gripe from Kevin Grittner.
This commit is contained in:
parent
13fe298ca0
commit
e4a05c7512
@ -1305,11 +1305,13 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* might be a number. See if we can input it as a numeric
|
* might be a number. See if we can input it as a numeric
|
||||||
* value
|
* value. Ignore any actual parsed value.
|
||||||
*/
|
*/
|
||||||
char *endptr = "junk";
|
char *endptr = "junk";
|
||||||
|
long lval;
|
||||||
|
|
||||||
(void) strtol(src->data, &endptr, 10);
|
lval = strtol(src->data, &endptr, 10);
|
||||||
|
(void) lval;
|
||||||
if (*endptr == '\0')
|
if (*endptr == '\0')
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1321,7 +1323,10 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* not an int - try a double */
|
/* not an int - try a double */
|
||||||
(void) strtod(src->data, &endptr);
|
double dval;
|
||||||
|
|
||||||
|
dval = strtod(src->data, &endptr);
|
||||||
|
(void) dval;
|
||||||
if (*endptr == '\0')
|
if (*endptr == '\0')
|
||||||
is_number = true;
|
is_number = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user