diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-05-20 00:33:32 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-05-20 00:33:32 +0200 |
commit | f519e6e262b4f0f3cf7f2ffd8f9634c9f05d6ed4 (patch) | |
tree | c4bdc418a03a0d617c793cb4547e0a849dc4de53 | |
parent | 04bfe7a91223ba15d868f7165e49328b1c6e86c3 (diff) | |
download | mig-f519e6e262b4f0f3cf7f2ffd8f9634c9f05d6ed4.tar.gz mig-f519e6e262b4f0f3cf7f2ffd8f9634c9f05d6ed4.tar.bz2 mig-f519e6e262b4f0f3cf7f2ffd8f9634c9f05d6ed4.zip |
Fix printing size_t
-rw-r--r-- | server.c | 4 | ||||
-rw-r--r-- | user.c | 4 | ||||
-rw-r--r-- | utils.c | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -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 *)", @@ -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)); @@ -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); } |