www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/09/16/08:52:22

X-Authentication-Warning: ieva01.lanet.lv: pavenis owned process doing -bs
Date: Thu, 16 Sep 1999 15:12:22 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: Laurynas Biveinis <lauras AT softhome DOT net>,
DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: Re: Signed - unsigned comparison in dosexe.c
In-Reply-To: <Pine.SUN.3.91.990916123115.7654J-100000@is>
Message-ID: <Pine.A41.4.05.9909161451410.42536-100000@ieva01.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Thu, 16 Sep 1999, Eli Zaretskii wrote:

> 
> On Wed, 15 Sep 1999, Laurynas Biveinis wrote:
> 
> > The little patch below fixes this GCC warning.
> > 
> > Laurynas Biveinis
> > -----------------
> > --- dosexec.c.old       Thu Jun  3 19:27:36 1999
> > +++ dosexec.c   Wed Sep 15 19:36:28 1999
> > @@ -813,7 +813,8 @@
> >    char line[130], interp[FILENAME_MAX], iargs[130];
> >    FILE *f;
> >    char **newargs;
> > -  int i, hasargs=0;
> > +  int hasargs=0;
> > +  unsigned i;
> 
> Did GCC 2.95 compile that without any warning?  I'd expect it to say
> something, since the code does this (much later):

Today last time built current CVS version with gcc-2.95.1 (cross-compiler
under Linux, I didn't remove -Werror and similar options). No problems
encountered. 

> 
>   i = (*spawnfunc)(P_WAIT, pinterp, newargs, envp);
>   return i;
> 
> Not only can *spawnfunc return a negative value, but the function
> itself is declared as returning an int, not an unsigned int.
> 
> So I think this should be fixed differently.  In any case, the library
> is not guaranteed to be compatible with GCC 2.95 yet; there are
> probably more problems to sort out.
> 

At least I haven't seen problems with gcc-2.95.1 yet.

Andris


- Raw text -


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