From 0f4e3d8f33b685aaa3204d6a6aa73e94d80b0666 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 3 May 2018 10:30:51 +0200 Subject: [PATCH] libfdisk: fix compiler warning [-Wunused-parameter] Reported-by: L A Walsh Signed-off-by: Karel Zak --- libfdisk/src/bsd.c | 4 +--- libfdisk/src/dos.c | 4 +--- libfdisk/src/gpt.c | 4 +--- libfdisk/src/sgi.c | 4 +--- libfdisk/src/sun.c | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c index 6fe9c2a6d1..9ba3140f14 100644 --- a/libfdisk/src/bsd.c +++ b/libfdisk/src/bsd.c @@ -1028,13 +1028,11 @@ static const struct fdisk_field bsd_fields[] = /* * allocates BSD label driver */ -struct fdisk_label *fdisk_new_bsd_label(struct fdisk_context *cxt) +struct fdisk_label *fdisk_new_bsd_label(struct fdisk_context *cxt __attribute__ ((__unused__))) { struct fdisk_label *lb; struct fdisk_bsd_label *bsd; - assert(cxt); - bsd = calloc(1, sizeof(*bsd)); if (!bsd) return NULL; diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index 438d39afd6..49be6c7069 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -2464,13 +2464,11 @@ static const struct fdisk_label_operations dos_operations = /* * allocates DOS in-memory stuff */ -struct fdisk_label *fdisk_new_dos_label(struct fdisk_context *cxt) +struct fdisk_label *fdisk_new_dos_label(struct fdisk_context *cxt __attribute__ ((__unused__))) { struct fdisk_label *lb; struct fdisk_dos_label *dos; - assert(cxt); - dos = calloc(1, sizeof(*dos)); if (!dos) return NULL; diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index 024a7695b3..aa544f666d 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -3140,13 +3140,11 @@ static const struct fdisk_field gpt_fields[] = /* * allocates GPT in-memory stuff */ -struct fdisk_label *fdisk_new_gpt_label(struct fdisk_context *cxt) +struct fdisk_label *fdisk_new_gpt_label(struct fdisk_context *cxt __attribute__ ((__unused__))) { struct fdisk_label *lb; struct fdisk_gpt_label *gpt; - assert(cxt); - gpt = calloc(1, sizeof(*gpt)); if (!gpt) return NULL; diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c index b17bb4245c..fd40f533f4 100644 --- a/libfdisk/src/sgi.c +++ b/libfdisk/src/sgi.c @@ -1178,13 +1178,11 @@ static const struct fdisk_label_operations sgi_operations = }; /* Allocates an SGI label driver. */ -struct fdisk_label *fdisk_new_sgi_label(struct fdisk_context *cxt) +struct fdisk_label *fdisk_new_sgi_label(struct fdisk_context *cxt __attribute__ ((__unused__))) { struct fdisk_label *lb; struct fdisk_sgi_label *sgi; - assert(cxt); - sgi = calloc(1, sizeof(*sgi)); if (!sgi) return NULL; diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c index 7257081f3f..30e6b7f1e7 100644 --- a/libfdisk/src/sun.c +++ b/libfdisk/src/sun.c @@ -1149,13 +1149,11 @@ static const struct fdisk_label_operations sun_operations = /* * allocates SUN label driver */ -struct fdisk_label *fdisk_new_sun_label(struct fdisk_context *cxt) +struct fdisk_label *fdisk_new_sun_label(struct fdisk_context *cxt __attribute__ ((__unused__))) { struct fdisk_label *lb; struct fdisk_sun_label *sun; - assert(cxt); - sun = calloc(1, sizeof(*sun)); if (!sun) return NULL; -- 2.47.2