Userspace: Update printf formats to compile on 32 bit
This commit is contained in:
parent
99e30a4d7d
commit
5dbe51a52e
|
@ -260,7 +260,7 @@ i64 puzzle2(FILE* fp)
|
||||||
clock_gettime(CLOCK_MONOTONIC, &time_stop);
|
clock_gettime(CLOCK_MONOTONIC, &time_stop);
|
||||||
|
|
||||||
u64 duration_us = (time_stop.tv_sec * 1'000'000 + time_stop.tv_nsec / 1'000) - (time_start.tv_sec * 1'000'000 + time_start.tv_nsec / 1'000);
|
u64 duration_us = (time_stop.tv_sec * 1'000'000 + time_stop.tv_nsec / 1'000) - (time_start.tv_sec * 1'000'000 + time_start.tv_nsec / 1'000);
|
||||||
printf("took %lu.%03lu ms, estimate %lu s\n", duration_us / 1000, duration_us % 1000, (values_sorted[0].size() - xi - 2) * duration_us / 1'000'000);
|
printf("step took %" PRIu64 ".%03" PRIu64 " ms, estimate %" PRIu64 " s\n", duration_us / 1000, duration_us % 1000, (values_sorted[0].size() - xi - 2) * duration_us / 1'000'000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -87,7 +87,7 @@ BAN::ErrorOr<BAN::UniqPtr<Image>> load_netbpm(const void* mmap_addr, size_t size
|
||||||
return BAN::Error::from_errno(EINVAL);
|
return BAN::Error::from_errno(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Netbpm image %" PRIuPTR "x%" PRIuPTR "\n", *width, *height);
|
printf("Netbpm image %" PRIu64 "x%" PRIu64 "\n", *width, *height);
|
||||||
|
|
||||||
BAN::Vector<Image::Color> bitmap;
|
BAN::Vector<Image::Color> bitmap;
|
||||||
TRY(bitmap.resize(*width * *height));
|
TRY(bitmap.resize(*width * *height));
|
||||||
|
|
|
@ -152,7 +152,7 @@ int test2_job2()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*(size_t*)addr = 0x123456789;
|
*(size_t*)addr = 0x12345678;
|
||||||
|
|
||||||
if (msync(addr, sizeof(size_t), MS_SYNC) == -1)
|
if (msync(addr, sizeof(size_t), MS_SYNC) == -1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue