delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/01/07/06:35:59

Message-ID: <006101c2b636$00763030$0100a8c0@acp42g>
From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
To: <djgpp-workers AT delorie DOT com>
Cc: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Subject: Make realloc pointer problem [was part of Re: GCC 3.2.1 build failure]
Date: Tue, 7 Jan 2003 21:17:06 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Reply-To: djgpp-workers AT delorie DOT com

This is a multi-part message in MIME format.

------=_NextPart_000_005E_01C2B692.21785590
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Eli,

I checked the past postings and this one slipped between the cracks. In =
the last posting of the previous thread you asked for me to give more =
details which I am now doing 7 months late.....

The original posting with this issue was in the following thread:
http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=3Ddjgpp-workers/2=
002/05/29/06:33:31

> 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
> type
>=20
> Arg 0?
This also occurs with make 3.79.2a1, which is where I first seen the =
problem and it is also in 3.80.=20

Should I report this to the make maintainers or is it a DJGPP specific =
problem or should I just ignore this warning?

glob.c  line 184:
#ifndef __GNU_LIBRARY__
# ifdef __GNUC__
__inline
# 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 =3D=3D NULL)
    return (char *) malloc (n);
  return (char *) realloc (p, n);
}
# define realloc my_realloc
# endif /* __SASC */
#endif /* __GNU_LIBRARY__ */

glob.c line 813:-
       pglob->gl_pathv
         =3D (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.  */
=20

------=_NextPart_000_005E_01C2B692.21785590
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Eli,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I checked the past postings and this =
one slipped=20
between the cracks. In the last posting of the previous thread you asked =
for me=20
to give more details which I am now doing 7 months =
late.....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The original posting with this issue =
was in the=20
following thread:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=3Ddjgpp-w=
orkers/2002/05/29/06:33:31">http://www.delorie.com/djgpp/mail-archives/br=
owse.cgi?p=3Ddjgpp-workers/2002/05/29/06:33:31</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3>&gt;=20
make.exe[2]: Entering directory `d:/dj204/gnu/make-3.80/glob'<BR>&gt; =
gcc -I..=20
-I. -I. -I./glob -DHAVE_CONFIG_H -O2 -g -c fnmatch.c<BR>&gt; gcc -I.. =
-I. -I.=20
-I./glob -DHAVE_CONFIG_H -O2 -g -c glob.c<BR>&gt; In file included from=20
glob.c:813:<BR>&gt; glob.c: In function `glob':<BR>&gt; glob.c:197: =
warning:=20
passing arg 0 of `my_realloc' from incompatible pointer<BR>&gt; =
type<BR>&gt;=20
<BR>&gt; Arg 0?</FONT></DIV>
<DIV>This also occurs with make 3.79.2a1, which is where I first seen =
the=20
problem and it is also in 3.80. </DIV>
<DIV>&nbsp;</DIV>
<DIV>Should I report this to the make maintainers or is it a DJGPP =
specific=20
problem or should I just ignore this warning?</DIV>
<DIV>&nbsp;</DIV>
<DIV>glob.c&nbsp; line 184:</DIV>
<DIV>#ifndef&nbsp;__GNU_LIBRARY__<BR># =
ifdef&nbsp;__GNUC__<BR>__inline<BR>#=20
endif<BR># ifndef __SASC<BR>#&nbsp; ifdef WINDOWS32<BR>static void =
*<BR>#&nbsp;=20
else<BR>static char *<BR># endif<BR>my_realloc (p,=20
n)<BR>&nbsp;&nbsp;&nbsp;&nbsp; char *p;<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
unsigned int=20
n;<BR>{<BR>&nbsp; /* These casts are the for sake of the broken Ultrix=20
compiler,<BR>&nbsp;&nbsp;&nbsp;&nbsp; which warns of illegal pointer=20
combinations otherwise.&nbsp; */<BR>&nbsp; if (p =3D=3D =
NULL)<BR>&nbsp;&nbsp;&nbsp;=20
return (char *) malloc (n);<BR>&nbsp; return (char *) realloc (p, =
n);<BR>}<BR>#=20
define&nbsp;realloc&nbsp;my_realloc<BR># endif /* __SASC */<BR>#endif /* =

__GNU_LIBRARY__ */<BR></DIV>
<DIV>glob.c line 813:-</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
pglob-&gt;gl_pathv<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp; =3D (char **) realloc=20
(pglob-&gt;gl_pathv,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
(pglob-&gt;gl_pathc +<BR>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
((flags &amp; GLOB_DOOFFS) ?<BR></DIV>
<DIV>glob.h :-<BR>&nbsp;&nbsp;&nbsp; typedef =
struct<BR>&nbsp;&nbsp;&nbsp; &nbsp;=20
{<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; __size_t =
gl_pathc;&nbsp;&nbsp;/*=20
Count of paths matched by the pattern.&nbsp; */<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; char **gl_pathv;&nbsp;&nbsp;/* List of matched=20
pathnames.&nbsp; */<BR>&nbsp;<BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_005E_01C2B692.21785590--


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019