Skip to content

Conversation

@ppisar
Copy link

@ppisar ppisar commented Dec 1, 2023

This is based on pull request #2 and will fix building with GCC 14.

Schievel1 and others added 2 commits December 15, 2022 22:47
Clang 16 will not allow implicit ints, implicit function declarations etc.
by default. This patch overhauls to whole package source to make it build
with clang16. It also gets rid of old K&R style function declaration.

Bug: https://bugs.gentoo.org/870940

Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
GCC 14 will error if a value returned from a function does not match
a function prototype. This can be reproduced with -Wreturn-mismatch
option and is a problem compilers where a signal handler should return
void:

    daemon.c: In function ‘sigchld_handler’:
    daemon.c:108:10: error: ‘return’ with a value, in function returning void
      108 |   return 0;
      |          ^
    daemon.c:92:1: note: declared here
       92 | sigchld_handler(
      | ^~~~~~~~~~~~~~~
    daemon.c: In function ‘sighup_handler’:
    daemon.c:117:10: error: ‘return’ with a value, in function returning void
      117 |   return 0;
      |          ^
    daemon.c:112:1: note: declared here
      112 | sighup_handler(
      | ^~~~~~~~~~~~~~
    daemon.c: In function ‘exit_handler’:
    daemon.c:127:10: error: ‘return’ with a value, in function returning void
      127 |   return 0;
      |          ^

This patch fixes it.
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.

2 participants