8000 round() is not portable. Use rint(). · postgrespro/postgres_cluster@d63de33 · GitHub
[go: up one dir, main page]

Skip to content

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

8000
Appearance settings

Commit d63de33

Browse files
committed
round() is not portable. Use rint().
1 parent 295e7dc commit d63de33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/access/gist/gistbuild.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*/
1515
#include "postgres.h"
1616

17+
#include <math.h>
18+
1719
#include "access/genam.h"
1820
#include "access/gist_private.h"
1921
#include "catalog/index.h"
@@ -420,7 +422,7 @@ calculatePagesPerBuffer(GISTBuildState *buildstate, int levelStep)
420422
*/
421423
pagesPerBuffer = 2 * pow(avgIndexTuplesPerPage, levelStep);
422424

423-
return round(pagesPerBuffer);
425+
return (int) rint(pagesPerBuffer);
424426
}
425427

426428
/*

0 commit comments

Comments
 (0)
0