diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-17 13:51:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-17 13:51:45 -0400 |
commit | bec4e41f4b48c288613a13021da9a29d5fb1ecac (patch) | |
tree | 179f51128526917187b5603d6bdd74cf712a9553 | |
parent | c1bfa65211257e5efb89c5ebc534339d52fa77c4 (diff) | |
download | tor-bec4e41f4b48c288613a13021da9a29d5fb1ecac.tar.gz tor-bec4e41f4b48c288613a13021da9a29d5fb1ecac.zip |
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.
-rw-r--r-- | changes/bug19682 | 3 | ||||
-rw-r--r-- | src/test/test_util_format.c | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/changes/bug19682 b/changes/bug19682 new file mode 100644 index 0000000000..c799c417ac --- /dev/null +++ b/changes/bug19682 @@ -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. diff --git a/src/test/test_util_format.c b/src/test/test_util_format.c index a25054cd0a..3d02930983 100644 --- a/src/test/test_util_format.c +++ b/src/test/test_util_format.c @@ -106,10 +106,10 @@ test_util_format_base64_encode(void *ignored) for (i = 0;i<50;i++) { src[i] = 0; } - src[50] = 255; - src[51] = 255; - src[52] = 255; - src[53] = 255; + src[50] = (char)255; + src[51] = (char)255; + src[52] = (char)255; + src[53] = (char)255; res = base64_encode(dst, 1000, src, 54, BASE64_ENCODE_MULTILINE); tt_int_op(res, OP_EQ, 74); |