mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
lightningd: fix compile error on unused variable
Switch to write_all instead Error on gcc 7.3.0: lightningd/lightningd.c: In function ‘on_sigterm’: lightningd/lightningd.c:587:9: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result] write(STDERR_FILENO, msg, strlen(msg)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
4f16044404
commit
4d9190aa47
@ -577,14 +577,14 @@ void notify_new_block(struct lightningd *ld, u32 block_height)
|
||||
static void on_sigint(int _ UNUSED)
|
||||
{
|
||||
static const char *msg = "lightningd: SIGINT caught, exiting.\n";
|
||||
write(STDERR_FILENO, msg, strlen(msg));
|
||||
write_all(STDERR_FILENO, msg, strlen(msg));
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
static void on_sigterm(int _ UNUSED)
|
||||
{
|
||||
static const char *msg = "lightningd: SIGTERM caught, exiting.\n";
|
||||
write(STDERR_FILENO, msg, strlen(msg));
|
||||
write_all(STDERR_FILENO, msg, strlen(msg));
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user