mirror of
https://github.com/clearlinux/clr-debug-info.git
synced 2026-09-07 22:31:38 +00:00
Fix some warnings
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
This commit is contained in:
+3
-1
@@ -23,6 +23,7 @@
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "nica/util.h"
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
@@ -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);
|
||||
|
||||
+5
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user