]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
misc: fix warnings "unused parameter" [-Wunused-parameter]
authorRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 22 Feb 2016 23:26:46 +0000 (00:26 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 23 Feb 2016 02:18:24 +0000 (03:18 +0100)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
libblkid/src/superblocks/minix.c
libblkid/src/superblocks/nilfs.c
libblkid/src/superblocks/xfs.c
libblkid/src/superblocks/zfs.c
libfdisk/src/dos.c
libfdisk/src/script.c
libsmartcols/src/table_print.c

index cb8b84f3a329100d8fa2e560ad5fb6002c96a5b9..d350f8978e490fe3fa265c700a4207036b5ad9dd 100644 (file)
@@ -71,7 +71,8 @@ static int get_minix_version(const unsigned char *data, int *other_endian)
        return version;
 }
 
-static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag)
+static int probe_minix(blkid_probe pr,
+               const struct blkid_idmag *mag __attribute__((__unused__)))
 {
        unsigned char *ext;
        const unsigned char *data;
index 011ad95216f93cc9607cc3dcc9273aad22771950..d12472c7ecf4252c73f8caa69902f53a8246d1dd 100644 (file)
@@ -89,7 +89,8 @@ static int nilfs_valid_sb(blkid_probe pr, struct nilfs_super_block *sb, int is_b
        return blkid_probe_verify_csum(pr, crc, le32_to_cpu(sb->s_sum));
 }
 
-static int probe_nilfs2(blkid_probe pr, const struct blkid_idmag *mag)
+static int probe_nilfs2(blkid_probe pr,
+               const struct blkid_idmag *mag __attribute__((__unused__)))
 {
        struct nilfs_super_block *sb, *sbp, *sbb;
        int valid[2], swp = 0;
index d13c849e1f78f8a182df45110f2f661f2c853cc5..575651b22c73d553c166f95f4389f7bab1866cc9 100644 (file)
@@ -241,7 +241,8 @@ static int xlog_valid_rec_header(struct xlog_rec_header *rhead)
 }
 
 /* xlog record header will be in some sector in the first 256k */
-static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag)
+static int probe_xfs_log(blkid_probe pr,
+               const struct blkid_idmag *mag __attribute__((__unused__)))
 {
        int i;
        struct xlog_rec_header *rhead;
index c505a720431fc8c429ef9d14c57d043d1260aed2..f44fe528f423c2609a519a92ab531af33de53245 100644 (file)
@@ -199,7 +199,8 @@ static int find_uberblocks(const void *label, loff_t *ub_offset, int *swap_endia
 /* ZFS has 128x1kB host-endian root blocks, stored in 2 areas at the start
  * of the disk, and 2 areas at the end of the disk.  Check only some of them...
  * #4 (@ 132kB) is the first one written on a new filesystem. */
-static int probe_zfs(blkid_probe pr, const struct blkid_idmag *mag)
+static int probe_zfs(blkid_probe pr,
+       const struct blkid_idmag *mag  __attribute__((__unused__)))
 {
        int swab_endian = 0;
        struct zfs_uberblock *ub;
index c04ee7106bb1f91744eb27f2a1224186ea76a6a9..d4d66f63967f230641a07161aed53691b8edef6c 100644 (file)
@@ -985,7 +985,7 @@ static fdisk_sector_t get_possible_last(struct fdisk_context *cxt, size_t n)
  * last[] are fill_bounds() results */
 static fdisk_sector_t get_unused_last(struct fdisk_context *cxt, size_t n,
                                fdisk_sector_t start,
-                               fdisk_sector_t first[], fdisk_sector_t last[])
+                               fdisk_sector_t first[])
 {
        size_t i;
        fdisk_sector_t limit = get_possible_last(cxt, n);
@@ -1127,7 +1127,7 @@ static int add_partition(struct fdisk_context *cxt, size_t n,
                }
        }
 
-       limit = get_unused_last(cxt, n, start, first, last);
+       limit = get_unused_last(cxt, n, start, first);
 
        if (start > limit) {
                fdisk_warnx(cxt, _("No free sectors available."));
index b80f88e3b6b5889a3df2bfac1e9057df1b14c109..6fba120df95e419e7daa9417327d0c59fea67c24 100644 (file)
@@ -40,7 +40,7 @@ struct fdisk_script {
 };
 
 
-static void fdisk_script_free_header(struct fdisk_script *dp, struct fdisk_scriptheader *fi)
+static void fdisk_script_free_header(struct fdisk_scriptheader *fi)
 {
        if (!fi)
                return;
@@ -152,7 +152,7 @@ static void fdisk_reset_script(struct fdisk_script *dp)
        while (!list_empty(&dp->headers)) {
                struct fdisk_scriptheader *fi = list_entry(dp->headers.next,
                                                  struct fdisk_scriptheader, headers);
-               fdisk_script_free_header(dp, fi);
+               fdisk_script_free_header(fi);
        }
        INIT_LIST_HEAD(&dp->headers);
 }
@@ -275,7 +275,7 @@ int fdisk_script_set_header(struct fdisk_script *dp,
                DBG(SCRIPT, ul_debugobj(dp, "freeing header %s", name));
 
                /* no data, remove the header */
-               fdisk_script_free_header(dp, fi);
+               fdisk_script_free_header(fi);
                return 0;
        }
 
@@ -290,7 +290,7 @@ int fdisk_script_set_header(struct fdisk_script *dp,
                fi->name = strdup(name);
                fi->data = strdup(data);
                if (!fi->data || !fi->name) {
-                       fdisk_script_free_header(dp, fi);
+                       fdisk_script_free_header(fi);
                        return -ENOMEM;
                }
                list_add_tail(&fi->headers, &dp->headers);
index d6622be64ec40c8c2b69891338a1bd79cad2ce7d..55306389a768f2c764a0338c46b55d2c3c4ee4f3 100644 (file)
@@ -281,8 +281,7 @@ static const char *get_cell_color(struct libscols_table *tb,
 static void print_newline_padding(struct libscols_table *tb,
                                  struct libscols_column *cl,
                                  struct libscols_line *ln,     /* optional */
-                                 size_t bufsz,
-                                 size_t len)
+                                 size_t bufsz)
 {
        size_t i;
 
@@ -509,7 +508,7 @@ static int print_data(struct libscols_table *tb,
                return 0;
 
        if (len > width && !scols_column_is_trunc(cl))
-               print_newline_padding(tb, cl, ln, buf->bufsz, len);     /* next column starts on next line */
+               print_newline_padding(tb, cl, ln, buf->bufsz);  /* next column starts on next line */
        else
                fputs(colsep(tb), tb->out);             /* columns separator */