From: Eric Biggers <ebiggers@kernel.org>
To: linux-ext4@vger.kernel.org
Subject: [PATCH 3/4] lib/ext2fs: don't warn about lack of getmntent on Windows
Date: Sat, 28 Jan 2023 14:46:50 -0800 [thread overview]
Message-ID: <20230128224651.59593-4-ebiggers@kernel.org> (raw)
In-Reply-To: <20230128224651.59593-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@google.com>
It is expected that Windows doesn't have getmntent(), so don't warn
about it.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
lib/ext2fs/Android.bp | 1 -
lib/ext2fs/ismounted.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/ext2fs/Android.bp b/lib/ext2fs/Android.bp
index eb4482d79..f5cbeec9f 100644
--- a/lib/ext2fs/Android.bp
+++ b/lib/ext2fs/Android.bp
@@ -121,7 +121,6 @@ cc_library {
enabled: true,
include_dirs: ["external/e2fsprogs/include/mingw"],
cflags: [
- "-Wno-error=cpp",
"-Wno-format",
"-Wno-unused-variable",
"-Wno-error=typedef-redefinition",
diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c
index 22bc8352b..a7db1a5c4 100644
--- a/lib/ext2fs/ismounted.c
+++ b/lib/ext2fs/ismounted.c
@@ -414,7 +414,7 @@ errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags,
#ifdef HAVE_GETMNTINFO
retval = check_getmntinfo(device, mount_flags, mtpt, mtlen);
#else
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_WIN32)
#warning "Can't use getmntent or getmntinfo to check for mounted filesystems!"
#endif
*mount_flags = 0;
--
2.39.1
next prev parent reply other threads:[~2023-01-28 22:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-28 22:46 [PATCH 0/4] e2fsprogs: a few more warning fixes Eric Biggers
2023-01-28 22:46 ` [PATCH 1/4] ci.yml: ensure -Werror really gets used in all cases Eric Biggers
2023-01-30 5:07 ` Theodore Ts'o
2023-01-28 22:46 ` [PATCH 2/4] debugfs: fix a -Wformat warning in dump_journal() Eric Biggers
2023-01-30 5:08 ` Theodore Ts'o
2023-01-28 22:46 ` Eric Biggers [this message]
2023-01-30 5:08 ` [PATCH 3/4] lib/ext2fs: don't warn about lack of getmntent on Windows Theodore Ts'o
2023-01-28 22:46 ` [PATCH 4/4] lib/uuid: remove unneeded Windows UUID workaround Eric Biggers
2023-01-30 5:09 ` Theodore Ts'o
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=20230128224651.59593-4-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=linux-ext4@vger.kernel.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 NNTP newsgroup(s).