From: James Colannino <james@colannino.org>
To: linux-c-programming@vger.kernel.org
Subject: Re: Debugging
Date: Mon, 30 Jan 2006 11:21:10 -0800 [thread overview]
Message-ID: <43DE6726.9030407@colannino.org> (raw)
In-Reply-To: <43DE6555.7010806@colannino.org>
James Colannino wrote:
>> Then go about finding the offending line(s) of code.
>> Watch out for obscure tricks, side-effects, wild pointers and illegal
>> casts.
>> Compile with -Wall and, to enforce your discipline, treat every
>> warning as
>> -Werror.
>
> Without -Wall, I get no errors (I always do my best to get rid of
> warnings.) I'll try it with -Wall though and see what happens.
*embarrased* using -Wall gave me the following error:
database.c:68: warning: implicit declaration of function `close'
That made me realize that I was trying to use the system call open
instead of the standard library function fclose. Once I fixed that, the
code worked both when it was optimized and when it was not. I think
from now on I'll be using -Wall ;) Thanks to everyone who responded.
I'm glad I don't have to run this through a debugger....yet :)
James
--
My blog: http://www.crazydrclaw.com/
My homepage: http://james.colannino.org/
"If Carpenters made houses the way programmers design programs, the first woodpecker to come along would destroy all of civilization." --Computer Proverb
prev parent reply other threads:[~2006-01-30 19:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-29 6:21 Debugging James Colannino
2006-01-29 16:21 ` Debugging Steve Graegert
2006-01-29 18:14 ` Debugging Glynn Clements
2006-01-30 19:09 ` Debugging James Colannino
[not found] ` <20060129105131.6813f695.leslie.polzer@gmx.net>
2006-01-30 19:13 ` Debugging James Colannino
2006-01-30 19:21 ` James Colannino [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43DE6726.9030407@colannino.org \
--to=james@colannino.org \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).