aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-08-16 16:14:16 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-08-16 16:14:16 -0400
commit4bc4cfe3bd186b4a1d1b01279bfd0e6ab11268b2 (patch)
tree2f9a72ca69f2c366708e41fdebe950bf11d11dc7 /src
parent7f61fd10ceb715eceece49451f6dfe9058044e15 (diff)
downloadpostgresql-4bc4cfe3bd186b4a1d1b01279bfd0e6ab11268b2.tar.gz
postgresql-4bc4cfe3bd186b4a1d1b01279bfd0e6ab11268b2.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/dbsize.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index 0e8a82d6f4d..3167bad92b0 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -759,13 +759,15 @@ pg_size_bytes(PG_FUNCTION_ARGS)
/* Part (4): optional exponent */
if (*endptr == 'e' || *endptr == 'E')
{
+ long exponent;
char *cp;
/*
* 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.
*/
- (void) strtol(endptr + 1, &cp, 10);
+ exponent = strtol(endptr + 1, &cp, 10);
+ (void) exponent; /* Silence -Wunused-result warnings */
if (cp > endptr + 1)
endptr = cp;
}