Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5f1ab46

Browse files
committed
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 functiondsm_impl.c: In function `dsm_impl_op':dsm_impl.c:197: warning: control reaches end of non-void functionNeither of these represent actual bugs, but we may as well tweak the codeso that more compilers can tell that. This won't change the generated codeon compilers that do recognize that the cases are unreachable.
1 parent2c66f99 commit5f1ab46

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎src/backend/postmaster/bgworker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ RegisterDynamicBackgroundWorker(BackgroundWorker *worker,
758758
{
759759
intslotno;
760760
boolsuccess= false;
761-
uint64generation;
761+
uint64generation=0;
762762

763763
/*
764764
* We can't register dynamic background workers from the postmaster.

‎src/backend/storage/ipc/dsm_impl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,11 @@ dsm_impl_op(dsm_op op, dsm_handle handle, uint64 request_size,
191191
returndsm_impl_mmap(op,handle,request_size,impl_private,
192192
mapped_address,mapped_size,elevel);
193193
#endif
194+
default:
195+
elog(ERROR,"unexpected dynamic shared memory type: %d",
196+
dynamic_shared_memory_type);
197+
return false;
194198
}
195-
elog(ERROR,"unexpected dynamic shared memory type: %d",
196-
dynamic_shared_memory_type);
197199
}
198200

199201
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp