summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-08-08 16:21:45 +0800
committerPo Lu <luangruo@yahoo.com>2023-08-08 16:21:45 +0800
commiteeda9eff1aa1ad973851d6589c5bcf6020a090e8 (patch)
treef304f2d7edb79f01c36a00e9cb1be7160ca61892 /src/fileio.c
parent440f017658aabe90668c9f6afbd38c1d892c1f6d (diff)
downloademacs-eeda9eff1aa1ad973851d6589c5bcf6020a090e8.tar.gz
; * src/fileio.c (Ffile_selinux_context): Avoid unused variable.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 5d01e10f0ef..b2186a027d4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3372,7 +3372,9 @@ or if SELinux is disabled, or if Emacs lacks SELinux support. */)
{
Lisp_Object user = Qnil, role = Qnil, type = Qnil, range = Qnil;
Lisp_Object absname = expand_and_dir_to_file (filename);
+#ifdef HAVE_LIBSELINUX
const char *file;
+#endif /* HAVE_LIBSELINUX */
/* If the file name has special constructs in it,
call the corresponding file name handler. */
@@ -3381,9 +3383,9 @@ or if SELinux is disabled, or if Emacs lacks SELinux support. */)
if (!NILP (handler))
return call2 (handler, Qfile_selinux_context, absname);
+#ifdef HAVE_LIBSELINUX
file = SSDATA (ENCODE_FILE (absname));
-#if HAVE_LIBSELINUX
if (selinux_enabled_p (file))
{
char *con;