cross platfom size_t printing

event_stream
Ryan Dahl 15 years ago
parent da30924dc8
commit e09651c6bb

@ -953,7 +953,7 @@ print_error (const char *raw, size_t error_location)
for (j = 0; j < error_location_line; j++) {
fputc(' ', stderr);
}
fprintf(stderr, "^\n\nerror location: %lu\n", error_location);
fprintf(stderr, "^\n\nerror location: %u\n", (unsigned int)error_location);
}
@ -1145,9 +1145,9 @@ test_scan (const struct message *r1, const struct message *r2, const struct mess
error:
fprintf(stderr, "i=%d j=%d\n", i, j);
fprintf(stderr, "buf1 (%lu) %s\n\n", buf1_len, buf1);
fprintf(stderr, "buf2 (%lu) %s\n\n", buf2_len , buf2);
fprintf(stderr, "buf3 (%lu) %s\n", buf3_len, buf3);
fprintf(stderr, "buf1 (%u) %s\n\n", (unsigned int)buf1_len, buf1);
fprintf(stderr, "buf2 (%u) %s\n\n", (unsigned int)buf2_len , buf2);
fprintf(stderr, "buf3 (%u) %s\n", (unsigned int)buf3_len, buf3);
exit(1);
}
@ -1159,7 +1159,7 @@ main (void)
int request_count;
int response_count;
printf("sizeof(http_parser) = %lu\n", sizeof(http_parser));
printf("sizeof(http_parser) = %u\n", (unsigned int)sizeof(http_parser));
for (request_count = 0; requests[request_count].name; request_count++);
for (response_count = 0; responses[response_count].name; response_count++);

Loading…
Cancel
Save