[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ud segfault (was: When will the amd64 port be stable?)



On Sun, 2004-12-12 at 05:18 +0000, Steve McIntyre wrote:
> David Liontooth <liontooth@cogweb.net> wrote:
> >Goswin von Brederlow wrote:
[snip]
> 
> The reason for this becomes clear once you turn on warnings in the
> compilation:
> 
> gcc -DPACKAGE=\"ud\" -DVERSION=\"0.7.1\" -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DRETSIGTYPE=void -DHAVE_GETHOSTNAME=1  -I. -I.      -g -O2 -Wall -W -c ud.c
> ud.c: In function `get_kernel_version':
> ud.c:150: warning: implicit declaration of function `ctime'
> ud.c:150: warning: format argument is not a pointer (arg 3)
> 
> ctime is returning a pointer rather than an int. Simply adding
> "#include <time.h>" to the top of the ud.c source file fixes this
> bug. Prototypes are there for a reason!
> 
> Turning on warnings also highlights other silly coding bugs, but I'll
> leave those for other people.

Hey, let's start a flame war about the unnecessary use of C in
non-core functionality!!!

-- 
-----------------------------------------------------------------
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B I prefer encrypted mail.

"Adventure is a sign of incompetence"
Stephanson, great polar explorer

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: