From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> 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@xxxxxxxxxxx> --- 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