summaryrefslogtreecommitdiffstats
path: root/libfdisk
diff options
context:
space:
mode:
authorRuediger Meier2018-09-26 00:37:28 +0200
committerKarel Zak2018-10-04 11:56:22 +0200
commite5e3a87cdb4ab47fd2ce9c4eb4dd3ca29af4bd36 (patch)
tree34839d3a8dfb457b2603f5cc575c3a8c765081ec /libfdisk
parentagetty: cleanup code to copy to log strings (diff)
downloadkernel-qcow2-util-linux-e5e3a87cdb4ab47fd2ce9c4eb4dd3ca29af4bd36.tar.gz
kernel-qcow2-util-linux-e5e3a87cdb4ab47fd2ce9c4eb4dd3ca29af4bd36.tar.xz
kernel-qcow2-util-linux-e5e3a87cdb4ab47fd2ce9c4eb4dd3ca29af4bd36.zip
libfdisk: fix OSX compiler warning
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>
Diffstat (limited to 'libfdisk')
-rw-r--r--libfdisk/src/context.c8
1 files 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: