Suppress -Wunused-result warning for strtol().
I'm not sure which bozo thought it's a problem to use strtol() only for its endptr result, but silence the warning using same method used elsewhere. Report: <f845d3a6-5328-3e2a-924f-f8e91aa2b6d2@2ndquadrant.com>
This commit is contained in:
parent
7f61fd10ce
commit
4bc4cfe3bd
|
@ -759,13 +759,15 @@ pg_size_bytes(PG_FUNCTION_ARGS)
|
||||||
/* Part (4): optional exponent */
|
/* Part (4): optional exponent */
|
||||||
if (*endptr == 'e' || *endptr == 'E')
|
if (*endptr == 'e' || *endptr == 'E')
|
||||||
{
|
{
|
||||||
|
long exponent;
|
||||||
char *cp;
|
char *cp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note we might one day support EB units, so if what follows 'E'
|
* Note we might one day support EB units, so if what follows 'E'
|
||||||
* isn't a number, just treat it all as a unit to be parsed.
|
* isn't a number, just treat it all as a unit to be parsed.
|
||||||
*/
|
*/
|
||||||
(void) strtol(endptr + 1, &cp, 10);
|
exponent = strtol(endptr + 1, &cp, 10);
|
||||||
|
(void) exponent; /* Silence -Wunused-result warnings */
|
||||||
if (cp > endptr + 1)
|
if (cp > endptr + 1)
|
||||||
endptr = cp;
|
endptr = cp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue