public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>, fortran <fortran@gcc.gnu.org>
Subject: [patch, committed] libgfortran/intrinsics/chmod.c: Silence unused var warning
Date: Wed, 5 May 2021 11:51:54 +0200	[thread overview]
Message-ID: <57eb1b48-6f9a-a175-5d3e-d267386343d6@codesourcery.com> (raw)

[-- 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)

                 reply	other threads:[~2021-05-05  9:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57eb1b48-6f9a-a175-5d3e-d267386343d6@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).