delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/12/08:52:59

From: Martin Stromberg <Martin DOT Stromberg AT epl DOT ericsson DOT se>
Message-Id: <200106121251.OAA13656@lws256.lu.erisoft.se>
Subject: Re: [PATCH] gcc-3.0 related fix for src/libc/posix/fcntl/fcntl.c
To: djgpp-workers AT delorie DOT com
Date: Tue, 12 Jun 2001 14:51:55 +0200 (MET DST)
In-Reply-To: <200106120548.f5C5ma032271@hal.astr.lu.lv> from "Andris Pavenis" at Jun 12, 2001 08:48:36 AM
X-Mailer: ELM [version 2.5 PL3]
MIME-Version: 1.0
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

Andris said:
> I'm getting following warning when compiling src/libc/posix/fcntl/fcntl.c with
> gcc-3.0 prerelease versions:
> 
> C:/DJGPP/BIN/make.exe -C posix/fcntl
> gcc ... -c creat.c
> gcc ... -c fcntl.c
> cc1.exe: warnings being treated as errors
> fcntl.c: In function `_get_sft_entry_ptr':
> fcntl.c:23: warning: declaration of `index' shadows global declaration
> make.exe[3]: *** [fcntl.o] Error 1
> make.exe[2]: *** [all_subs] Error 2
> make.exe[1]: *** [all] Error 2
> make.exe: *** [subs] Error 2
> 
> Renaming index to ind fixes the problem. Ok to commit?

I'm not too happy with such changes. The variable is an index so it
should be allowed to be named "index". 

Sure it shadows another global named index. But that isn't a problem
if we don't need to use that global.


Right,

						MartinS

- Raw text -


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