Don't use %zu

Eventually we'll need to make sure that a) libroken's stdint.h defines
the max integer types, b) the libroken *printf()s can handle all the
standard length and conversion specifiers.
This commit is contained in:
Nicolas Williams
2013-08-13 22:30:04 -04:00
parent c6548bc166
commit 704a8a1d37
4 changed files with 5 additions and 5 deletions

@@ -1151,7 +1151,7 @@ print_ocsp(hx509_context context, struct revoke_ocsp *ocsp, FILE *out)
status = "element unknown";
}
fprintf(out, "\t%zu. status: %s\n", i, status);
fprintf(out, "\t%llu. status: %s\n", (unsigned long long)i, status);
fprintf(out, "\tthisUpdate: %s\n",
printable_time(ocsp->ocsp.tbsResponseData.responses.val[i].thisUpdate));

@@ -330,7 +330,7 @@ process_reply (krb5_context context,
if (len < 6) {
str2data (result_string, "server %s sent to too short message "
"(%zu bytes)", host, len);
"(%llu bytes)", host, (unsigned long long)len);
*result_code = KRB5_KPASSWD_MALFORMED;
return 0;
}

@@ -99,7 +99,7 @@ main(int argc, char *argv[])
size_t len;
while ((p = fgetln(stdin, &len)) != NULL) {
(void)printf("%zu %s", len, p);
(void)printf("%llu %s", (unsigned long long)len, p);
free(p);
}
return 0;

@@ -530,8 +530,8 @@ fn_complete(EditLine *el,
*/
if (matches_num > query_items) {
(void)fprintf(el->el_outfile,
"Display all %zu possibilities? (y or n) ",
matches_num);
"Display all %llu possibilities? (y or n) ",
(unsigned long long)matches_num);
(void)fflush(el->el_outfile);
if (getc(stdin) != 'y')
match_display = 0;