public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: utils: avoid warning when building path_testsuite-path.o
Date: Thu, 20 May 2021 20:48:10 +0000 (GMT)	[thread overview]
Message-ID: <20210520204810.9D8923857815@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8c6c9b097dc1f6cef0f9ccca47503a158ca3d64d

commit 8c6c9b097dc1f6cef0f9ccca47503a158ca3d64d
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu May 20 22:47:40 2021 +0200

    Cygwin: utils: avoid warning when building path_testsuite-path.o
    
    Avoid this warning:
    
    [...]/winsup/utils/mingw/../path.cc:569:1: warning: 'void read_mounts() ' defined but not used [-Wunused-function]
      569 | read_mounts ()
          | ^~~~~~~~~~~
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/utils/path.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc
index 0d41a45d8..1a412fc9d 100644
--- a/winsup/utils/path.cc
+++ b/winsup/utils/path.cc
@@ -547,6 +547,9 @@ from_fstab (bool user, PWCHAR path, PWCHAR path_end)
 #endif /* !FSTAB_ONLY */
 
 #ifndef FSTAB_ONLY
+#ifdef TESTSUITE
+#define read_mounts testsuite_read_mounts
+#else
 static int
 mnt_sort (const void *a, const void *b)
 {
@@ -640,12 +643,8 @@ read_mounts ()
   from_fstab (true, path, path_end);
   qsort (mount_table, max_mount_entry, sizeof (mnt_t), mnt_sort);
 }
-
-#ifdef TESTSUITE
-#define read_mounts testsuite_read_mounts
 #endif
 
-
 /* Return non-zero if PATH1 is a prefix of PATH2.
    Both are assumed to be of the same path style and / vs \ usage.
    Neither may be "".


                 reply	other threads:[~2021-05-20 20:48 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=20210520204810.9D8923857815@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.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).