Date: Fri, 6 Aug 1999 06:30:04 -0700 (PDT) From: Rasmus Kaj <kaj@raditex.se> To: freebsd-ports@FreeBSD.org Subject: Re: ports/11587: inappropriate internet time calculation Message-ID: <199908061330.GAA45410@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/11587; it has been noted by GNATS. From: Rasmus Kaj <kaj@raditex.se> To: freebsd-gnats-submit@freebsd.org, nishio@nexus.rim.or.jp Cc: Rasmus Kaj <kaj@raditex.se> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908061330.GAA45410>