From dan@obluda.cz  Sun Sep 12 02:38:35 2004
Return-Path: <dan@obluda.cz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6E90F16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 12 Sep 2004 02:38:35 +0000 (GMT)
Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 59FEF43D41
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 12 Sep 2004 02:38:34 +0000 (GMT)
	(envelope-from dan@obluda.cz)
Received: from kulesh.obluda.cz (localhost.eunet.cz [127.0.0.1])
	by kulesh.obluda.cz (8.13.1/8.13.1) with ESMTP id i8C2cWK7007119
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 12 Sep 2004 04:38:33 +0200 (CEST)
	(envelope-from dan@obluda.cz)
Received: (from root@localhost)
	by kulesh.obluda.cz (8.13.1/8.13.1/Submit) id i8C2cWrh007118
	for FreeBSD-gnats-submit@freebsd.org; Sun, 12 Sep 2004 04:38:32 +0200 (CEST)
	(envelope-from dan@obluda.cz)
Message-Id: <200409120238.i8C2cWrh007118@kulesh.obluda.cz>
Date: Sun, 12 Sep 2004 04:38:32 +0200 (CEST)
From: Dan Lukes <dan@obluda.cz>
Reply-To: Dan Lukes <dan@obluda.cz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] cleanup of the usr.sbin/pppstats code
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71629
>Category:       bin
>Synopsis:       [patch] cleanup of the usr.sbin/pppstats code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brucec
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 12 02:40:29 GMT 2004
>Closed-Date:    Tue Feb 22 18:00:36 UTC 2011
>Last-Modified:  Tue Feb 22 18:00:36 UTC 2011
>Originator:     Dan Lukes
>Release:        FreeBSD 5.3-BETA3 i386
>Organization:
Obludarium
>Environment:
System: FreeBSD kulesh.obluda.cz 5.3-BETA3 FreeBSD 5.3-BETA3 #8: Sun Sep 5 07:06:40 CEST 2004 dan@kulesh.obluda.cz:/usr/obj/usr/src/sys/Dan i386
$FreeBSD: usr.sbin/pppstats/pppstats.c,v 1.14 2002/04/22 13:44:46 des

>Description:
	There are more than 5000 warnings issued during "make buildworld".
Some of them are false positives, but some of them are sign of true errors.

	Nobody is upset by warnings due it's amount, so some errors remain
uncorrected.

	I want to cleanup the code-base from warnings, so warnings will
become "attention mark" again.

usr.sbin/pppstats/pppstats.c:35: warning: 'rcsid' defined but not used

>How-To-Repeat:
	N/A
>Fix:
*** usr.sbin/pppstats/pppstats.c.ORIG	Mon Jul  1 23:57:04 2002
--- usr.sbin/pppstats/pppstats.c	Sat Sep 11 10:28:39 2004
***************
*** 31,39 ****
   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #ifndef lint
! static char rcsid[] = "$FreeBSD: src/usr.sbin/pppstats/pppstats.c,v 1.14 2002/04/22 13:44:46 des Exp $";
! #endif
  
  #include <stdio.h>
  #include <stddef.h>
--- 31,38 ----
   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #include <sys/cdefs.h>
! __FBSDID("$FreeBSD: src/usr.sbin/pppstats/pppstats.c,v 1.14 2002/04/22 13:44:46 des Exp $");
  
  #include <stdio.h>
  #include <stddef.h>
>Release-Note:
>Audit-Trail:

From: Bruce Cran <bruce@cran.org.uk>
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--
Responsible-Changed-From-To: freebsd-bugs->brucec 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Mon Feb 21 20:19:08 UTC 2011 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71629 
State-Changed-From-To: open->closed 
State-Changed-By: brucec 
State-Changed-When: Tue Feb 22 18:00:07 UTC 2011 
State-Changed-Why:  
pppstats was removed in 8.0. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71629 
>Unformatted:
