]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common: prevent unset_dumpable from generating warnings
authorWillem Jan Withagen <wjw@digiware.nl>
Thu, 20 Jul 2017 21:01:20 +0000 (23:01 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Fri, 21 Jul 2017 07:22:24 +0000 (09:22 +0200)
 - Let the struct at least have a CTR

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/include/coredumpctl.h

index e4424941f4335f9ebc6290420e4fadec5c56a46d..9b0f160e0a397850f7b3309b5a2cf9ebeeb4af94 100644 (file)
@@ -1,3 +1,5 @@
+#pragma once
+
 #ifdef HAVE_SYS_PRCTL_H
 #include <iostream>
 #include <sys/prctl.h>
@@ -34,6 +36,12 @@ struct PrCtl {
     set_dumpable(saved_state);
   }
 };
+
 #else
-struct PrCtl {};
+
+struct PrCtl {
+  // to silence the Wunused-variable warning
+  PrCtl() {}
+};
+
 #endif