mirror of
https://github.com/systemd/systemd.git
synced 2024-11-24 02:33:36 +08:00
use correct format types
This commit is contained in:
parent
015df1f78f
commit
c4ef05484d
@ -344,7 +344,7 @@ static void test_option_set(void)
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
if (verbose)
|
||||
printf("%2d: 0x%02x(0x%02x) (options)\n", i, result->options[i],
|
||||
printf("%2u: 0x%02x(0x%02x) (options)\n", i, result->options[i],
|
||||
options[i]);
|
||||
assert_se(result->options[i] == options[i]);
|
||||
}
|
||||
@ -363,7 +363,7 @@ static void test_option_set(void)
|
||||
|
||||
for (i = 0; i < pos - 8; i++) {
|
||||
if (verbose)
|
||||
printf("%2d: 0x%02x(0x%02x) (sname)\n", i, result->sname[i],
|
||||
printf("%2u: 0x%02x(0x%02x) (sname)\n", i, result->sname[i],
|
||||
options[i + 9]);
|
||||
assert_se(result->sname[i] == options[i + 9]);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ static int udev_device_set_ifindex(struct udev_device *udev_device, int ifindex)
|
||||
char num[32];
|
||||
|
||||
udev_device->ifindex = ifindex;
|
||||
snprintf(num, sizeof(num), "%u", ifindex);
|
||||
snprintf(num, sizeof(num), "%d", ifindex);
|
||||
udev_device_add_property(udev_device, "IFINDEX", num);
|
||||
return 0;
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
|
||||
printf("\t Seat: %s", i.seat);
|
||||
|
||||
if (i.vtnr > 0)
|
||||
printf("; vc%i", i.vtnr);
|
||||
printf("; vc%u", i.vtnr);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
@ -1063,17 +1063,17 @@ work:
|
||||
if (cd_media_state != NULL)
|
||||
printf("ID_CDROM_MEDIA_STATE=%s\n", cd_media_state);
|
||||
if (cd_media_session_next > 0)
|
||||
printf("ID_CDROM_MEDIA_SESSION_NEXT=%d\n", cd_media_session_next);
|
||||
printf("ID_CDROM_MEDIA_SESSION_NEXT=%u\n", cd_media_session_next);
|
||||
if (cd_media_session_count > 0)
|
||||
printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count);
|
||||
printf("ID_CDROM_MEDIA_SESSION_COUNT=%u\n", cd_media_session_count);
|
||||
if (cd_media_session_count > 1 && cd_media_session_last_offset > 0)
|
||||
printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset);
|
||||
if (cd_media_track_count > 0)
|
||||
printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count);
|
||||
printf("ID_CDROM_MEDIA_TRACK_COUNT=%u\n", cd_media_track_count);
|
||||
if (cd_media_track_count_audio > 0)
|
||||
printf("ID_CDROM_MEDIA_TRACK_COUNT_AUDIO=%d\n", cd_media_track_count_audio);
|
||||
printf("ID_CDROM_MEDIA_TRACK_COUNT_AUDIO=%u\n", cd_media_track_count_audio);
|
||||
if (cd_media_track_count_data > 0)
|
||||
printf("ID_CDROM_MEDIA_TRACK_COUNT_DATA=%d\n", cd_media_track_count_data);
|
||||
printf("ID_CDROM_MEDIA_TRACK_COUNT_DATA=%u\n", cd_media_track_count_data);
|
||||
exit:
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
|
@ -153,7 +153,7 @@ static int checkout(int fd)
|
||||
if (!ptr && word < (buf + len)) {
|
||||
bufsize = bufsize << 1;
|
||||
if (debug)
|
||||
fprintf(stderr, "ID overflow, restarting with size %zi\n", bufsize);
|
||||
fprintf(stderr, "ID overflow, restarting with size %zu\n", bufsize);
|
||||
free(buf);
|
||||
lseek(fd, 0, SEEK_SET);
|
||||
goto restart;
|
||||
|
Loading…
Reference in New Issue
Block a user