aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2019-06-24 20:53:55 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-06-24 20:53:55 +0300
commitc2d2ab6a9d41a2b55d047c5b710aacf80d219255 (patch)
treef054f397865994c835e590457874a4ead88e5c9e
parentxz: Fix an integer overflow with 32-bit off_t. (diff)
downloadxz-c2d2ab6a9d41a2b55d047c5b710aacf80d219255.tar.xz
Tests: Silence a warning from -Wsign-conversion.
Diffstat (limited to '')
-rw-r--r--tests/create_compress_files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/create_compress_files.c b/tests/create_compress_files.c
index bd5b4ef4..88d60b73 100644
--- a/tests/create_compress_files.c
+++ b/tests/create_compress_files.c
@@ -94,10 +94,10 @@ write_random(FILE *file)
for (size_t i = 0; i < 123456; ++i) {
n = 101771 * n + 71777;
- putc(n & 0xFF, file);
- putc((n >> 8) & 0xFF, file);
- putc((n >> 16) & 0xFF, file);
- putc(n >> 24, file);
+ putc((uint8_t)(n), file);
+ putc((uint8_t)(n >> 8), file);
+ putc((uint8_t)(n >> 16), file);
+ putc((uint8_t)(n >> 24), file);
}
}