X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs Date: Mon, 11 Jun 2001 13:26:57 +0200 (MET DST) From: Hans-Bernhard Broeker X-Sender: broeker AT acp3bf To: djgpp-workers AT delorie DOT com Subject: Re: Compiler options for djdev build In-Reply-To: <200106091711.TAA04157@mother.ludd.luth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 9 Jun 2001, Martin Str|mberg wrote: > Are these correct corrections?: I have at least one small doubt. See below. > @@ -327,7 +327,7 @@ _doprnt(const char *fmt0, va_list argp, > */ > char *p /*, *memchr() */; > > - if ((p = memchr(t, 0, prec))) > + if ((p = memchr(t, 0, (size_t)prec))) Casting a variable on passing to a function is almost always a sign of trouble. It may make more sense to turn 'prec' into an unsigned variable (size_t or unsigned int), here. OTOH, 'prec' has a signalling value of -1 for "undefined", in this routin, so I guess this is OK. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.