diff mbox series

[14/17] selinux_internal.h: disable warnings on deprecated

Message ID 20200225200219.6163-15-william.c.roberts@intel.com (mailing list archive)
State Changes Requested
Headers show
Series [01/17] security_load_booleans: update return comment | expand

Commit Message

William Roberts Feb. 25, 2020, 8:02 p.m. UTC
From: William Roberts <william.c.roberts@intel.com>

selinux_internal.h marks the visibility of symbols, many of these are
the deprecated routines that get marked as hidden. This causes compilers
to warn about deprecated uses. However this is a valid annotation that
we want to keep, until the functions are finally removed.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
---
 libselinux/src/selinux_internal.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/libselinux/src/selinux_internal.h b/libselinux/src/selinux_internal.h
index f6a50cd36f63..2d9373b86190 100644
--- a/libselinux/src/selinux_internal.h
+++ b/libselinux/src/selinux_internal.h
@@ -2,6 +2,12 @@ 
 #include <pthread.h>
 #include "dso.h"
 
+/*
+ * Disable deprecated warnings for users internal to the library.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 hidden_proto(selinux_mkload_policy)
 hidden_proto(fini_selinuxmnt)
 hidden_proto(set_selinuxmnt)
@@ -181,3 +187,5 @@  extern int selinux_page_size hidden;
 #define SELINUXCONFIG SELINUXDIR "config"
 
 extern int has_selinux_config hidden;
+
+#pragma GCC diagnostic pop