Re: dumpcdat.c

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Wed Apr 05 2000 - 12:15:25 EDT

  • Next message: Konstantin Olchanski: "Re: dumpcdat.c"

    Hi Flemming et al, 
    
    On Sun, 2 Apr 2000 10:54:34 -0400 "videbaek"<videbaek@sgs1.hirg.bnl.gov> wrote: 
    > Christian, 
    > Is this a feature of your local machine? On rcas nodes with RH6.1
    > and gcc the default statement  gcc -o dumpcdat -lm dumpcdat.c 
    > works just fine. I belive one should only include necessary .h file,
    > so possible you could add a conditional statement. Please update and
    > check back into CVS. 
    
    Yes, true. "dumpcdat.c" compiles fine with the above command line, but
    is you turn on warning messages with "-Wall", you get something like 
    `warning: implicit declaration of "int strtol( ... )"', which is
    symptomatic of a missing header file (to me more exact - a missing
    prototype). Now the reason why everything works out fine in the end,
    is because "strtol()" _does_ return a "int", but suppose that it
    actually returned a pointer, or even worse nothing, then you'd most
    likely get a run time segementation fault (or segementation violation,
    or SIGSEGV), or at least a buggys value in the assigned integer. 
    
    Djamel and I corrected this, along with some other warnings, and have
    checked back into the CVS repository. 
    
    Cheers, 
    
    Christian  -----------------------------------------------------------
    Holm Christensen                             Phone:  (+45) 35 35 96 91 
      Sankt Hansgade 23, 1. th.                  Office: (+45) 353  25 305 
      DK-2200 Copenhagen N                       Web:    www.nbi.dk/~cholm    
      Denmark                                    Email:       cholm@nbi.dk
    



    This archive was generated by hypermail 2b29 : Wed Apr 05 2000 - 12:17:51 EDT