summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2018-10-16 20:32:01 +0200
committerJoel Rosdahl <joel@rosdahl.net>2018-10-16 20:34:57 +0200
commita0f7c10567b041079eef7aab8055091c79b4049b (patch)
treecaa34482f82f86a3d88b577ec5e82b54134d1c48
parent7e11471f674fb812e30cec1ad3afa9568b88ae10 (diff)
downloadccache-a0f7c10567b041079eef7aab8055091c79b4049b.tar.gz
Ignore return value from fwrite when writing debug log
This silences some compilers’ warnings about ignoring return value of fwrite. There’s not much we can do if they fail, and it’s also not important enough to e.g. call failed() for the debug logs.
-rw-r--r--src/hash.c4
-rw-r--r--src/util.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/hash.c b/src/hash.c
index 8a92085f..ae303322 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -32,7 +32,7 @@ do_hash_buffer(struct hash *hash, const void *s, size_t len)
{
mdfour_update(&hash->md, (const unsigned char *)s, len);
if (len > 0 && hash->debug_binary) {
- fwrite(s, 1, len, hash->debug_binary);
+ (void) fwrite(s, 1, len, hash->debug_binary);
}
}
@@ -40,7 +40,7 @@ static void
do_debug_text(struct hash *hash, const void *s, size_t len)
{
if (len > 0 && hash->debug_text) {
- fwrite(s, 1, len, hash->debug_text);
+ (void) fwrite(s, 1, len, hash->debug_text);
}
}
diff --git a/src/util.c b/src/util.c
index a260025f..36d3b632 100644
--- a/src/util.c
+++ b/src/util.c
@@ -219,7 +219,7 @@ void
cc_dump_log_buffer(const char *path)
{
FILE *file = fopen(path, "w");
- fwrite(logbuffer, 1, logsize, file);
+ (void) fwrite(logbuffer, 1, logsize, file);
fclose(file);
}