From owner-freebsd-bugs Sun Mar 18 15:40: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2460937B719 for ; Sun, 18 Mar 2001 15:40:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2INe2918946; Sun, 18 Mar 2001 15:40:02 -0800 (PST) (envelope-from gnats) Date: Sun, 18 Mar 2001 15:40:02 -0800 (PST) Message-Id: <200103182340.f2INe2918946@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: David Malone Subject: Re: misc/25904: Error in the printf-function. Reply-To: David Malone Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/25904; it has been noted by GNATS. From: David Malone To: gh@raditex.se Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: misc/25904: Error in the printf-function. Date: Sun, 18 Mar 2001 23:39:28 +0000 On Sun, Mar 18, 2001 at 02:38:06PM -0800, gh@raditex.se wrote: > >Description: > The printf function seems to mix up whats a pointer and whats > a value... ? You must pass the correct types to printf if you want it to do something sensible. Each time you used "%f", which means "I am about to pass a float or a double", but you passed a mixture of other things. If you're a beginner C programmer then I'd suggest that you turn on some more compiler warnings, which will give about this: gcc -pedantic -ansi -W -Wall file.c Also, you might want to consult the C FAQ at: http://www.eskimo.com/~scs/C-faq/top.html and try reading the newsgroup comp.lang.c. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message