bug-bash
[Top][All Lists]
Advanced

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

Some problems in bash-devel #1


From: Joachim Schmitz
Subject: Some problems in bash-devel #1
Date: Sat, 15 Sep 2012 11:34:45 +0200

Hi Chet

OK, so I've now switched to the devel branch and found a couple problems, here's my 1st batch of fixes to them:


       ofifo_list = copy_fifo_list (&osize);
                                    ^
".../execute_cmd.c", line 701: error(252): argument of type
         "volatile int *" is incompatible with parameter of type "int *"

       close_new_fifos (ofifo_list, osize);
                        ^
".../execute_cmd.c", line 1020: error(252): argument of type
         "volatile char *" is incompatible with parameter of type "char *"

diff --git a/execute_cmd.c b/execute_cmd.c
index acc5318..55f7f51 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -698,7 +698,7 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
  if (variable_context != 0)
    {
      ofifo = num_fifos ();
-      ofifo_list = copy_fifo_list (&osize);
+      ofifo_list = copy_fifo_list ((int *)&osize);
      saved_fifo = 1;
    }
  else
@@ -1017,7 +1017,7 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
    {
      nfifo = num_fifos ();
      if (nfifo > ofifo)
- close_new_fifos (ofifo_list, osize);
+ close_new_fifos ((char *)ofifo_list, osize);
      free (ofifo_list);
    }
#endif


   INT pc;
   ^
".../lib/glob/sm_loop.c", line 295: error(349): declaration
         may not appear after executable statement in block

diff --git a/lib/glob/sm_loop.c b/lib/glob/sm_loop.c
index 6e1e0a1..ff5adb3 100644
--- a/lib/glob/sm_loop.c
+++ b/lib/glob/sm_loop.c
@@ -291,7 +291,7 @@ BRACKMATCH (p, test, flags)
{
  register CHAR cstart, cend, c;
register int not; /* Nonzero if the sense of the character class is inverted. */
-  int brcnt, forcecoll;;
+  int brcnt, forcecoll;
  INT pc;
  CHAR *savep;



   backslash_table = table ? table : bstab;
                   ^
".../lib/sh/shquote.c", line 225: error(611): a value of
         "const char *" cannot be assigned to an entity of type "char *"

diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c
index 1c30bf4..c79ba9c 100644
--- a/lib/sh/shquote.c
+++ b/lib/sh/shquote.c
@@ -222,7 +222,7 @@ sh_backslash_quote (string, table, flags)

  result = (char *)xmalloc (2 * strlen (string) + 1);

-  backslash_table = table ? table : bstab;
+  backslash_table = table ? table : (char *)bstab;
  for (r = result, s = string; s && (c = *s); s++)
    {
      if (backslash_table[c] == 1)


tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, (int *)NULL); ^
".../subst.c", line 7878: error(252): argument of type "int *"
         is incompatible with parameter of type "arrayind_t *"

diff --git a/subst.c b/subst.c
index e09d24b..4c033a8 100644
--- a/subst.c
+++ b/subst.c
@@ -7875,7 +7875,7 @@ comsub:
   temp = nameref_cell (var);
   if (temp && *temp && valid_array_reference (temp))
     {
- tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, (int *)NULL); + tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, (arrayind_t *)NULL);
       if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal)
  return (tdesc);
       ret = tdesc;


the git repository might benefit from a .gitignore file:

$ cat .gitignore
*.[oa]
.build
.made
Makefile
bash
bashbug
bashversion
builtins/builtext.h
builtins/builtins.c
builtins/mkbuiltins
builtins/pipesize.h
builtins/psize.aux
builtins/ulimit.c
confdefs.h
config.h
config.log
config.status
# should get removed from git
configure
conftest.*
# should get removed from git
doc/Makefile
examples/loadables/Makefile
# should get removed from git
examples/loadables/perl/Makefile
lib/glob/Makefile
lib/intl/Makefile
lib/malloc/Makefile
lib/readline/Makefile
lib/sh/Makefile
lib/termcap/Makefile
lib/tilde/Makefile
lsignames.h
mksignames
mksyntax
# should get removed from git
parser-built
pathnames.h
po/Makefile
po/Makefile.in
po/POTFILES
signames.h
stamp-h
support/Makefile
syntax.c
version.h
# both should get removed from git
y.tab.c
y.tab.h


Not sure whether all these are really needed?

$ find . -size 0
./-i
./CWRU/-i
./CWRU/old-changelogs/-i
./autom4te.cache/output.1t
./autom4te.cache/traces.1t
./builtins/-i
./builtins/ChangeLog
./doc/-i
./lib/readline/-i
./lib/readline/doc/history.bt
./lib/readline/doc/rlman.bt
./lib/readline/doc/rluserman.bt
./lib/tilde/doc/tilde.texi
./tests/-i

Bye, Jojo



reply via email to

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