]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: remove unused variable ct
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 12 Dec 2022 21:07:31 +0000 (21:07 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 12 Dec 2022 21:07:46 +0000 (21:07 +0000)
libfdisk/src/script.c

index 32e2fe9bc5cd13372de25428a33403248ec69566..f537a7d99ee3ef784e6e07f5eae0f1e065dc3007 100644 (file)
@@ -554,7 +554,6 @@ static int write_file_json(struct fdisk_script *dp, FILE *f)
        struct fdisk_partition *pa;
        struct fdisk_iter itr;
        const char *devname = NULL;
-       int ct = 0;
        struct ul_jsonwrt json;
 
        assert(dp);
@@ -608,7 +607,6 @@ static int write_file_json(struct fdisk_script *dp, FILE *f)
        while (fdisk_table_next_partition(dp->table, &itr, &pa) == 0) {
                char *p = NULL;
 
-               ct++;
                ul_jsonwrt_object_open(&json, NULL);
                if (devname)
                        p = fdisk_partname(devname, pa->partno + 1);