Silence -Wimplicit-fallthrough in sysv_shmem.c.
authorNoah Misch <[email protected]>
Thu, 4 Apr 2019 06:23:35 +0000 (23:23 -0700)
committerNoah Misch <[email protected]>
Thu, 4 Apr 2019 06:23:40 +0000 (23:23 -0700)
Commit 2f932f71d9f2963bbd201129d7b971c8f5f077fd added code that elicits
a warning on buildfarm member flaviventris.  Back-patch to 9.4, like
that commit.

Reported by Andres Freund.

Discussion: https://postgr.es/m/20190404020057[email protected]

src/backend/port/sysv_shmem.c

index cc39bc29f4d7449d72c662b5b2945e5452b80c3b..8da18ef913f0eb33c963d07ac6a101b027790289 100644 (file)
@@ -675,6 +675,7 @@ PGSharedMemoryCreate(Size size, int port,
                                (unsigned long) shmid),
                         errhint("Terminate any old server processes associated with data directory \"%s\".",
                                 DataDir)));
+               break;
            case SHMSTATE_ENOENT:
 
                /*
@@ -706,6 +707,7 @@ PGSharedMemoryCreate(Size size, int port,
                    dsm_cleanup_using_control_segment(oldhdr->dsm_control);
                if (shmctl(shmid, IPC_RMID, NULL) < 0)
                    NextShmemSegID++;
+               break;
        }
 
        if (oldhdr && shmdt(oldhdr) < 0)