Resolve more warnings

Change-Id: Ibc1b7f7cd45ad7295285e59c6ce55888266fece8
This commit is contained in:
David van Moolenbroek
2015-09-21 17:14:39 +00:00
parent 9488aa4c04
commit 7c48de6cc4
73 changed files with 264 additions and 296 deletions

View File

@@ -526,7 +526,7 @@ connectlog_r(struct syslog_data *data)
}
if (!data->log_connected) {
#if defined(__minix)
if(ioctl(data->log_file, NWIOSUDSTADDR, (void *) &sun) < 0)
if(ioctl(data->log_file, NWIOSUDSTADDR, __UNCONST(&sun)) < 0)
#else
if (connect(data->log_file,

View File

@@ -82,7 +82,7 @@ int fs_putnode(ino_t ino_nr, unsigned int count)
lpuffs_debug("%"PRIu64": %d %s %u %u\n",
ino,
pn_cur->pn_count,
pn_cur->pn_po.po_path,
(char *)pn_cur->pn_po.po_path,
pn_cur->pn_po.po_len,
pn_cur->pn_po.po_hash);
}

View File

@@ -161,7 +161,7 @@ ssize_t fs_rdlink(ino_t ino_nr, struct fsdriver_data *data, size_t bytes)
r = fsdriver_copyout(data, 0, path, bytes);
return (r == OK) ? bytes : r;
return (r == OK) ? (ssize_t)bytes : r;
}

View File

@@ -258,7 +258,8 @@ int fs_slink(ino_t dir_nr, char *name, uid_t uid, gid_t gid,
/* Copy the link name's last component */
pcn.pcn_namelen = strlen(name);
if (pcn.pcn_namelen <= NAME_MAX);
if (pcn.pcn_namelen > NAME_MAX)
return(ENAMETOOLONG);
strcpy(pcn.pcn_name, name);
if (bytes >= PATH_MAX)