]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: fix compiler warning [-Wunused-parameter]
authorKarel Zak <kzak@redhat.com>
Thu, 3 May 2018 08:30:51 +0000 (10:30 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Jul 2018 13:39:25 +0000 (15:39 +0200)
Reported-by: L A Walsh <lkml@tlinx.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/bsd.c
libfdisk/src/dos.c
libfdisk/src/gpt.c
libfdisk/src/sgi.c
libfdisk/src/sun.c

index 6fe9c2a6d1c453725d2382fb8f84ba56444be83c..9ba3140f147ae4254971a066f2f51a787749befc 100644 (file)
@@ -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;
index 438d39afd6d66e7a09ee5e9495f574e2609edeb9..49be6c70694cf27bcb793566a73cb80b97447e39 100644 (file)
@@ -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;
index 024a7695b388a55da939440ca95996e129f5e49d..aa544f666dbefb5288faa942028fc3ab3a3b2f5d 100644 (file)
@@ -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;
index b17bb4245c352793126ba084830a592358149016..fd40f533f432ed75f6e38346a8e632b09f70dde6 100644 (file)
@@ -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;
index 7257081f3f0ada6e98f5d4d3749928ea2b21fa7d..30e6b7f1e7cfc93909784b0f4cab484494879fd5 100644 (file)
@@ -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;