From: Andrew Deason Date: Fri, 18 Jan 2013 23:05:12 +0000 (-0600) Subject: FreeBSD 9.1: Warning fixes X-Git-Tag: upstream/1.8.0_pre1^2~1647 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c57542ac9003aca7300801043dbbad8fd4072c40;p=packages%2Fo%2Fopenafs.git FreeBSD 9.1: Warning fixes Fix warnings caused by some changes in FreeBSD 9.1: - afs_cmount takes a uint64_t for flags instead of an int - vn_rdwr takes a ssize_t* for resid instead of an int* [kaduk@mit.edu: rebase onto master and use fine-grained version checks] Change-Id: I03ab805a625790004a910df96b96aeda1121e2a7 Reviewed-on: http://gerrit.openafs.org/8922 Tested-by: BuildBot Reviewed-by: Garrett Wollman Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear --- diff --git a/src/afs/FBSD/osi_file.c b/src/afs/FBSD/osi_file.c index 2b809dd03..096e4721a 100644 --- a/src/afs/FBSD/osi_file.c +++ b/src/afs/FBSD/osi_file.c @@ -158,7 +158,11 @@ int afs_osi_Read(struct osi_file *afile, int offset, void *aptr, afs_int32 asize) { +#if (__FreeBSD_version >= 900505 && __FreeBSD_Version < 1000000) ||__FreeBSD_version >= 1000009 + ssize_t resid; +#else int resid; +#endif afs_int32 code; AFS_STATCNT(osi_Read); @@ -185,7 +189,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr, afile->offset += code; osi_DisableAtimes(afile->vnode); } else { - afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid, + afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, (int)resid, ICL_TYPE_INT32, code); if (code > 0) { code = -code; @@ -199,7 +203,11 @@ int afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr, afs_int32 asize) { - unsigned int resid; +#if (__FreeBSD_version >= 900505 && __FreeBSD_Version < 1000000) ||__FreeBSD_version >= 1000009 + ssize_t resid; +#else + int resid; +#endif afs_int32 code; AFS_STATCNT(osi_Write); if (!afile)