diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-11-29 16:45:45 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-11-29 16:45:45 +0100 |
commit | 327f550669a80d72f36bc9e4de619c163aa46eff (patch) | |
tree | d304092aeb06539085be1385ab9298876c414b44 /util-linux | |
parent | 9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 (diff) | |
download | busybox-w32-327f550669a80d72f36bc9e4de619c163aa46eff.tar.gz busybox-w32-327f550669a80d72f36bc9e4de619c163aa46eff.tar.bz2 busybox-w32-327f550669a80d72f36bc9e4de619c163aa46eff.zip |
Use unsigned printf/scanf conversion where more appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/fdformat.c | 2 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 2 | ||||
-rw-r--r-- | util-linux/ipcs.c | 10 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 2 | ||||
-rw-r--r-- | util-linux/readprofile.c | 12 |
5 files changed, 14 insertions, 14 deletions
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index b3e918fb0..6f49cec8f 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c | |||
@@ -72,7 +72,7 @@ int fdformat_main(int argc UNUSED_PARAM, char **argv) | |||
72 | /* original message was: "Could not determine current format type" */ | 72 | /* original message was: "Could not determine current format type" */ |
73 | xioctl(fd, FDGETPRM, ¶m); | 73 | xioctl(fd, FDGETPRM, ¶m); |
74 | 74 | ||
75 | printf("%s-sided, %d tracks, %d sec/track. Total capacity %d kB\n", | 75 | printf("%s-sided, %u tracks, %u sec/track. Total capacity %d kB\n", |
76 | (param.head == 2) ? "Double" : "Single", | 76 | (param.head == 2) ? "Double" : "Single", |
77 | param.track, param.sect, param.size >> 1); | 77 | param.track, param.sect, param.size >> 1); |
78 | 78 | ||
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index c1d1b2cc3..33767a1af 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -686,7 +686,7 @@ static void get_inode_common(unsigned nr, uint16_t i_mode) | |||
686 | total++; | 686 | total++; |
687 | if (!inode_count[nr]) { | 687 | if (!inode_count[nr]) { |
688 | if (!inode_in_use(nr)) { | 688 | if (!inode_in_use(nr)) { |
689 | printf("Inode %d is marked as 'unused', but it is used " | 689 | printf("Inode %u is marked as 'unused', but it is used " |
690 | "for file '%s'\n", nr, current_name); | 690 | "for file '%s'\n", nr, current_name); |
691 | if (OPT_repair) { | 691 | if (OPT_repair) { |
692 | if (ask("Mark as 'in use'", 1)) | 692 | if (ask("Mark as 'in use'", 1)) |
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index 2668cafd4..67a25a8ef 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c | |||
@@ -166,10 +166,10 @@ static NOINLINE void do_shm(void) | |||
166 | case STATUS: | 166 | case STATUS: |
167 | printf("------ Shared Memory %s --------\n", "Status"); | 167 | printf("------ Shared Memory %s --------\n", "Status"); |
168 | printf("segments allocated %d\n" | 168 | printf("segments allocated %d\n" |
169 | "pages allocated %ld\n" | 169 | "pages allocated %lu\n" |
170 | "pages resident %ld\n" | 170 | "pages resident %lu\n" |
171 | "pages swapped %ld\n" | 171 | "pages swapped %lu\n" |
172 | "Swap performance: %ld attempts\t%ld successes\n", | 172 | "Swap performance: %lu attempts\t%lu successes\n", |
173 | shm_info.used_ids, | 173 | shm_info.used_ids, |
174 | shm_info.shm_tot, | 174 | shm_info.shm_tot, |
175 | shm_info.shm_rss, | 175 | shm_info.shm_rss, |
@@ -569,7 +569,7 @@ static void print_sem(int semid) | |||
569 | if (val < 0 || ncnt < 0 || zcnt < 0 || pid < 0) { | 569 | if (val < 0 || ncnt < 0 || zcnt < 0 || pid < 0) { |
570 | bb_perror_msg_and_die("semctl"); | 570 | bb_perror_msg_and_die("semctl"); |
571 | } | 571 | } |
572 | printf("%-10d %-10d %-10d %-10d %-10d\n", i, val, ncnt, zcnt, pid); | 572 | printf("%-10u %-10d %-10d %-10d %-10d\n", i, val, ncnt, zcnt, pid); |
573 | } | 573 | } |
574 | bb_putchar('\n'); | 574 | bb_putchar('\n'); |
575 | } | 575 | } |
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 49afd1176..d65a5161c 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -505,7 +505,7 @@ static void get_list_blocks(char *filename) | |||
505 | 505 | ||
506 | listfile = xfopen_for_read(filename); | 506 | listfile = xfopen_for_read(filename); |
507 | while (!feof(listfile)) { | 507 | while (!feof(listfile)) { |
508 | fscanf(listfile, "%ld\n", &blockno); | 508 | fscanf(listfile, "%lu\n", &blockno); |
509 | mark_zone(blockno); | 509 | mark_zone(blockno); |
510 | G.badblocks++; | 510 | G.badblocks++; |
511 | } | 511 | } |
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index 974fe89c4..a64540464 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
@@ -152,7 +152,7 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
152 | 152 | ||
153 | step = buf[0]; | 153 | step = buf[0]; |
154 | if (optInfo) { | 154 | if (optInfo) { |
155 | printf("Sampling_step: %i\n", step); | 155 | printf("Sampling_step: %u\n", step); |
156 | return EXIT_SUCCESS; | 156 | return EXIT_SUCCESS; |
157 | } | 157 | } |
158 | 158 | ||
@@ -219,10 +219,10 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
219 | && (fn_len = next_add-fn_add) != 0 | 219 | && (fn_len = next_add-fn_add) != 0 |
220 | ) { | 220 | ) { |
221 | if (optVerbose) | 221 | if (optVerbose) |
222 | printf("%016llx %-40s %6i %8.4f\n", fn_add, | 222 | printf("%016llx %-40s %6u %8.4f\n", fn_add, |
223 | fn_name, this, this/(double)fn_len); | 223 | fn_name, this, this/(double)fn_len); |
224 | else | 224 | else |
225 | printf("%6i %-40s %8.4f\n", | 225 | printf("%6u %-40s %8.4f\n", |
226 | this, fn_name, this/(double)fn_len); | 226 | this, fn_name, this/(double)fn_len); |
227 | if (optSub) { | 227 | if (optSub) { |
228 | unsigned long long scan; | 228 | unsigned long long scan; |
@@ -246,14 +246,14 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
246 | } | 246 | } |
247 | 247 | ||
248 | /* clock ticks, out of kernel text - probably modules */ | 248 | /* clock ticks, out of kernel text - probably modules */ |
249 | printf("%6i %s\n", buf[len/sizeof(*buf)-1], "*unknown*"); | 249 | printf("%6u %s\n", buf[len/sizeof(*buf)-1], "*unknown*"); |
250 | 250 | ||
251 | /* trailer */ | 251 | /* trailer */ |
252 | if (optVerbose) | 252 | if (optVerbose) |
253 | printf("%016x %-40s %6i %8.4f\n", | 253 | printf("%016x %-40s %6u %8.4f\n", |
254 | 0, "total", total, total/(double)(fn_add-add0)); | 254 | 0, "total", total, total/(double)(fn_add-add0)); |
255 | else | 255 | else |
256 | printf("%6i %-40s %8.4f\n", | 256 | printf("%6u %-40s %8.4f\n", |
257 | total, "total", total/(double)(fn_add-add0)); | 257 | total, "total", total/(double)(fn_add-add0)); |
258 | 258 | ||
259 | fclose(map); | 259 | fclose(map); |