]> granicus.if.org Git - postgresql/commitdiff
Silence -Wimplicit-fallthrough in sysv_shmem.c.
authorNoah Misch <noah@leadboat.com>
Thu, 4 Apr 2019 06:23:35 +0000 (23:23 -0700)
committerNoah Misch <noah@leadboat.com>
Thu, 4 Apr 2019 06:23:38 +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.galelv7by75ekqrh@alap3.anarazel.de

src/backend/port/sysv_shmem.c

index c05a4b409a2f71ebc946032b63b780bbfa74f46a..69f9c63b9dc0194fde3e477030680d5d9af5d2ad 100644 (file)
@@ -676,6 +676,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:
 
                                /*
@@ -707,6 +708,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)