mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
mingw/windows printf lacks %zd ; use %lu and casts instead
(This approach can lose accuracy, but it's only in debug-level messages.) Fixes windows compilation. Bugfix on recent compress.c changes; bug not in any released Tor.
This commit is contained in:
parent
c1c938e80c
commit
945256188a
@ -105,8 +105,8 @@ tor_compress_impl(int compress,
|
|||||||
if (stream == NULL) {
|
if (stream == NULL) {
|
||||||
log_warn(LD_GENERAL, "NULL stream while %scompressing",
|
log_warn(LD_GENERAL, "NULL stream while %scompressing",
|
||||||
compress?"":"de");
|
compress?"":"de");
|
||||||
log_debug(LD_GENERAL, "method: %d level: %d at len: %zd",
|
log_debug(LD_GENERAL, "method: %d level: %d at len: %lu",
|
||||||
method, compression_level, in_len);
|
method, compression_level, (unsigned long)in_len);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,15 +146,15 @@ tor_compress_impl(int compress,
|
|||||||
"Unexpected %s while %scompressing",
|
"Unexpected %s while %scompressing",
|
||||||
complete_only?"end of input":"result",
|
complete_only?"end of input":"result",
|
||||||
compress?"":"de");
|
compress?"":"de");
|
||||||
log_debug(LD_GENERAL, "method: %d level: %d at len: %zd",
|
log_debug(LD_GENERAL, "method: %d level: %d at len: %lu",
|
||||||
method, compression_level, in_len);
|
method, compression_level, (unsigned long)in_len);
|
||||||
goto err;
|
goto err;
|
||||||
} else {
|
} else {
|
||||||
if (in_len != 0) {
|
if (in_len != 0) {
|
||||||
log_fn(protocol_warn_level, LD_PROTOCOL,
|
log_fn(protocol_warn_level, LD_PROTOCOL,
|
||||||
"Unexpected extra input while decompressing");
|
"Unexpected extra input while decompressing");
|
||||||
log_debug(LD_GENERAL, "method: %d level: %d at len: %zd",
|
log_debug(LD_GENERAL, "method: %d level: %d at len: %lu",
|
||||||
method, compression_level, in_len);
|
method, compression_level, (unsigned long)in_len);
|
||||||
goto err;
|
goto err;
|
||||||
} else {
|
} else {
|
||||||
goto done;
|
goto done;
|
||||||
|
Loading…
Reference in New Issue
Block a user