Fix 32-bit build warnings (99.9% in printf)

This commit is contained in:
Vitaliy Filippov
2024-02-22 12:22:16 +03:00
parent b3c15db331
commit f20564b44b
62 changed files with 384 additions and 371 deletions
+4 -4
View File
@@ -76,7 +76,7 @@ struct osd_op_buf_list_t
buf = (iovec*)malloc(sizeof(iovec) * alloc);
if (!buf)
{
fprintf(stderr, "Failed to allocate %lu bytes\n", sizeof(iovec) * alloc);
fprintf(stderr, "Failed to allocate %u bytes\n", (int)sizeof(iovec) * alloc);
exit(1);
}
memcpy(buf, inline_buf, sizeof(iovec) * old);
@@ -87,7 +87,7 @@ struct osd_op_buf_list_t
buf = (iovec*)realloc(buf, sizeof(iovec) * alloc);
if (!buf)
{
fprintf(stderr, "Failed to allocate %lu bytes\n", sizeof(iovec) * alloc);
fprintf(stderr, "Failed to allocate %u bytes\n", (int)sizeof(iovec) * alloc);
exit(1);
}
}
@@ -109,7 +109,7 @@ struct osd_op_buf_list_t
buf = (iovec*)malloc(sizeof(iovec) * alloc);
if (!buf)
{
fprintf(stderr, "Failed to allocate %lu bytes\n", sizeof(iovec) * alloc);
fprintf(stderr, "Failed to allocate %u bytes\n", (int)sizeof(iovec) * alloc);
exit(1);
}
memcpy(buf, inline_buf, sizeof(iovec)*old);
@@ -120,7 +120,7 @@ struct osd_op_buf_list_t
buf = (iovec*)realloc(buf, sizeof(iovec) * alloc);
if (!buf)
{
fprintf(stderr, "Failed to allocate %lu bytes\n", sizeof(iovec) * alloc);
fprintf(stderr, "Failed to allocate %u bytes\n", (int)sizeof(iovec) * alloc);
exit(1);
}
}