IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#519 closed defect (fixed)

psTime.c fails to build due to gettimeofday's second argument

Reported by: rhl@… Owned by: David.Robbins@…
Priority: high Milestone:
Component: astro Version: 0.7.0
Severity: normal Keywords:
Cc:

Description

psTime.c includes a call:

gettimeofday(&now, (struct timezone *)0)

which fails to compile with gcc 4.0 on os/x 10.4

The latest opengroup documentation on gettimeofday
(see http://www.opengroup.org/onlinepubs/009695399/)
has no mention of a (struct timezone), and requires
that the second argument be a NULL pointer of type
(void *) to avoid undefined behaviour.

The Linux docs (e.g.

http://www.delorie.com/gnu/docs/glibc/libc_434.html)

still mention (struct timezone) but still require it to be NULL.

The simplest fix is to write the null pointer as 0 or NULL,
without an unnecessary cast.

Change History (4)

comment:1 by robert.desonia@…, 21 years ago

Owner: changed from robert.desonia@… to David.Robbins@…

comment:2 by David.Robbins@…, 21 years ago

Resolution: fixed
Status: newclosed

comment:3 by Paul Price, 20 years ago

Keywords: VERIFIED added

Bug has been resolved.... closing.

comment:4 by Paul Price, 20 years ago

Keywords: VERIFIED removed

Bugs have been fixed... closing.

Note: See TracTickets for help on using tickets.