public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: Fix remaining warnings building path testsuite Date: Wed, 2 Dec 2020 15:32:30 +0000 (GMT) [thread overview] Message-ID: <20201202153230.688B7395C81D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=604bb7126e37a64cac6275fdfcbf98366624d6c1 commit 604bb7126e37a64cac6275fdfcbf98366624d6c1 Author: Corinna Vinschen <corinna@vinschen.de> Date: Tue Dec 1 10:10:40 2020 +0100 Cygwin: Fix remaining warnings building path testsuite Diff: --- winsup/utils/Makefile.in | 2 +- winsup/utils/path.cc | 6 ++---- winsup/utils/testsuite.cc | 2 ++ winsup/utils/testsuite.h | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index 01d2f3062..e4f55dd3c 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -124,7 +124,7 @@ MINGW_BINS += testsuite.exe MINGW_OBJS += path-testsuite.o testsuite.o testsuite.exe: path-testsuite.o path-testsuite.cc: path.cc ; @test -L $@ || ln -sf ${filter %.cc,$^} $@ -path-testsuite.o: MINGW_CXXFLAGS += -DTESTSUITE -Wno-error=write-strings +path-testsuite.o: MINGW_CXXFLAGS += -DTESTSUITE # this is necessary because this .c lives in the build dir instead of src path-testsuite.o: MINGW_CXXFLAGS += -I$(srcdir) path-testsuite.cc path.cc testsuite.cc: testsuite.h diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc index 4c1bb4029..29344be02 100644 --- a/winsup/utils/path.cc +++ b/winsup/utils/path.cc @@ -559,6 +559,7 @@ from_fstab (bool user, PWCHAR path, PWCHAR path_end) #ifndef FSTAB_ONLY +#ifndef TESTSUITE static int mnt_sort (const void *a, const void *b) { @@ -580,9 +581,6 @@ extern "C" WCHAR cygwin_dll_path[]; static void read_mounts () { -/* If TESTSUITE is defined, bypass this whole function as a harness - mount table will be provided. */ -#ifndef TESTSUITE HKEY setup_key; LONG ret; DWORD len; @@ -654,8 +652,8 @@ read_mounts () from_fstab (false, path, path_end); from_fstab (true, path, path_end); qsort (mount_table, max_mount_entry, sizeof (mnt_t), mnt_sort); -#endif /* !defined(TESTSUITE) */ } +#endif /* !defined(TESTSUITE) */ /* Return non-zero if PATH1 is a prefix of PATH2. Both are assumed to be of the same path style and / vs \ usage. diff --git a/winsup/utils/testsuite.cc b/winsup/utils/testsuite.cc index c0a800b01..23ed8e0d8 100644 --- a/winsup/utils/testsuite.cc +++ b/winsup/utils/testsuite.cc @@ -15,7 +15,9 @@ details. */ #include <unistd.h> #define WIN32_LEAN_AND_MEAN #include <windows.h> +#ifndef TESTSUITE #define TESTSUITE +#endif #include "testsuite.h" typedef struct diff --git a/winsup/utils/testsuite.h b/winsup/utils/testsuite.h index d0a47b23a..0dd631539 100644 --- a/winsup/utils/testsuite.h +++ b/winsup/utils/testsuite.h @@ -30,12 +30,12 @@ details. */ #if defined(TESTSUITE_MOUNT_TABLE) static mnt_t mount_table[] = { /* native posix flags */ - { TESTSUITE_ROOT, (char*)"/", MOUNT_SYSTEM}, - { "O:\\other", (char*)"/otherdir", MOUNT_SYSTEM}, - { "S:\\some\\dir", (char*)"/somedir", MOUNT_SYSTEM}, - { TESTSUITE_ROOT"\\bin", (char*)"/usr/bin", MOUNT_SYSTEM}, - { TESTSUITE_ROOT"\\lib", (char*)"/usr/lib", MOUNT_SYSTEM}, - { ".", (char*)TESTSUITE_CYGDRIVE, MOUNT_SYSTEM | MOUNT_CYGDRIVE}, + { (char*)TESTSUITE_ROOT, (char*)"/", MOUNT_SYSTEM}, + { (char*)"O:\\other", (char*)"/otherdir", MOUNT_SYSTEM}, + { (char*)"S:\\some\\dir", (char*)"/somedir", MOUNT_SYSTEM}, + { (char*)TESTSUITE_ROOT"\\bin", (char*)"/usr/bin", MOUNT_SYSTEM}, + { (char*)TESTSUITE_ROOT"\\lib", (char*)"/usr/lib", MOUNT_SYSTEM}, + { (char*)".", (char*)TESTSUITE_CYGDRIVE, MOUNT_SYSTEM | MOUNT_CYGDRIVE}, { NULL, (char*)NULL, 0} };
reply other threads:[~2020-12-02 15:32 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=20201202153230.688B7395C81D@sourceware.org \ --to=jturney@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: linkBe 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).