From dee371fdd4ae25f837b9b2ded7789d07ed739c9e Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Wed, 5 May 2021 11:48:48 +0200 Subject: [PATCH] libgfortran/intrinsics/chmod.c: Silence unused var warning libgfortran/ChangeLog: * intrinsics/chmod.c (chmod_internal): Only declare mode_mask var if HAVE_UMASK. --- libgfortran/intrinsics/chmod.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgfortran/intrinsics/chmod.c b/libgfortran/intrinsics/chmod.c index 8b5140a..d0371ce 100644 --- a/libgfortran/intrinsics/chmod.c +++ b/libgfortran/intrinsics/chmod.c @@ -71,7 +71,10 @@ chmod_internal (char *file, char *mode, gfc_charlen_type mode_len) #ifndef __MINGW32__ bool is_dir; #endif - mode_t mode_mask, file_mode, new_mode; +#ifdef HAVE_UMASK + mode_t mode_mask; +#endif + mode_t file_mode, new_mode; struct stat stat_buf; if (mode_len == 0) -- 2.7.4