bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash 2.05 unreachable code in readline library


From: Paul Eggert
Subject: Bash 2.05 unreachable code in readline library
Date: Thu, 3 May 2001 16:44:24 -0700 (PDT)

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.7
Compiler: cc -xarch=v9
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' 
-DCONF_OSTYPE='solaris2.7' -DCONF_MACHTYPE='sparc-sun-solaris2.7' 
-DCONF_VENDOR='sun' -DSHELL  -DHAVE_CONFIG_H  -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I.  -I.. -I../include -I../lib 
-I/tmp/prefix/include -g
uname output: SunOS sic.twinsun.com 5.7 Generic_106541-15 sun4u sparc 
SUNW,UltraSPARC-IIi-Engine
Machine Type: sparc-sun-solaris2.7

Bash Version: 2.05
Patch Level: 0
Release Status: release

Description:
        Two places in the readline code are unreachable, and the
        Sun C compiler warns about them.  Removing them doesn't fix
        any bugs, but it does clean up the code.

Repeat-By:

Fix:

2001-05-03  Paul Eggert  <address@hidden>

        * lib/readline/input.c (_rl_input_available): Remove
        unreachable code in the case where HAVE_SELECT is defined.
        * lib/readline/readline.c (rl_digit_loop): Remove unreachable code.


===================================================================
RCS file: lib/readline/input.c,v
retrieving revision 2.5
retrieving revision 2.5.0.1
diff -pu -r2.5 -r2.5.0.1
--- lib/readline/input.c        2001/03/27 15:15:04     2.5
+++ lib/readline/input.c        2001/05/03 23:41:43     2.5.0.1
@@ -260,7 +260,7 @@ _rl_input_available ()
   timeout.tv_sec = 0;
   timeout.tv_usec = _keyboard_input_timeout;
   return (select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout) > 
0);
-#endif
+#else
 
 #if defined (FIONREAD)
   if (ioctl (tty, FIONREAD, &chars_avail) == 0)
@@ -268,6 +268,7 @@ _rl_input_available ()
 #endif
 
   return 0;
+#endif
 }
 
 void
===================================================================
RCS file: lib/readline/readline.c,v
retrieving revision 2.5
retrieving revision 2.5.0.1
diff -pu -r2.5 -r2.5.0.1
--- lib/readline/readline.c     2001/04/02 19:56:20     2.5
+++ lib/readline/readline.c     2001/05/03 23:41:43     2.5.0.1
@@ -900,9 +900,6 @@ rl_digit_loop ()
          return (_rl_dispatch (key, _rl_keymap));
        }
     }
-
-  RL_UNSETSTATE(RL_STATE_NUMERICARG);
-  return 0;
 }
 
 /* Add the current digit to the argument in progress. */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]