From owner-freebsd-ports Fri Aug 6 6:30:47 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C529615426 for ; Fri, 6 Aug 1999 06:30:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA45410; Fri, 6 Aug 1999 06:30:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Fri, 6 Aug 1999 06:30:04 -0700 (PDT) Message-Id: <199908061330.GAA45410@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Rasmus Kaj Subject: Re: ports/11587: inappropriate internet time calculation Reply-To: Rasmus Kaj Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR ports/11587; it has been noted by GNATS. From: Rasmus Kaj To: freebsd-gnats-submit@freebsd.org, nishio@nexus.rim.or.jp Cc: Rasmus Kaj Subject: Re: ports/11587: inappropriate internet time calculation Date: Fri, 06 Aug 1999 15:21:27 +0200 Just a comment to make it easier to someone to do something about this: This is about the port x11-clocks/wmitime. Making this port w/o the patch, it gives the following two warnings: wmitime.c: In function `DrawInetTime': wmitime.c:284: warning: assignment makes integer from pointer without a cast wmitime.c: In function `DrawInetWheel': wmitime.c:401: warning: assignment makes integer from pointer without a cast The patch from Fumihiko Nishio removes the first of this warnings. Taking a look at line 401 I find that it seems to do the same thing, so I apply the same change there. Now it compiles without any warning. Here's a patch with both changes, which might be installed as patches/patch-ab: --- wmitime.c.orig Fri Aug 6 15:12:36 1999 +++ wmitime.c Fri Aug 6 15:10:34 1999 @@ -281,7 +281,7 @@ // Compute Inet Time iTime=(clk->tm_hour*3600+clk->tm_min*60+clk->tm_sec); - iTime=iTime+((timezone-1)+3600); + iTime=iTime+((1-clk->tm_gmtoff)+3600); if (clk->tm_isdst) iTime-=3600; iTime=(iTime*1000)/86400; @@ -398,7 +398,7 @@ // Calculate Wheel Position... iTime=(clk->tm_hour*3600+clk->tm_min*60+clk->tm_sec); - iTime=iTime+((timezone-1)+3600); + iTime=iTime+((1-clk->tm_gmtoff)+3600); if (clk->tm_isdst) iTime-=3600; iTime=(iTime*1000)/8640; Note: Since I don't run WindowMaker I have not actually run this program, if synopsis had mentioned WindowMaker (or even the name of the port) I probably wouldn't even have looked at it ... -- Rasmus Kaj ---------------- rasmus@kaj.a.se - http://www.e.kth.se/~kaj/ \ Lottery: A tax on people who are bad at math \--------------------------------------------- http://www.Raditex.se/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message