Skip to content

fix make warnings in debug.c#7805

Merged
oranagra merged 2 commits intoredis:unstablefrom
daidaotong:patch-2
Sep 20, 2020
Merged

fix make warnings in debug.c#7805
oranagra merged 2 commits intoredis:unstablefrom
daidaotong:patch-2

Conversation

@daidaotong
Copy link
Contributor

fixes build warning:

debug.c:1583:13: warning: unused function 'killThreads' [-Wunused-function]
static void killThreads(void) {
^

the killThreads and killMainThread function are only used in #if defined(HAVE_PROC_MAPS) block, therefore we can avoid the make warnings by enlarging the condition block.

@oranagra
Copy link
Member

@daidaotong thanks.
considering that bioKillThreads and bioKillThreads still exists even when not used (and so is server.main_thread_id), i think i'd prefer to have killThreads too.

how about just remove the static from killThreads instead of the changes you did?

additionally we can also declare it in server.h next to killIOThreads and add the comment ShooterIT suggested where's it's currently already missing.

@daidaotong
Copy link
Contributor Author

hi @oranagra @ShooterIT , please review the new changes regarding these comments. thanks!

@oranagra oranagra merged commit 1b3b752 into redis:unstable Sep 20, 2020
oranagra added a commit that referenced this pull request Oct 27, 2020
Co-authored-by: Oran Agra <[email protected]>
(cherry picked from commit 1b3b752)
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 4, 2020
jschmieg pushed a commit to memKeyDB/memKeyDB that referenced this pull request Nov 6, 2020
Co-authored-by: Oran Agra <[email protected]>
(cherry picked from commit 1b3b752)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants