pgsql: Suppress a couple of compiler warnings seen with older gcc versi

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Suppress a couple of compiler warnings seen with older gcc versi
Date: 2013-10-23 01:32:06
Message-ID: E1VYnIs-0004tm-Bd@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-10-23 11:33:04 pgsql: Fix two bugs in setting the vm bit of empty pages.
Previous Message Tom Lane 2013-10-22 23:40:37 pgsql: Replace pg_asprintf() with psprintf().