From: William Roberts <william.c.roberts@xxxxxxxxx> 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@xxxxxxxxx> --- libselinux/src/selinux_internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.17.1