summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfdisk/src/utils.c')
-rw-r--r--libfdisk/src/utils.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libfdisk/src/utils.c b/libfdisk/src/utils.c
index 6b6167d..a7c8bfa 100644
--- a/libfdisk/src/utils.c
+++ b/libfdisk/src/utils.c
@@ -183,11 +183,15 @@ done:
}
#ifdef TEST_PROGRAM
-struct fdisk_label *fdisk_new_dos_label(struct fdisk_context *cxt) { return NULL; }
-struct fdisk_label *fdisk_new_bsd_label(struct fdisk_context *cxt) { return NULL; }
+struct fdisk_label *fdisk_new_dos_label(struct fdisk_context *cxt __attribute__((unused))) { return NULL; }
+struct fdisk_label *fdisk_new_bsd_label(struct fdisk_context *cxt __attribute__((unused))) { return NULL; }
-static int test_partnames(struct fdisk_test *ts, int argc, char *argv[])
+static int test_partnames(struct fdisk_test *ts __attribute__((unused)),
+ int argc, char *argv[])
{
+ if (argc != 2)
+ return -1;
+
size_t i;
const char *disk = argv[1];