fix the rest of type conversions for printing

This commit is contained in:
Lev Walkin 2019-01-27 13:24:45 -08:00
parent 2e2cb79035
commit 47cb79f007
1 changed files with 7 additions and 7 deletions

View File

@ -153,7 +153,7 @@ process_deeper(const char *fname, input_stream_t *ibs, output_stream_t *os,
osprintfError(os,
"%s: Too long TL sequence (%zd >= %zd) at %lld. "
"Broken or maliciously constructed file\n",
fname, tblen, limit, ibs->bytesRead(ibs));
fname, tblen, limit, (long long)ibs->bytesRead(ibs));
return PD_FAILED;
}
@ -161,7 +161,7 @@ process_deeper(const char *fname, input_stream_t *ibs, output_stream_t *os,
osprintfError(os,
"%s: Too long TL sequence (%zd bytes) at %lld. "
"Broken or maliciously constructed file\n",
fname, tblen, ibs->bytesRead(ibs));
fname, tblen, (long long)ibs->bytesRead(ibs));
return PD_FAILED;
}
@ -171,8 +171,8 @@ process_deeper(const char *fname, input_stream_t *ibs, output_stream_t *os,
if(limit > 0 || expect_eoc) {
osprintfError(os,
"%s: Unexpected end of file (TL)"
" at %zu\n",
fname, (size_t)ibs->bytesRead(ibs));
" at %lld\n",
fname, (long long)ibs->bytesRead(ibs));
return PD_FAILED;
} else {
return PD_EOF;
@ -189,8 +189,8 @@ process_deeper(const char *fname, input_stream_t *ibs, output_stream_t *os,
case -1:
osprintfError(os,
"%s: Fatal error decoding tag"
" at %zu\n",
fname, (size_t)ibs->bytesRead(ibs));
" at %lld\n",
fname, (long long)ibs->bytesRead(ibs));
return PD_FAILED;
case 0:
/* More data expected */
@ -318,7 +318,7 @@ print_TL(output_stream_t *os, int fin, off_t offset, int level, int constr,
osprintf(os, constr ? ((tlv_len == -1) ? "I" : "C") : "P");
/* Print out the offset of this boundary, even if closing tag */
if(!minimalistic) osprintf(os, " O=\"%lld\"", offset);
if(!minimalistic) osprintf(os, " O=\"%lld\"", (long long)offset);
osprintf(os, " T=\"%s\"", ber_tlv_tag_string(tlv_tag));