From ecd31091f2bc673ad39eadd7a5f9b56ef0eb6a30 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Thu, 20 Jul 2017 23:01:20 +0200 Subject: [PATCH] common: prevent unset_dumpable from generating warnings - Let the struct at least have a CTR Signed-off-by: Willem Jan Withagen --- src/include/coredumpctl.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/include/coredumpctl.h b/src/include/coredumpctl.h index e4424941f4335..9b0f160e0a397 100644 --- a/src/include/coredumpctl.h +++ b/src/include/coredumpctl.h @@ -1,3 +1,5 @@ +#pragma once + #ifdef HAVE_SYS_PRCTL_H #include #include @@ -34,6 +36,12 @@ struct PrCtl { set_dumpable(saved_state); } }; + #else -struct PrCtl {}; + +struct PrCtl { + // to silence the Wunused-variable warning + PrCtl() {} +}; + #endif