Fix up some warnings

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
This commit is contained in:
Ikey Doherty
2016-05-17 15:17:05 +01:00
parent d23b8e17bd
commit 5b7c484b64
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -576,7 +576,7 @@ int save_dir;
static void *xmp_init(__nc_unused__ struct fuse_conn_info *conn)
{
fchdir(save_dir);
__nc_unused__ int r = fchdir(save_dir);
close(save_dir);
return NULL;
@@ -633,7 +633,8 @@ int main(__nc_unused__ int argc, __nc_unused__ char *argv[])
sleep(1);
if (access("/sys/module/fuse/", F_OK)) {
system("modprobe fuse");
/* Failure would happen later in fuse_main, reduce double checks. */
__nc_unused__ int ret = system("modprobe fuse");
}
signal(SIGPIPE, SIG_IGN);
+3 -1
View File
@@ -202,7 +202,9 @@ static void recurse_dir(char *base1, char *base2, char *path)
newpath = NULL;
fullpath2 = NULL;
asprintf(&fullpath2, "%s/%s", fullpath1, entry->d_name);
if (asprintf(&fullpath2, "%s/%s", fullpath1, entry->d_name) < 0) {
return;
}
if (asprintf(&newpath, "%s/%s", path, entry->d_name) >= 0) {
struct stat sb;
stat(fullpath2, &sb);