diff --git a/src/client.c b/src/client.c index b776ca3..f35267b 100644 --- a/src/client.c +++ b/src/client.c @@ -23,6 +23,7 @@ #define _GNU_SOURCE +#include "nica/util.h" #include #include #include @@ -54,6 +55,7 @@ void try_to_get(const char *path, int pid, time_t timestamp) struct timeval tv; struct ucred cred; int shorttime = 0; + __nc_unused__ size_t wr = -1; // printf("Trying to aquire %s\n", path); @@ -89,7 +91,7 @@ void try_to_get(const char *path, int pid, time_t timestamp) close(sockfd); return; } - write(sockfd, command, strlen(command) + 1); + wr = write(sockfd, command, strlen(command) + 1); FD_ZERO(&rfds); FD_SET(sockfd, &rfds); diff --git a/src/server.c b/src/server.c index 1942bcc..ffb5ae8 100644 --- a/src/server.c +++ b/src/server.c @@ -177,7 +177,9 @@ static int curl_get_file(const char *url, const char *prefix, time_t timestamp) "tar -C /var/cache/debuginfo/%s --no-same-owner -xf %s", prefix, filename) >= 0) { - system(command); + if (system(command) != 0) { + fputs("Warning: tar extraction failed\n", stderr); + } } } unlink(filename); @@ -203,6 +205,7 @@ static void *server_thread(void *arg) autofree(char) *url = NULL; time_t timestamp; struct timeval before, after; + __nc_unused__ size_t wr = -1; fd = (unsigned long)arg; if (fd < 0) { @@ -278,7 +281,7 @@ static void *server_thread(void *arg) (int)timestamp); /* tell the other side we're done with the download */ - write(fd, "ok", 3); + wr = write(fd, "ok", 3); thread_end: if (fd >= 0) {