From owner-freebsd-bugs Fri Feb 28 13:50:16 2003 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 1727237B405 for ; Fri, 28 Feb 2003 13:50:14 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED53443FA3 for ; Fri, 28 Feb 2003 13:50:12 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h1SLoCNS034354 for ; Fri, 28 Feb 2003 13:50:12 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h1SLoCmx034353; Fri, 28 Feb 2003 13:50:12 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3669237B401 for ; Fri, 28 Feb 2003 13:48:10 -0800 (PST) Received: from fafoe.dyndns.org (chello212186121237.14.vie.surfer.at [212.186.121.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B91643FA3 for ; Fri, 28 Feb 2003 13:48:09 -0800 (PST) (envelope-from stefan@fafoe.dyndns.org) Received: from frog.fafoe (frog.fafoe [192.168.2.101]) by fafoe.dyndns.org (Postfix) with ESMTP id C0B354066; Fri, 28 Feb 2003 22:48:07 +0100 (CET) Received: by frog.fafoe (Postfix, from userid 1001) id 3A490848; Fri, 28 Feb 2003 22:48:07 +0100 (CET) Message-Id: <20030228214807.3A490848@frog.fafoe> Date: Fri, 28 Feb 2003 22:48:07 +0100 (CET) From: Stefan Farfeleder Reply-To: Stefan Farfeleder To: FreeBSD-gnats-submit@FreeBSD.org Cc: stefan@fafoe.dyndns.org X-Send-Pr-Version: 3.113 Subject: bin/48793: [patch] small fix for apmd(8) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 48793 >Category: bin >Synopsis: [patch] small fix for apmd(8) >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: Fri Feb 28 13:50:10 PST 2003 >Closed-Date: >Last-Modified: >Originator: Stefan Farfeleder >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD frog.fafoe 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Fri Feb 28 12:02:34 CET 2003 freebsd@frog.fafoe:/freebsd/frog/obj/freebsd/frog/src/sys/FROG i386 >Description: The BATTTIME and BATTPERCENT tokens of apmdparse.y use the int member 'i' of the yylval union, not 'str'. An integer is assigned to yylval.i in apmdlex.l and non-terminal apm_battery_level has type int too. >How-To-Repeat: buildworld produces these warnings: ===> usr.sbin/apmd cc -O -pipe -mcpu=pentiumpro -I. -I/freebsd/frog/src/usr.sbin/apmd -c /freebsd/frog/src/usr.sbin/apmd/apmd.c gzip -cn /freebsd/frog/src/usr.sbin/apmd/apmd.8 > apmd.8.gz cc -O -pipe -mcpu=pentiumpro -I. -I/freebsd/frog/src/usr.sbin/apmd -c apmdparse.c cc -O -pipe -mcpu=pentiumpro -I. -I/freebsd/frog/src/usr.sbin/apmd -c apmdlex.c /freebsd/frog/src/usr.sbin/apmd/apmdparse.y: In function `yyparse': /freebsd/frog/src/usr.sbin/apmd/apmdparse.y:101: warning: assignment makes integer from pointer without a cast /freebsd/frog/src/usr.sbin/apmd/apmdparse.y:105: warning: assignment makes integer from pointer without a cast cc -O -pipe -mcpu=pentiumpro -I. -I/freebsd/frog/src/usr.sbin/apmd -o apmd apmd.o apmdlex.o apmdparse.o -ll >Fix: --- apmd.diff begins here --- Index: src/usr.sbin/apmd/apmdparse.y =================================================================== RCS file: /usr/home/ncvs/src/usr.sbin/apmd/apmdparse.y,v retrieving revision 1.3 diff -u -r1.3 apmdparse.y --- src/usr.sbin/apmd/apmdparse.y 15 May 2001 05:13:45 -0000 1.3 +++ src/usr.sbin/apmd/apmdparse.y 28 Feb 2003 01:53:46 -0000 @@ -56,7 +56,7 @@ %token APMEVENT %token APMBATT %token BATTCHARGE BATTDISCHARGE -%token BATTTIME BATTPERCENT +%token BATTTIME BATTPERCENT %token EXECCMD REJECTCMD %token EVENT %token STRING UNKNOWN --- apmd.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message