NetBSD Problem Report #19720

Received: (qmail 16769 invoked by uid 605); 7 Jan 2003 01:45:48 -0000
Message-Id: <200301070145.h071jkH20933@guelah.shrubbery.net>
Date: Tue, 7 Jan 2003 01:45:46 GMT
From: john heasley <heas@shrubbery.net>
Sender: gnats-bugs-owner@netbsd.org
Reply-To: heas@shrubbery.net
To: gnats-bugs@gnats.netbsd.org
Subject: dclock fix return type of time() for sparc64
X-Send-Pr-Version: 3.95

>Number:         19720
>Category:       pkg
>Synopsis:       wrong type variable for time() return
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jmcneill
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 07 01:46:00 +0000 2003
>Closed-Date:    Tue Jan 07 05:49:02 +0000 2003
>Last-Modified:  Tue Jan 07 05:49:02 +0000 2003
>Originator:     john heasley
>Release:        NetBSD 1.6K
>Organization:

>Environment:


System: NetBSD guelah 1.6K NetBSD 1.6K (foad) #9: Mon Dec 30 19:01:40 UTC 2002 root@foad:/sys/arch/sparc64/compile/foad sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	probably a better way of fixing this.  the type of the variable
	accept the return value from time() in dclock is incorrect.  it
	should be time_t.  without this, the dclock does not work at all.
>How-To-Repeat:

>Fix:

i did not go through the entire application looking for other instances.

--- Dclock.c.bak	Mon Jan  6 17:30:47 2003
+++ Dclock.c	Mon Jan  6 17:32:55 2003
@@ -625,7 +625,7 @@
 {
     Boolean save_scroll = w->dclock.scroll;
     Boolean save_fade = w->dclock.fade;
-    long t;
+    time_t t;

     if (!XtIsRealized((Widget) w))
 	return;
@@ -661,7 +661,7 @@
 {
     char buf[11];
     Boolean alarm_went_off = False;
-    long t = time(0);
+    time_t t = time(0);
     register struct tm *l_time = localtime(&t);
     int digit_w = w->dclock.digit_w;
     int digit_h = w->dclock.digit_h;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jmcneill 
State-Changed-When: Mon Jan 6 21:48:21 PST 2003 
State-Changed-Why:  
Patch applied. 


Responsible-Changed-From-To: pkg-manager->jmcneill 
Responsible-Changed-By: jmcneill 
Responsible-Changed-When: Mon Jan 6 21:48:21 PST 2003 
Responsible-Changed-Why:  
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.