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

Commit4bc4cfe

Browse files
committed
Suppress -Wunused-result warning for strtol().
I'm not sure which bozo thought it's a problem to use strtol() onlyfor its endptr result, but silence the warning using same methodused elsewhere.Report: <f845d3a6-5328-3e2a-924f-f8e91aa2b6d2@2ndquadrant.com>
1 parent7f61fd1 commit4bc4cfe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/backend/utils/adt/dbsize.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,13 +759,15 @@ pg_size_bytes(PG_FUNCTION_ARGS)
759759
/* Part (4): optional exponent */
760760
if (*endptr=='e'||*endptr=='E')
761761
{
762+
longexponent;
762763
char*cp;
763764

764765
/*
765766
* Note we might one day support EB units, so if what follows 'E'
766767
* isn't a number, just treat it all as a unit to be parsed.
767768
*/
768-
(void)strtol(endptr+1,&cp,10);
769+
exponent=strtol(endptr+1,&cp,10);
770+
(void)exponent;/* Silence -Wunused-result warnings */
769771
if (cp>endptr+1)
770772
endptr=cp;
771773
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp