nfs: enable -Werror

Change-Id: I529f0e2b363a36984d8779535a2da51a882a988c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5438
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
PulkoMandy 2022-07-08 10:41:23 +02:00 committed by Adrien Destugues
parent 92eeb4af7d
commit 6325257204
2 changed files with 9 additions and 9 deletions

View File

@ -729,7 +729,7 @@ rule ArchitectureSetupWarnings architecture
EnableWerror src add-ons kernel file_systems iso9660 ;
EnableWerror src add-ons kernel file_systems layers ;
# EnableWerror src add-ons kernel file_systems netfs ;
# EnableWerror src add-ons kernel file_systems nfs ;
EnableWerror src add-ons kernel file_systems nfs ;
EnableWerror src add-ons kernel file_systems nfs4 ;
# EnableWerror src add-ons kernel file_systems ntfs ;
EnableWerror src add-ons kernel file_systems packagefs ;

View File

@ -1176,7 +1176,7 @@ dprintf("%ld\n", v);
return EINVAL;
e = strchr(p, ',');
i = (e) ? (e - p) : (strlen(p));
i = (e) ? (e - p) : ((int)strlen(p));
params->_export = malloc(i + 1);
params->_export[i] = '\0';
@ -1188,7 +1188,7 @@ dprintf("%ld\n", v);
dprintf("nfs:hn!\n");
p += 9;
e = strchr(p, ',');
i = (e) ? (e - p) : (strlen(p));
i = (e) ? (e - p) : ((int)strlen(p));
params->hostname = malloc(i + 1);
params->hostname[i] = '\0';
@ -1670,14 +1670,14 @@ fs_wstat(fs_volume *_volume, fs_vnode *_node, const struct stat *st, uint32 mask
XDROutPacketAddFixed(&call,node->fhandle.opaque,NFS_FHSIZE);
XDROutPacketAddInt32(&call, (mask & WSTAT_MODE) ? st->st_mode : -1);
XDROutPacketAddInt32(&call, (mask & WSTAT_UID) ? st->st_uid : -1);
XDROutPacketAddInt32(&call, (mask & WSTAT_GID) ? st->st_gid : -1);
XDROutPacketAddInt32(&call, (mask & WSTAT_SIZE) ? st->st_size : -1);
XDROutPacketAddInt32(&call, (mask & WSTAT_MODE) ? st->st_mode : UINT32_MAX);
XDROutPacketAddInt32(&call, (mask & WSTAT_UID) ? st->st_uid : UINT32_MAX);
XDROutPacketAddInt32(&call, (mask & WSTAT_GID) ? st->st_gid : UINT32_MAX);
XDROutPacketAddInt32(&call, (mask & WSTAT_SIZE) ? st->st_size : UINT32_MAX);
XDROutPacketAddInt32(&call, (mask & WSTAT_ATIME) ? st->st_atime : -1);
XDROutPacketAddInt32(&call, (mask & WSTAT_ATIME) ? 0 : -1);
XDROutPacketAddInt32(&call, (mask & WSTAT_ATIME) ? 0 : UINT32_MAX);
XDROutPacketAddInt32(&call, (mask & WSTAT_MTIME) ? st->st_mtime : -1);
XDROutPacketAddInt32(&call, (mask & WSTAT_MTIME) ? 0 : -1);
XDROutPacketAddInt32(&call, (mask & WSTAT_MTIME) ? 0 : UINT32_MAX);
replyBuf = send_rpc_call(ns, &ns->nfsAddr, NFS_PROGRAM, NFS_VERSION,
NFSPROC_SETATTR, &call);