summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-20 00:33:32 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-20 00:33:32 +0200
commitf519e6e262b4f0f3cf7f2ffd8f9634c9f05d6ed4 (patch)
treec4bdc418a03a0d617c793cb4547e0a849dc4de53
parent04bfe7a91223ba15d868f7165e49328b1c6e86c3 (diff)
Fix printing size_tv1.8+git20230520
-rw-r--r--server.c4
-rw-r--r--user.c4
-rw-r--r--utils.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/server.c b/server.c
index 238e958..00ca3f2 100644
--- a/server.c
+++ b/server.c
@@ -494,7 +494,7 @@ WriteCheckArgSize(FILE *file, const argument_t *arg)
/* If the base type size of the data field isn`t a multiple of complex_alignof,
we have to round up. */
if (btype->itTypeSize % complex_alignof != 0)
- fprintf(file, " + %d) & ~%d", complex_alignof - 1, complex_alignof - 1);
+ fprintf(file, " + %zd) & ~%zd", complex_alignof - 1, complex_alignof - 1);
if (ptype->itIndefinite) {
fprintf(file, " : sizeof(%s *)", FetchServerType(btype));
@@ -1107,7 +1107,7 @@ WriteArgSize(FILE *file, const argument_t *arg)
* we have to round up.
*/
if (bsize % complex_alignof != 0)
- fprintf(file, " + %d) & ~%d", complex_alignof - 1, complex_alignof - 1);
+ fprintf(file, " + %zd) & ~%zd", complex_alignof - 1, complex_alignof - 1);
if (ptype->itIndefinite) {
fprintf(file, " : sizeof(%s *)",
diff --git a/user.c b/user.c
index dc9e21f..e044b4f 100644
--- a/user.c
+++ b/user.c
@@ -526,7 +526,7 @@ WriteArgSize(FILE *file, const argument_t *arg)
* we have to round up.
*/
if (bsize % complex_alignof != 0)
- fprintf(file, " + %d) & ~%d", complex_alignof - 1, complex_alignof - 1);
+ fprintf(file, " + %zd) & ~%zd", complex_alignof - 1, complex_alignof - 1);
if (ptype->itIndefinite) {
fprintf(file, " : sizeof(%s *)",
@@ -841,7 +841,7 @@ WriteCheckArgSize(FILE *file, const argument_t *arg)
/* If the base type size of the data field isn`t a multiple of complex_alignof,
we have to round up. */
if (btype->itTypeSize % complex_alignof != 0)
- fprintf(file, " + %d) & ~%d", complex_alignof - 1, complex_alignof - 1);
+ fprintf(file, " + %zd) & ~%zd", complex_alignof - 1, complex_alignof - 1);
if (ptype->itIndefinite)
fprintf(file, " : sizeof(%s *)", FetchUserType(btype));
diff --git a/utils.c b/utils.c
index 6d6bb9e..4835290 100644
--- a/utils.c
+++ b/utils.c
@@ -307,10 +307,10 @@ WriteFieldDeclPrim(FILE *file, const argument_t *arg,
/* Pad mach_msg_type_t/mach_msg_type_long_t in case we need alignment by more than its size. */
if (!arg->argLongForm && sizeof_mach_msg_type_t % complex_alignof) {
- fprintf(file, "\t\tchar %s_pad[%d];\n",
+ fprintf(file, "\t\tchar %s_pad[%zd];\n",
arg->argTTName, complex_alignof - sizeof_mach_msg_type_t % complex_alignof);
} else if (arg->argLongForm && sizeof_mach_msg_type_long_t % complex_alignof) {
- fprintf(file, "\t\tchar %s_pad[%d];\n", arg->argTTName,
+ fprintf(file, "\t\tchar %s_pad[%zd];\n", arg->argTTName,
complex_alignof - sizeof_mach_msg_type_long_t % complex_alignof);
}