daemon: cleaned up compiler warnings

raised warning level to /Wall
changed nfs41_file_info.owner, owner_group to char[] to avoid casting

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-07-06 10:53:39 -04:00 committed by unknown
parent e493d339c8
commit 2b5a5fb071
7 changed files with 30 additions and 28 deletions

View file

@ -1766,14 +1766,14 @@ static bool_t decode_file_attrs(
return FALSE;
}
if (attrs->attrmask.arr[1] & FATTR4_WORD1_OWNER) {
unsigned char *ptr = &info->owner[0];
if (!xdr_bytes(xdr, &(char *)ptr, &info->owner_len,
char *ptr = &info->owner[0];
if (!xdr_bytes(xdr, &ptr, &info->owner_len,
NFS4_OPAQUE_LIMIT))
return FALSE;
}
if (attrs->attrmask.arr[1] & FATTR4_WORD1_OWNER_GROUP) {
unsigned char *ptr = &info->owner_group[0];
if (!xdr_bytes(xdr, &(char *)ptr, &info->owner_group_len,
char *ptr = &info->owner_group[0];
if (!xdr_bytes(xdr, &ptr, &info->owner_group_len,
NFS4_OPAQUE_LIMIT))
return FALSE;
}
@ -2562,15 +2562,15 @@ static bool_t encode_file_attrs(
attrs->attrmask.arr[1] |= FATTR4_WORD1_TIME_MODIFY_SET;
}
if (info->attrmask.arr[1] & FATTR4_WORD1_OWNER) {
unsigned char *ptr = &info->owner[0];
if (!xdr_bytes(&localxdr, &(char *)ptr, &info->owner_len,
char *ptr = &info->owner[0];
if (!xdr_bytes(&localxdr, &ptr, &info->owner_len,
NFS4_OPAQUE_LIMIT))
return FALSE;
attrs->attrmask.arr[1] |= FATTR4_WORD1_OWNER;
}
if (info->attrmask.arr[1] & FATTR4_WORD1_OWNER_GROUP) {
unsigned char *ptr = &info->owner_group[0];
if (!xdr_bytes(&localxdr, &(char *)ptr, &info->owner_group_len,
char *ptr = &info->owner_group[0];
if (!xdr_bytes(&localxdr, &ptr, &info->owner_group_len,
NFS4_OPAQUE_LIMIT))
return FALSE;
attrs->attrmask.arr[1] |= FATTR4_WORD1_OWNER_GROUP;