[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GLOB\GLOB.C my_realloc pointer problem

From: Andrew Cottrell
Subject: GLOB\GLOB.C my_realloc pointer problem
Date: Wed, 8 Jan 2003 22:18:59 +1100

When I make make 3.80 and 3.79.2a1 I get a warning in GLOB\GLOB.C
as follows:-
 make.exe[2]: Entering directory `d:/dj204/gnu/make-3.80/glob'
 gcc -I.. -I. -I. -I./glob -DHAVE_CONFIG_H -O2 -g -c fnmatch.c
 gcc -I.. -I. -I. -I./glob -DHAVE_CONFIG_H -O2 -g -c glob.c
 In file included from glob.c:813:
 glob.c: In function `glob':
 glob.c:197: warning: passing arg 0 of `my_realloc' from incompatible pointer
I am using GCC 3.2.1 and BNU 2.13. I am using DJGPP 2.04 CVS WIP LIBC code. I have also tried DJGPP 2.03 as well and I get the same results.
If I need to enter the data into a issue tracking system please let me know what the URL is and I will do that. If there is a beta version or a CVS version that has this fixed could you please point me in it's direction and I will run with it. BTW I am very familair with obtaining CVS repositries and building FSF tar balls with DJGPP.
The following are the snipptes of the relevant code and the approximate line numbers.
glob.c  line 184:
#ifndef __GNU_LIBRARY__
# ifdef __GNUC__
# endif
# ifndef __SASC
#  ifdef WINDOWS32
static void *
#  else
static char *
# endif
my_realloc (p, n)
     char *p;
     unsigned int n;
  /* These casts are the for sake of the broken Ultrix compiler,
     which warns of illegal pointer combinations otherwise.  */
  if (p == NULL)
    return (char *) malloc (n);
  return (char *) realloc (p, n);
# define realloc my_realloc
# endif /* __SASC */
#endif /* __GNU_LIBRARY__ */
glob.c line 813:-
         = (char **) realloc (pglob->gl_pathv,
        (pglob->gl_pathc +
          ((flags & GLOB_DOOFFS) ?
glob.h :-
    typedef struct
        __size_t gl_pathc;  /* Count of paths matched by the pattern.  */
        char **gl_pathv;  /* List of matched pathnames.  */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]