* [PATCH 1/5] rpcbind: Squelch a compiler warning
[not found] ` <20081021220247.19488.82225.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
@ 2008-10-21 22:04 ` Chuck Lever
2008-10-21 22:04 ` [PATCH 2/5] " Chuck Lever
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2008-10-21 22:04 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
Remove unused variable in read_struct(). This eliminates the compiler
warning:
warmstart.c: In function =E2=80=98read_struct=E2=80=99:
warmstart.c:106: warning: unused variable =E2=80=98sbuf=E2=80=99
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
src/warmstart.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/warmstart.c b/src/warmstart.c
index 91e482b..d52a835 100644
--- a/src/warmstart.c
+++ b/src/warmstart.c
@@ -103,7 +103,6 @@ read_struct(char *filename, xdrproc_t structproc, v=
oid *list)
{
FILE *fp;
XDR xdrs;
- struct stat sbuf;
=20
if (debugging)
fprintf(stderr, "rpcbind: using '%s' startup file\n", filename);
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/5] rpcbind: Squelch a compiler warning
[not found] ` <20081021220247.19488.82225.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-10-21 22:04 ` [PATCH 1/5] rpcbind: Squelch a compiler warning Chuck Lever
@ 2008-10-21 22:04 ` Chuck Lever
2008-10-21 22:04 ` [PATCH 3/5] " Chuck Lever
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2008-10-21 22:04 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
Include <nss.h> to get a forward declaration of __nss_configure_lookup(=
).
This eliminates the compiler warning:
rpcbind.c: In function =E2=80=98main=E2=80=99:
rpcbind.c:163: warning: implicit declaration of function
=E2=80=98__nss_configure_lookup=E2=80=99
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
configure.in | 2 +-
src/rpcbind.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 9ff0bc7..69f4169 100644
--- a/configure.in
+++ b/configure.in
@@ -48,7 +48,7 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
netinet/in.h stdlib.h string.h \
sys/param.h sys/socket.h \
sys/time.h syslog.h \
- unistd.h]) =20
+ unistd.h nss.h])
=20
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([tirpc], [clnt_create])
diff --git a/src/rpcbind.c b/src/rpcbind.c
index e0e7ddf..71b372d 100644
--- a/src/rpcbind.c
+++ b/src/rpcbind.c
@@ -68,6 +68,7 @@
#include <pwd.h>
#include <string.h>
#include <errno.h>
+#include <nss.h>
#include "config.h"
#include "rpcbind.h"
=20
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/5] rpcbind: Squelch a compiler warning
[not found] ` <20081021220247.19488.82225.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-10-21 22:04 ` [PATCH 1/5] rpcbind: Squelch a compiler warning Chuck Lever
2008-10-21 22:04 ` [PATCH 2/5] " Chuck Lever
@ 2008-10-21 22:04 ` Chuck Lever
2008-10-21 22:04 ` [PATCH 4/5] rpcbind: Squelch make warnings Chuck Lever
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2008-10-21 22:04 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
Remove a needless pointer-to-integer conversion. getnameinfo(3) wants
a size value greater than or equal to offsetof(struct sockaddr_un,
sun_path). Since pointers can be different sizes depending on the
hardware platform, let's make this a simple constant instead.
This eliminates the compiler warning:
rpcinfo.c: In function =E2=80=98sa_len=E2=80=99:
rpcinfo.c:666: warning: cast from pointer to integer of different size
when building on x86-64.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
src/rpcinfo.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/rpcinfo.c b/src/rpcinfo.c
index afd949b..0170f65 100644
--- a/src/rpcinfo.c
+++ b/src/rpcinfo.c
@@ -663,7 +663,7 @@ sa_len(struct sockaddr *sa)
switch (sa->sa_family)
{
case AF_LOCAL:
- salen =3D (socklen_t) (((struct sockaddr_un *) NULL)->sun_=
path);
+ salen =3D sizeof (struct sockaddr_un);
break;
case AF_INET:
salen =3D sizeof (struct sockaddr_in);
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 4/5] rpcbind: Squelch make warnings
[not found] ` <20081021220247.19488.82225.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
` (2 preceding siblings ...)
2008-10-21 22:04 ` [PATCH 3/5] " Chuck Lever
@ 2008-10-21 22:04 ` Chuck Lever
2008-10-21 22:05 ` [PATCH 5/5] rpcbind: Squelch autotool warning Chuck Lever
2008-10-28 14:15 ` [PATCH 0/5] Fix rpcbind/rpcinfo build warnings Steve Dickson
5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2008-10-21 22:04 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
Eliminate make warnings when building rpcbind and rpcinfo:
make[3]: Circular security.o <- security.o dependency dropped.
make[3]: Circular util.o <- security.o dependency dropped.
make[3]: Circular util.o <- util.o dependency dropped.
make[3]: Circular util.o <- check_bound.o dependency dropped.
make[3]: Circular pmap_svc.o <- security.o dependency dropped.
make[3]: Circular pmap_svc.o <- util.o dependency dropped.
make[3]: Circular pmap_svc.o <- check_bound.o dependency dropped.
make[3]: Circular pmap_svc.o <- pmap_svc.o dependency dropped.
and so on.
Apparently src/Makefile.am needs either a list of source files or a
list of object files, but not both.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
src/Makefile.am | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index d66b43f..cc0a85b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,9 +31,4 @@ rpcbind_LDFLAGS = -lpthread -ltirpc
rpcbind_LDADD = $(LIB_TIRPC)
AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
-DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO
-
-$(rpcbind_OBJECTS) : security.o util.o check_bound.o pmap_svc.o \
- rpcb_svc.o rpcb_svc_com.o rpcb_svc_4.o \
- rpcb_stat.o rpcbind.o warmstart.o
-$(rpcinfo_OBJECTS) : rpcinfo.o
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 5/5] rpcbind: Squelch autotool warning
[not found] ` <20081021220247.19488.82225.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
` (3 preceding siblings ...)
2008-10-21 22:04 ` [PATCH 4/5] rpcbind: Squelch make warnings Chuck Lever
@ 2008-10-21 22:05 ` Chuck Lever
2008-10-28 14:15 ` [PATCH 0/5] Fix rpcbind/rpcinfo build warnings Steve Dickson
5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2008-10-21 22:05 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
Change order of AC_PROG_LIBTOOL macro invocation in configure.in to
eliminate autotool warning:
Remember to add `AC_PROG_LIBTOOL' to `configure.in'.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
configure.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index 69f4169..d529ea5 100644
--- a/configure.in
+++ b/configure.in
@@ -5,14 +5,14 @@
AC_CONFIG_SRCDIR([src/rpcbind.c])
AC_PROG_CC
AM_CONFIG_HEADER(config.h)
- AC_PROG_LIBTOOL
- ##AC_PROG_RANLIB
AC_HEADER_DIRENT
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_SRCDIR([src/config.h.in])
AC_CONFIG_HEADERS([src/config.h])
+AC_PROG_LIBTOOL
+
AC_ARG_ENABLE(debug,[ --enable-debug Turns on rpcbind debugging],
[case "${enableval}" in
yes) debug=true ;;
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 0/5] Fix rpcbind/rpcinfo build warnings
[not found] ` <20081021220247.19488.82225.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
` (4 preceding siblings ...)
2008-10-21 22:05 ` [PATCH 5/5] rpcbind: Squelch autotool warning Chuck Lever
@ 2008-10-28 14:15 ` Steve Dickson
5 siblings, 0 replies; 7+ messages in thread
From: Steve Dickson @ 2008-10-28 14:15 UTC (permalink / raw)
To: Chuck Lever; +Cc: linux-nfs
Chuck Lever wrote:
> Hi Steve-
>
> Here's a handful of minor fix-ups for rpcbind that eliminate a bunch of
> warnings from autotool, make, and gcc.
>
> ---
>
> Chuck Lever (5):
> rpcbind: Squelch autotool warning
> rpcbind: Squelch make warnings
> rpcbind: Squelch a compiler warning
> rpcbind: Squelch a compiler warning
> rpcbind: Squelch a compiler warning
>
>
> configure.in | 6 +++---
> src/Makefile.am | 5 -----
> src/rpcbind.c | 1 +
> src/rpcinfo.c | 2 +-
> src/warmstart.c | 1 -
> 5 files changed, 5 insertions(+), 10 deletions(-)
>
All committed... thanks!
steved.
^ permalink raw reply [flat|nested] 7+ messages in thread