summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-09-24 01:03:26 -0400
committeryenatch <yenatch@gmail.com>2017-09-24 01:07:08 -0400
commit94577d95532368a940bf0bb9334ba2c7eb858eb5 (patch)
treee735893800c3828c9db2dcf4cd7b26a52bf04168
parent0aee932b5f83243027f03bbec8c1c0a9079bbf0a (diff)
fix warnings in lzcomp and md5
-rw-r--r--tools/lzcomp.c2
-rw-r--r--tools/md5.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/lzcomp.c b/tools/lzcomp.c
index c3fae1001..e0a88e44a 100644
--- a/tools/lzcomp.c
+++ b/tools/lzcomp.c
@@ -113,7 +113,7 @@ void write_command_to_file (FILE * fp, struct command command, const unsigned ch
*(pos ++) = command.value;
}
}
- if (fwrite(buf, 1, pos - buf, fp) != (pos - buf)) error_exit(1, "could not write command to compressed output");
+ if ((int)fwrite(buf, 1, pos - buf, fp) != (pos - buf)) error_exit(1, "could not write command to compressed output");
if (command.command) return;
command.count ++;
if (fwrite(input_stream + command.value, 1, command.count, fp) != command.count) error_exit(1, "could not write data to compressed output");
diff --git a/tools/md5.c b/tools/md5.c
index e043e8537..45562330a 100644
--- a/tools/md5.c
+++ b/tools/md5.c
@@ -32,7 +32,7 @@ static const uint32_t K[64] = {
};
#define rotate_left_32(value, by) \
- ((((value) << (by)) & 0xffffffff) | ((value) >> 32 - (by)))
+ ((((value) << (by)) & 0xffffffff) | ((value) >> (32 - (by))))
void md5_wikipedia(uint8_t *data, int length, uint8_t *result) {