]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
showmount command: Quiesce warning when TI-RPC is disabled
authorChuck Lever <chuck.lever@oracle.com>
Wed, 7 Jan 2009 17:33:09 +0000 (12:33 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 7 Jan 2009 17:33:09 +0000 (12:33 -0500)
Make sure nfs_sm_pgmtbl is not compiled if TI-RPC functions are not
available.  This quiesces the following compiler warning:

  showmount.c:53: warning: nfs_sm_pgmtbl defined but not used

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/showmount/showmount.c

index 17f7d87102b429896b1ef936daafa065e136e7f4..2695c510652910aca30601c25e27dea1d3359257 100644 (file)
@@ -50,13 +50,6 @@ static int   aflag = 0;
 static int     dflag = 0;
 static int     eflag = 0;
 
-static const char *nfs_sm_pgmtbl[] = {
-       "showmount",
-       "mount",
-       "mountd",
-       NULL,
-};
-
 static struct option longopts[] =
 {
        { "all", 0, 0, 'a' },
@@ -87,6 +80,13 @@ static void usage(FILE *fp, int n)
 
 #ifdef HAVE_CLNT_CREATE
 
+static const char *nfs_sm_pgmtbl[] = {
+       "showmount",
+       "mount",
+       "mountd",
+       NULL,
+};
+
 /*
  * Generate an RPC client handle connected to the mountd service
  * at @hostname, or die trying.