Re: Debugging standard C library routines



Richard Heathfield wrote:
Eric Sosman said:


jacob navia wrote:

Frederick Gotham wrote:


Richard Heathfield posted:

Initialise every pointer.

Initializing every pointer does no harm, [...]

It does no harm to the running program, certainly. But
it *does* harm the process of developing the program, by
removing the compiler's ability to warn about certain kinds
of errors.


I beg to differ. I mean, yes, it has the effect that you say it has - on
some compilers, anyway - but it doesn't harm the development process at
all.

Thank goodness C99 gave us the ability to declare variables at point of
use, this entire debate becomes moot.

--
Ian Collins.
.



Relevant Pages

  • Re: Who crosses red lights?
    ... The problem is that it's much harder to be sure that you won't in a car - your situational awareness is severely impaired, the intrusion of your vehicle on the road space is greater, and the potential for harm if you screw up is far higher. ... I, of course, believe that my ability to judge when it's safe to cross a red is good enough for this to be an acceptable thing for me to do. ... but of course that's only anecdotal evidence. ...
    (uk.rec.cycling)
  • Re: Epic fail: News of the World loses Mosley case
    ... Anything that might cause harm to others. ... question his ability to do his job properly. ... a motor racing organisation, but he's not himself a racing driver. ... But I guess that the danger of mountain climbing ...
    (uk.legal)
  • day 8 of Stevie Promised action, still MIA
    ... Stevie why don't you give up the lie that you have any real ... ability to harm me in the real world. ... You promised Action action that would more than anoy me. ...
    (rec.radio.amateur.policy)
  • Re: Code nit questions...
    ... Aside from the fact that sro is not a pointer type as Andre pointed ... This one does not seem to harm, although ifp can probably be never ... Hmm...can't we assume malloc() returns a valid pointer if ... that the bug didn't exist... ...
    (freebsd-net)
  • Re: Debugging standard C library routines
    ... Initialise every pointer. ... It does no harm to the running program, ... The next-cheapest are those caught by the compiler and fixed ...
    (comp.lang.c)