From patchwork Fri Oct 19 21:08:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 192813 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "acsinet15.oracle.com", Issuer "VeriSign Class 3 International Server CA - G3" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 84E172C00DC for ; Sat, 20 Oct 2012 08:08:56 +1100 (EST) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q9JL8q6Z012412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Oct 2012 21:08:53 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q9JL8ppD000766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Oct 2012 21:08:52 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1TPJoJ-0007IY-Tp; Fri, 19 Oct 2012 14:08:51 -0700 Received: from acsinet22.oracle.com ([141.146.126.238]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1TPJoI-0007IQ-Dl for fedfs-utils-devel@oss.oracle.com; Fri, 19 Oct 2012 14:08:50 -0700 Received: from rcsinet11.oracle.com (rcsinet11.oracle.com [148.87.113.123]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q9JL8n2U005239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Oct 2012 21:08:50 GMT Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com [209.85.223.171]) by rcsinet11.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q9JL8mUE008452 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 19 Oct 2012 21:08:49 GMT Received: by mail-ie0-f171.google.com with SMTP id s9so1363018iec.2 for ; Fri, 19 Oct 2012 14:08:48 -0700 (PDT) Received: by 10.42.37.142 with SMTP id y14mr2314831icd.44.1350680928490; Fri, 19 Oct 2012 14:08:48 -0700 (PDT) Received: from seurat.1015granger.net (adsl-99-26-161-222.dsl.sfldmi.sbcglobal.net. [99.26.161.222]) by mx.google.com with ESMTPS id ex10sm2309366igc.15.2012.10.19.14.08.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 14:08:47 -0700 (PDT) From: Chuck Lever To: fedfs-utils-devel@oss.oracle.com Date: Fri, 19 Oct 2012 17:08:46 -0400 Message-ID: <20121019210846.53119.17695.stgit@seurat.1015granger.net> In-Reply-To: <20121019210357.53119.28925.stgit@seurat.1015granger.net> References: <20121019210357.53119.28925.stgit@seurat.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Flow-Control-Info: class=Default reputation=ipRepBelow100 ip=209.85.223.171 ct-class=R5 ct-vol1=-97 ct-vol2=9 ct-vol3=8 ct-risk=49 ct-spam1=78 ct-spam2=8 ct-bulk=6 rcpts=1 size=2785 X-MM-CT-Classification: not spam X-MM-CT-RefID: str=0001.0A090203.5081C161.0091,ss=1,re=0.000,fgs=0 Subject: [fedfs-utils] [PATCH 08/11] mount.fedfs: Silence sparse warnings X-BeenThere: fedfs-utils-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list Reply-To: fedfs-utils Developers List-Id: fedfs-utils Developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: fedfs-utils-devel-bounces@oss.oracle.com Errors-To: fedfs-utils-devel-bounces@oss.oracle.com X-Source-IP: acsinet21.oracle.com [141.146.126.237] Address these sparse warnings: main.c:92:6: warning: symbol 'progname' was not declared. Should it be static? main.c:93:5: warning: symbol 'nomtab' was not declared. Should it be static? main.c:94:5: warning: symbol 'verbose' was not declared. Should it be static? main.c:95:7: warning: symbol 'readonly' was not declared. Should it be static? main.c:96:7: warning: symbol 'sloppy' was not declared. Should it be static? main.c:97:7: warning: symbol 'fake' was not declared. Should it be static? main.c:109:22: warning: Using plain integer as NULL pointer main.c:110:22: warning: Using plain integer as NULL pointer main.c:111:25: warning: Using plain integer as NULL pointer main.c:112:25: warning: Using plain integer as NULL pointer main.c:113:27: warning: Using plain integer as NULL pointer main.c:114:28: warning: Using plain integer as NULL pointer main.c:115:20: warning: Using plain integer as NULL pointer main.c:116:20: warning: Using plain integer as NULL pointer main.c:117:24: warning: Using plain integer as NULL pointer main.c:118:25: warning: Using plain integer as NULL pointer main.c:119:25: warning: Using plain integer as NULL pointer main.c:120:20: warning: Using plain integer as NULL pointer Introduced by commit 0520ee72 "Initial commit" March 29, 2011. Signed-off-by: Chuck Lever --- src/mount/main.c | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/mount/main.c b/src/mount/main.c index 1efde77..81fa238 100644 --- a/src/mount/main.c +++ b/src/mount/main.c @@ -89,12 +89,12 @@ enum { EX_FAIL = 32, }; -char *progname; -int nomtab; -int verbose; -_Bool readonly; -_Bool sloppy; -_Bool fake; +static char *progname; +static int nomtab; +static int verbose; +static _Bool readonly; +static _Bool sloppy; +static _Bool fake; /** * Short form command line options @@ -106,18 +106,18 @@ static const char fedfs_opts[] = "fhno:rsvVw"; */ static const struct option fedfs_longopts[] = { - { "fake", 0, 0, 'f' }, - { "help", 0, 0, 'h' }, - { "no-mtab", 0, 0, 'n' }, - { "options", 1, 0, 'o' }, - { "read-only", 0, 0, 'r' }, - { "read-write", 0, 0, 'w' }, - { "ro", 0, 0, 'r' }, - { "rw", 0, 0, 'w' }, - { "sloppy", 0, 0, 's' }, - { "verbose", 0, 0, 'v' }, - { "version", 0, 0, 'V' }, - { NULL, 0, 0, 0 } + { "fake", 0, NULL, 'f' }, + { "help", 0, NULL, 'h' }, + { "no-mtab", 0, NULL, 'n' }, + { "options", 1, NULL, 'o' }, + { "read-only", 0, NULL, 'r' }, + { "read-write", 0, NULL, 'w' }, + { "ro", 0, NULL, 'r' }, + { "rw", 0, NULL, 'w' }, + { "sloppy", 0, NULL, 's' }, + { "verbose", 0, NULL, 'v' }, + { "version", 0, NULL, 'V' }, + { NULL, 0, NULL, 0 } }; /**