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

Commitd89746c

Browse files
committed
Fix compiler warning.
Kevin Gritter reports that his compiler complains about inq and outqbeing possibly-uninitialized at the point where they are passed toshm_mq_attach(). They are initialized by the call tosetup_dynamic_shared_memory, but apparently his compiler is inliningthat function and then having doubts about whether the for loop willalways execute at least once. Fix by initializing them to NULL.
1 parentbe361ef commitd89746c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎contrib/test_shm_mq/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ test_shm_mq_setup(uint64 queue_size, int32 nworkers, dsm_segment **segp,
5050
{
5151
dsm_segment*seg;
5252
test_shm_mq_header*hdr;
53-
shm_mq*outq;
54-
shm_mq*inq;
53+
shm_mq*outq=NULL;/* placate compiler */
54+
shm_mq*inq=NULL;/* placate compiler */
5555
worker_state*wstate;
5656

5757
/* Set up a dynamic shared memory segment. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp