]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix C error reported by Oracle compiler.
authorThomas Munro <tmunro@postgresql.org>
Wed, 8 Jan 2025 03:54:45 +0000 (16:54 +1300)
committerThomas Munro <tmunro@postgresql.org>
Wed, 8 Jan 2025 04:03:45 +0000 (17:03 +1300)
Commit 66aaabe7 (branches 13 - 17 only) was not acceptable to the Oracle
Developer Studio compiler on build farm animal wrasse.  It accidentally
used a C++ style return statement to wrap a void function.  None of the
usual compilers complained, but it is right, that is not allowed in C.
Fix.

Reported-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/Z33vgfVgvOnbFLN9%40paquier.xyz

src/backend/storage/smgr/smgr.c

index 657eabde93427bfae9f55b123a18d86f582cb713..586f294ffdc68a8fc9bd21df3d42edf2a41df8a6 100644 (file)
@@ -631,7 +631,7 @@ smgrtruncate(SMgrRelation reln, ForkNumber *forknum, int nforks,
        for (int i = 0; i < nforks; ++i)
                old_nblocks[i] = smgrnblocks(reln, forknum[i]);
 
-       return smgrtruncate2(reln, forknum, nforks, old_nblocks, nblocks);
+       smgrtruncate2(reln, forknum, nforks, old_nblocks, nblocks);
 }
 
 /*