* [patch, committed] libgfortran/intrinsics/chmod.c: Silence unused var warning
@ 2021-05-05 9:51 Tobias Burnus
0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2021-05-05 9:51 UTC (permalink / raw)
To: gcc-patches, fortran
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
Found with amdgcn – silences a build warning there.
Committed as r12-509-gdee371fdd4ae25f837b9b2ded7789d07ed739c9e
Tobias
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf
[-- Attachment #2: committed.diff --]
[-- Type: text/x-patch, Size: 831 bytes --]
commit dee371fdd4ae25f837b9b2ded7789d07ed739c9e
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Wed May 5 11:48:48 2021 +0200
libgfortran/intrinsics/chmod.c: Silence unused var warning
libgfortran/ChangeLog:
* intrinsics/chmod.c (chmod_internal): Only declare mode_mask var
if HAVE_UMASK.
diff --git a/libgfortran/intrinsics/chmod.c b/libgfortran/intrinsics/chmod.c
index 8b5140a05a3..d0371ce560f 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-05 9:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 9:51 [patch, committed] libgfortran/intrinsics/chmod.c: Silence unused var warning Tobias Burnus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).