pgsql: Suppress a couple of compiler warnings seen with older gcc versi - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Suppress a couple of compiler warnings seen with older gcc versi
Date
Msg-id E1VYnIs-0004tm-Bd@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Suppress a couple of compiler warnings seen with older gcc versions.

To wit,
bgworker.c: In function `RegisterDynamicBackgroundWorker':
bgworker.c:761: warning: `generation' might be used uninitialized in this function
dsm_impl.c: In function `dsm_impl_op':
dsm_impl.c:197: warning: control reaches end of non-void function

Neither of these represent actual bugs, but we may as well tweak the code
so that more compilers can tell that.  This won't change the generated code
on compilers that do recognize that the cases are unreachable.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5f1ab4610102a73c124000788585c1af2a36284b

Modified Files
--------------
src/backend/postmaster/bgworker.c  |    2 +-
src/backend/storage/ipc/dsm_impl.c |    6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Replace pg_asprintf() with psprintf().
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix two bugs in setting the vm bit of empty pages.