From owner-freebsd-bugs@FreeBSD.ORG Thu Sep 4 23:00:10 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DA7D1065678 for ; Thu, 4 Sep 2008 23:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0C60D8FC1D for ; Thu, 4 Sep 2008 23:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m84N09vp063964 for ; Thu, 4 Sep 2008 23:00:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m84N09Rq063963; Thu, 4 Sep 2008 23:00:09 GMT (envelope-from gnats) Date: Thu, 4 Sep 2008 23:00:09 GMT Message-Id: <200809042300.m84N09Rq063963@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Cran Cc: Subject: Re: bin/71629: [PATCH] cleanup of the usr.sbin/pppstats code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Cran List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2008 23:00:10 -0000 The following reply was made to PR bin/71629; it has been noted by GNATS. From: Bruce Cran To: bug-followup@FreeBSD.org, dan@obluda.cz Cc: Subject: Re: bin/71629: [PATCH] cleanup of the usr.sbin/pppstats code Date: Thu, 4 Sep 2008 23:52:18 +0100 --MP_/E4gLEAeyFeE_woFG9SEkoO0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline I have attached a patch which fixes more of the warnings in pppstats.c with high WARNS levels. -- Bruce Cran --MP_/E4gLEAeyFeE_woFG9SEkoO0 Content-Type: text/x-patch; name=pppstats.c.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=pppstats.c.diff --- pppstats.c.orig 2008-09-04 23:47:20.000000000 +0100 +++ pppstats.c 2008-09-04 23:50:36.000000000 +0100 @@ -70,7 +70,7 @@ int s; /* socket or /dev/ppp file descriptor */ int signalled; /* set if alarm goes off "early" */ char *progname; -char *interface; +const char *interface; #if defined(SUNOS4) || defined(ULTRIX) || defined(NeXT) extern int optind; @@ -98,9 +98,9 @@ * Sets a flag to not wait for the alarm. */ static void -catchalarm(arg) - int arg; +catchalarm(int arg) { + (void)arg; signalled = 1; } @@ -252,12 +252,13 @@ { register int line = 0; sigset_t oldmask, mask; - char *bunit; + const char *bunit; int ratef = 0; struct ppp_stats cur, old; struct ppp_comp_stats ccs, ocs; memset(&old, 0, sizeof(old)); + memset(&ccs, 0, sizeof(ccs)); memset(&ocs, 0, sizeof(ocs)); while (1) { --MP_/E4gLEAeyFeE_woFG9SEkoO0--