From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 12 17:40:26 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC1C516A4CE for ; Sun, 12 Sep 2004 17:40:26 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11D0443D58 for ; Sun, 12 Sep 2004 17:40:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8CHeOPV009059 for ; Sun, 12 Sep 2004 17:40:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8CHeOPi009058; Sun, 12 Sep 2004 17:40:24 GMT (envelope-from gnats) Resent-Date: Sun, 12 Sep 2004 17:40:24 GMT Resent-Message-Id: <200409121740.i8CHeOPi009058@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Lukes Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A79C16A4CE for ; Sun, 12 Sep 2004 17:35:58 +0000 (GMT) Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 321FD43D1D for ; Sun, 12 Sep 2004 17:35:56 +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 i8CHZslx010908 for ; Sun, 12 Sep 2004 19:35:54 +0200 (CEST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by kulesh.obluda.cz (8.13.1/8.13.1/Submit) id i8CHZhe9010907 for FreeBSD-gnats-submit@freebsd.org; Sun, 12 Sep 2004 19:35:43 +0200 (CEST) (envelope-from dan@obluda.cz) Message-Id: <200409121735.i8CHZhe9010907@kulesh.obluda.cz> Date: Sun, 12 Sep 2004 19:35:43 +0200 (CEST) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/71663: [PATCH] cleanup of the usr.sbin/i4b code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2004 17:40:27 -0000 >Number: 71663 >Category: bin >Synopsis: [PATCH] cleanup of the usr.sbin/i4b code >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 12 17:40:24 GMT 2004 >Closed-Date: >Last-Modified: >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 usr.sbin/i4b/isdnd/Makefile,v 1.14 2004/08/13 14:21:49 ru usr.sbin/i4b/isdnd/exec.c,v 1.12 2003/06/07 18:45:45 imp usr.sbin/i4b/isdnd/support.c,v 1.16 2003/07/31 09:13:22 hm usr.sbin/i4b/isdnd/msghdl.c,v 1.12 2002/08/12 07:52:39 hm usr.sbin/i4b/isdnd/isdnd.h,v 1.18 2002/08/12 07:52:39 hm usr.sbin/i4b/isdntest/main.c,v 1.8 2000/10/09 14:22:45 hm >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/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/main.c:717: warning: implicit declaration of function `msg_keypad' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/log.c:172:2: warning: #warning "FreeBSD ncurses is buggy: write to last column = auto newline!" usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/msghdl.c:71: warning: implicit declaration of function `add_number_prefix' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/support.c:250: warning: unused variable `j' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/exec.c:324: warning: long int format, time_t arg (arg 3) usr.sbin/i4b/isdnd/exec.c:324: warning: long int format, time_t arg (arg 4) usr.sbin/i4b/isdnd/exec.c:334: warning: long int format, time_t arg (arg 3) usr.sbin/i4b/isdnd/exec.c:334: warning: long int format, time_t arg (arg 4) usr.sbin/i4b/isdnd/exec.c:378: warning: long int format, time_t arg (arg 3) usr.sbin/i4b/isdnd/exec.c:378: warning: long int format, time_t arg (arg 4) usr.sbin/i4b/isdnd/exec.c:399: warning: long int format, time_t arg (arg 3) usr.sbin/i4b/isdnd/exec.c:399: warning: long int format, time_t arg (arg 4) usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnd/isdnd.h:800: warning: conflicting types for built-in function 'log' usr.sbin/i4b/isdnmonitor/main.c:525:2: warning: #warning "FreeBSD ncurses is buggy: write to last column = auto newline!" usr.sbin/i4b/isdntest/main.c:490:72: warning: trigraph ??) ignored, use -trigraphs to enable >How-To-Repeat: N/A >Fix: *** usr.sbin/i4b/isdnd/Makefile.ORIG Sun Aug 22 11:12:14 2004 --- usr.sbin/i4b/isdnd/Makefile Sun Sep 12 13:35:24 2004 *************** *** 12,18 **** # avoid wacky merging of string constants from # source code with compile-time timestamp ! CFLAGS+= -fno-merge-constants # enable rtprio usage CFLAGS+= -DUSE_RTPRIO --- 12,18 ---- # avoid wacky merging of string constants from # source code with compile-time timestamp ! CFLAGS+= -fno-merge-constants -fno-builtin-log # enable rtprio usage CFLAGS+= -DUSE_RTPRIO *** usr.sbin/i4b/isdnd/exec.c.ORIG Tue Jul 15 22:47:12 2003 --- usr.sbin/i4b/isdnd/exec.c Sun Sep 12 13:38:18 2004 *************** *** 321,327 **** return; } ! ret = fprintf(fp, "%ld %ld 1", now, now); if(ret <= 0) log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno)); --- 321,327 ---- return; } ! ret = fprintf(fp, "%d %d 1", now, now); if(ret <= 0) log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno)); *************** *** 331,337 **** /* get contents */ ! ret = fscanf(fp, "%ld %ld %d", &s, &l, &n); /* reset fp */ --- 331,337 ---- /* get contents */ ! ret = fscanf(fp, "%d %d %d", &s, &l, &n); /* reset fp */ *************** *** 375,381 **** return; } ! ret = fprintf(nfp, "%ld %ld %d", s, l, n); if(ret <= 0) log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno)); --- 375,381 ---- return; } ! ret = fprintf(nfp, "%d %d %d", s, l, n); if(ret <= 0) log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno)); *************** *** 385,391 **** n = 0; s = now; ! log(LL_WRN, "upd_callstat_file: rotate %s, new s=%ld l=%ld n=%d", filename, s, l, n); } } --- 385,391 ---- n = 0; s = now; ! log(LL_WRN, "upd_callstat_file: rotate %s, new s=%d l=%d n=%d", filename, s, l, n); } } *************** *** 396,402 **** * leftovers from previous contents! */ ! ret = fprintf(fp, "%ld %ld %-3d", s, now, n); if(ret <= 0) log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno)); --- 396,402 ---- * leftovers from previous contents! */ ! ret = fprintf(fp, "%d %d %-3d", s, now, n); if(ret <= 0) log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno)); *** usr.sbin/i4b/isdnd/support.c.ORIG Fri Aug 8 01:47:57 2003 --- usr.sbin/i4b/isdnd/support.c Sun Sep 12 13:38:50 2004 *************** *** 247,253 **** find_by_device_for_keypad(int drivertype, int driverunit, int cmdlen, char *cmd) { cfg_entry_t *cep = NULL; ! int i, j; for(i=0; i < nentries; i++) { --- 247,253 ---- find_by_device_for_keypad(int drivertype, int driverunit, int cmdlen, char *cmd) { cfg_entry_t *cep = NULL; ! int i; for(i=0; i < nentries; i++) { *** usr.sbin/i4b/isdnd/isdnd.h.ORIG Mon Aug 12 18:29:35 2002 --- usr.sbin/i4b/isdnd/isdnd.h Sun Sep 12 13:45:17 2004 *************** *** 753,758 **** --- 753,759 ---- #endif /* MAIN */ + int add_number_prefix(char *number, int type_of_number); char * bdrivername ( int drivertype ); void cfg_setval ( int keyword ); void check_and_kill ( cfg_entry_t *cep ); *************** *** 812,817 **** --- 813,819 ---- void msg_dialoutnumber(msg_dialoutnumber_ind_t *mp); void msg_disconnect_ind ( msg_disconnect_ind_t *mp ); void msg_idle_timeout_ind ( msg_idle_timeout_ind_t *mp ); + void msg_keypad(msg_keypad_ind_t *mp); void msg_l12stat_ind(msg_l12stat_ind_t *ml); void msg_teiasg_ind(msg_teiasg_ind_t *mt); void msg_proceeding_ind ( msg_proceeding_ind_t *mp ); *** ./isdntest/main.c.ORIG Mon Oct 9 16:22:45 2000 --- ./isdntest/main.c Sun Sep 12 12:05:40 2004 *************** *** 487,493 **** } else { ! fprintf(stderr, "isdntest: incoming disconnect indication, cdid %d (???), cause %d\n", mdi->header.cdid, mdi->cause); } } --- 487,493 ---- } else { ! fprintf(stderr, "isdntest: incoming disconnect indication, cdid %d (\?\?\?), cause %d\n", mdi->header.cdid, mdi->cause); } } >Release-Note: >Audit-Trail: >Unformatted: