Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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:04:26 +0000 (17:04 +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 6676e0cae5c22304f1cad70edbff5ecfb2c3c8f6..8892473d8588a7c453c44e410f9469245a3b0e3f 100644 (file)
@@ -599,7 +599,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);
 }
 
 /*