Mail Archives: djgpp-workers/2001/06/12/01:49:25
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?
Andris
Index: djgpp/src/libc/posix/fcntl/fcntl.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/fcntl/fcntl.c,v
retrieving revision 1.6
diff -p -3 -r1.6 fcntl.c
*** djgpp/src/libc/posix/fcntl/fcntl.c 2001/05/22 20:48:25 1.6
--- djgpp/src/libc/posix/fcntl/fcntl.c 2001/06/11 12:26:41
***************
*** 20,26 ****
static unsigned long _get_sft_entry_ptr(int fd)
{
__dpmi_regs regs;
! unsigned char index;
unsigned long es, di;
--- 20,26 ----
static unsigned long _get_sft_entry_ptr(int fd)
{
__dpmi_regs regs;
! unsigned char ind;
unsigned long es, di;
*************** static unsigned long _get_sft_entry_ptr(
*** 40,53 ****
/* Get the SFT entry number for this handle. */
es = regs.x.es;
di = regs.x.di;
! index = _farpeekb(_dos_ds, es * 16 + di);
! if (index < 0xff)
{
/* Now get the address of the entry. */
regs.x.ax = 0x1216;
! regs.x.bx = index;
__dpmi_int (0x2f, ®s);
}
else
--- 40,53 ----
/* Get the SFT entry number for this handle. */
es = regs.x.es;
di = regs.x.di;
! ind = _farpeekb(_dos_ds, es * 16 + di);
! if (ind < 0xff)
{
/* Now get the address of the entry. */
regs.x.ax = 0x1216;
! regs.x.bx = ind;
__dpmi_int (0x2f, ®s);
}
else
- Raw text -