X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f Date: Thu, 20 Dec 2001 01:27:46 -0500 From: AAganichev AT netscape DOT net (Alexander Aganichev) To: djgpp-workers AT delorie DOT com Subject: RE: Re: regcomp NLS fix Message-ID: <2FDE018B.3AD4F419.09ACFA57@netscape.net> X-Mailer: Atlas Mailer 1.0 Content-Type: text/plain; charset=iso-8859-1 Reply-To: djgpp-workers AT delorie DOT com Hans-Bernhard Broeker wrote: >> I have redone the patch (regex.nls+warning.diff) by casting all >> ctype.h function's arguments to unsigned char. Also I have fix the >> warnings caused by the missed brackets and unused values calculated. >> There's 4 more warnings in pedantic mode about possible use of >> uninitialized variables, but they seems to be safe to ignore. >Most of those changes are OK, but of one, I'm quite sure we don't want >to do that: >@@ -865,11 +865,11 @@ > static void > ordinary(p, ch) > register struct parse *p; >-register int ch; > { > register cat_t *cap = p->g->categories; Sorry, I'm really won't do that. >Compiling patched sources with the fully pedantic warning set (both the >XGCC=$(XLGCC) and CFLAGS=-w overrides commented out in the regex >makefile), I receive a lot more warnings than just those 4 "might be used >uninitialized" ones from my old GCC-2.8.1 Alpha-to-DJGPP cross compiler >here: > > 2 cast discards `const' from pointer target type > 4 might be used uninitialized in this function > 132 initialization discards `const' from pointer target type Hmm... I've tried to add -pedantic to the makefile explicitly, so there's probably a problem in my gcc 2.95.2 with warnings :-( >I extended the fix work based on yours to fix all those const-ness issues >(they tend to avalanche quite a bit). I managed to get away with only one >call to DJ's unconst() macro (in regcomp(), where it assigns the 'next' >pointer), and an otherwise clean build in fully pedantic mode. I think >it's a useful achievement that this part now builds with full warning >levels active, too. Yesterday, I found that OpenBSD guys did more changes: - they fixed the regexp code for the 64-bit platforms, - they added more accurate handling of malloc and realloc return value. Is it OK to peek these changes intact (with BSD copyright) or should we made something alike by ourselves? -- alexander aganichev url: http://aaganichev.narod.ru __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop AT Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/