diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c index 92c08d392..cd71b9ce5 100644 --- a/scripts/lvm2_activation_generator_systemd_red_hat.c +++ b/scripts/lvm2_activation_generator_systemd_red_hat.c @@ -64,7 +64,7 @@ static void kmsg(int log_level, const char *format, ...) return; /* The n+4: +3 for "" prefix and +1 for '\0' suffix */ - (void) write(kmsg_fd, message, n + 4); + if (write(kmsg_fd, message, n + 4)) { /* Ignore result code */; } } static void lvm_get_use_lvmetad_and_lvmpolld(int *use_lvmetad, int *use_lvmpolld) diff --git a/test/lib/not.c b/test/lib/not.c index 5d285998a..93c115a27 100644 --- a/test/lib/not.c +++ b/test/lib/not.c @@ -33,9 +33,13 @@ static int _finished(const char *cmd, int status, int pid) { if (WIFEXITED(ret) && WEXITSTATUS(ret) == 0) { printf("## timing off\n<======== Debug log ========>\n"); /* timing off */ fflush(stdout); - (void) system("sed -e 's,^,## DEBUG: ,' debug.log*${LVM_LOG_FILE_EPOCH}* 2>/dev/null"); + if (system("sed -e 's,^,## DEBUG: ,' debug.log*${LVM_LOG_FILE_EPOCH}* 2>/dev/null")) { + /* Ignore result code */; + } printf("## timing on\n"); /* timing on */ - (void) system("rm -f debug.log*${LVM_LOG_FILE_EPOCH}*"); + if (system("rm -f debug.log*${LVM_LOG_FILE_EPOCH}*")) { + /* Ignore result code */; + } fflush(stdout); } }