This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Variable mysteriously set to null


I am trying to run sitback
(http://www.mrbean.dk/index.php?menu=Projects&submenu=Sitback) on FC4
but it always fails with a seg error.
I have tracked it down to the following recursive function where the
"filename" is null after calling it's self
 
__stat_location(char *filename, .......) {
          debug("1 File -> %s\n",filename);
 
if(__stat_location(deep,location,archivelist,excludelist,1,stop_ino,stop
_dev)==-1)
        {
          free(location);
          /*errcode has been set by the failing function*/
          /*error message has been given by the failing function*/
          return -1;
        }
          debug("2 File -> %s\n",filename);
}

The first debug output shows the file as expected but the second output
is null. The __stat_location returns 0 so does not enter the "if". I
have tried in RH8 & FC1 which have and earlier GCC the 4.0 on FC4. I
have tried several FC4 machines with the same problem.

Peter...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]