1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: avoid printing gcc warning

Casting to (void) with gcc doesn't remove unused_result warning.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
This commit is contained in:
Zdenek Kabelac 2015-06-23 11:03:46 +02:00
parent 50d70eff35
commit 9c86d33e68
2 changed files with 7 additions and 3 deletions

View File

@ -64,7 +64,7 @@ static void kmsg(int log_level, const char *format, ...)
return;
/* The n+4: +3 for "<n>" 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)

View File

@ -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);
}
}