From 7464272caa1a69e3fc7971d1d80b6afd4785abef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Mon, 3 May 2021 17:10:51 +0200 Subject: [PATCH] libselinux: selinux_restorecon: mark local variable static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The variable `dir_xattr_list` is only used inside `selinux_restorecon.c`. selinux_restorecon.c:65:19: warning: no previous extern declaration for non-static variable 'dir_xattr_list' [-Wmissing-variable-declarations] struct dir_xattr *dir_xattr_list; ^ selinux_restorecon.c:65:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit struct dir_xattr *dir_xattr_list; ^ Signed-off-by: Christian Göttsche --- libselinux/src/selinux_restorecon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c index 63fb8dc53c28..249c361fa988 100644 --- a/libselinux/src/selinux_restorecon.c +++ b/libselinux/src/selinux_restorecon.c @@ -62,7 +62,7 @@ static uint64_t fc_count = 0; /* Number of files processed so far */ static uint64_t efile_count; /* Estimated total number of files */ /* Store information on directories with xattr's. */ -struct dir_xattr *dir_xattr_list; +static struct dir_xattr *dir_xattr_list; static struct dir_xattr *dir_xattr_last; /* restorecon_flags for passing to restorecon_sb() */ -- 2.32.0