@@ -22,7 +22,10 @@ static __attribute__ ((__noreturn__)) void usage(const char *progname)
static int printmatchpathcon(const char *path, int header, int mode)
{
char *buf;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
int rc = matchpathcon(path, mode, &buf);
+#pragma GCC diagnostic pop
if (rc < 0) {
if (errno == ENOENT) {
buf = strdup("<<none>>");
@@ -103,7 +106,10 @@ int main(int argc, char **argv)
exit(1);
}
init = 1;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
if (matchpathcon_init(optarg)) {
+#pragma GCC diagnostic pop
fprintf(stderr,
"Error while processing %s: %s\n",
optarg,
@@ -195,6 +201,9 @@ int main(int argc, char **argv)
error |= printmatchpathcon(path, header, mode);
}
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
matchpathcon_fini();
+#pragma GCC diagnostic pop
return error;
}