Squelch compiler warnings reported with -Wextra:
In file included from statd.c:24:
../../support/include/rpcmisc.h: In function nfs_getrpccaller_in:
../../support/include/rpcmisc.h:58: warning: dereferencing type-punned
pointer might break strict-aliasing rules
../../support/include/rpcmisc.h: In function nfs_getrpccaller:
../../support/include/rpcmisc.h:63: warning: dereferencing type-punned
pointer might break strict-aliasing rules
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
static inline struct sockaddr_in *nfs_getrpccaller_in(SVCXPRT *xprt)
{
- return (struct sockaddr_in *)svc_getcaller(xprt);
+ return (struct sockaddr_in *)(char *)svc_getcaller(xprt);
}
static inline struct sockaddr *nfs_getrpccaller(SVCXPRT *xprt)
{
- return (struct sockaddr *)svc_getcaller(xprt);
+ return (struct sockaddr *)(char *)svc_getcaller(xprt);
}
#endif /* RPCMISC_H */