www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/12/01:49:25

Message-Id: <200106120548.f5C5ma032271@hal.astr.lu.lv>
From: Andris Pavenis <pavenis AT latnet DOT lv>
To: djgpp-workers AT delorie DOT com
Subject: [PATCH] gcc-3.0 related fix for src/libc/posix/fcntl/fcntl.c
Date: Tue, 12 Jun 2001 08:48:36 +0300
X-Mailer: KMail [version 1.2.2]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

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, &regs);
    }
    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, &regs);
    }
    else

- Raw text -


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