From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 9D8923857815; Thu, 20 May 2021 20:48:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D8923857815 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: utils: avoid warning when building path_testsuite-path.o X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 3053632389c506143080b6ed5d559aaa1d6de114 X-Git-Newrev: 8c6c9b097dc1f6cef0f9ccca47503a158ca3d64d Message-Id: <20210520204810.9D8923857815@sourceware.org> Date: Thu, 20 May 2021 20:48:10 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2021 20:48:10 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8c6c9b097dc1f6cef0f9ccca47503a158ca3d64d commit 8c6c9b097dc1f6cef0f9ccca47503a158ca3d64d Author: Corinna Vinschen 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 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 "".