From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Subject: [PATCH 1/2] libfdisk: fix OSX compiler warning
Date: Wed, 26 Sep 2018 00:37:28 +0200 [thread overview]
Message-ID: <20180925223729.28934-2-sweet_f_a@gmx.de> (raw)
In-Reply-To: <20180925223729.28934-1-sweet_f_a@gmx.de>
From: Ruediger Meier <ruediger.meier@ga-group.nl>
libfdisk/src/context.c:1354:54: error: unused parameter 'cxt' [-Werror,-Wunused-parameter]
const char *fdisk_get_devmodel(struct fdisk_context *cxt)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
libfdisk/src/context.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c
index ad5f99de4..18ebeba18 100644
--- a/libfdisk/src/context.c
+++ b/libfdisk/src/context.c
@@ -1351,9 +1351,9 @@ dev_t fdisk_get_devno(struct fdisk_context *cxt)
*
* Returns: device model string or NULL.
*/
+#ifdef __linux__
const char *fdisk_get_devmodel(struct fdisk_context *cxt)
{
-#ifdef __linux__
assert(cxt);
if (cxt->dev_model_probed)
@@ -1369,11 +1369,13 @@ const char *fdisk_get_devmodel(struct fdisk_context *cxt)
}
cxt->dev_model_probed = 1;
return cxt->dev_model;
+}
#else
+const char *fdisk_get_devmodel(struct fdisk_context *cxt __attribute__((__unused__)))
+{
return NULL;
-#endif
-
}
+#endif
/**
* fdisk_get_devfd:
--
2.13.7
next prev parent reply other threads:[~2018-09-26 4:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 22:37 [PATCH 0/2] minor fixes for v2.33 Ruediger Meier
2018-09-25 22:37 ` Ruediger Meier [this message]
2018-09-25 22:37 ` [PATCH 2/2] libfdisk: fix printf format modifier Ruediger Meier
2018-10-04 9:58 ` [PATCH 0/2] minor fixes for v2.33 Karel Zak
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=20180925223729.28934-2-sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=util-linux@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).