mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Fix warnings in test_util_formats.
Storing 255 into a char gives a warning when char is signed. Fixes bug 19682; bugfix on 0.2.8.1-alpha, where these tests were added.
This commit is contained in:
parent
c1bfa65211
commit
bec4e41f4b
3
changes/bug19682
Normal file
3
changes/bug19682
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Minor bugfixes (compilation):
|
||||||
|
- Fix compilation warning in the unit tests on systems where
|
||||||
|
char is signed. Fixes bug 19682; bugfix on 0.2.8.1-alpha.
|
@ -106,10 +106,10 @@ test_util_format_base64_encode(void *ignored)
|
|||||||
for (i = 0;i<50;i++) {
|
for (i = 0;i<50;i++) {
|
||||||
src[i] = 0;
|
src[i] = 0;
|
||||||
}
|
}
|
||||||
src[50] = 255;
|
src[50] = (char)255;
|
||||||
src[51] = 255;
|
src[51] = (char)255;
|
||||||
src[52] = 255;
|
src[52] = (char)255;
|
||||||
src[53] = 255;
|
src[53] = (char)255;
|
||||||
|
|
||||||
res = base64_encode(dst, 1000, src, 54, BASE64_ENCODE_MULTILINE);
|
res = base64_encode(dst, 1000, src, 54, BASE64_ENCODE_MULTILINE);
|
||||||
tt_int_op(res, OP_EQ, 74);
|
tt_int_op(res, OP_EQ, 74);
|
||||||
|
Loading…
Reference in New Issue
Block a user