mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 12:11:23 +02:00
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.
This commit is contained in:
parent
2c66f9924c
commit
5f1ab46101
@ -758,7 +758,7 @@ RegisterDynamicBackgroundWorker(BackgroundWorker *worker,
|
|||||||
{
|
{
|
||||||
int slotno;
|
int slotno;
|
||||||
bool success = false;
|
bool success = false;
|
||||||
uint64 generation;
|
uint64 generation = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We can't register dynamic background workers from the postmaster.
|
* We can't register dynamic background workers from the postmaster.
|
||||||
|
@ -191,9 +191,11 @@ dsm_impl_op(dsm_op op, dsm_handle handle, uint64 request_size,
|
|||||||
return dsm_impl_mmap(op, handle, request_size, impl_private,
|
return dsm_impl_mmap(op, handle, request_size, impl_private,
|
||||||
mapped_address, mapped_size, elevel);
|
mapped_address, mapped_size, elevel);
|
||||||
#endif
|
#endif
|
||||||
}
|
default:
|
||||||
elog(ERROR, "unexpected dynamic shared memory type: %d",
|
elog(ERROR, "unexpected dynamic shared memory type: %d",
|
||||||
dynamic_shared_memory_type);
|
dynamic_shared_memory_type);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user