Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 79629 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-14 10:10 UTC by d.binderman
Modified: 2007-04-18 16:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-25 18:03:25 UTC


Attachments (Terms of Use)

Description d.binderman 2002-12-14 10:10:46 UTC
Description of problem:

Hello there,

I just tried to compile package bash-2.05b-5 from Redhat 8.0.

Here are some of the compiler messages.

common.c:247: warning: too few arguments for format

Here is a patch which fixes the messages.

*** ./builtins/common.c.old	2002-11-22 14:42:11.000000000 +0000
--- ./builtins/common.c	2002-11-22 14:42:20.000000000 +0000
***************
*** 244,250 ****
       char *s;
  {
    if (s)
!     builtin_error ("%s: no job control");
    else
      builtin_error ("no job control");
  }
--- 244,250 ----
       char *s;
  {
    if (s)
!     builtin_error ("%s: no job control", s);
    else
      builtin_error ("no job control");
  }

Here are some other messages from the compiler.

support/bashversion.c:65: warning: `rv' might be used uninitialized in this function
./parse.y:2580: warning: `nestret' might be used uninitialized in this function
variables.c:1445: warning: `tmp_value' might be used uninitialized in this function
expr.c:386: warning: `op' might be used uninitialized in this function
expr.c:387: warning: `lvalue' might be used uninitialized in this function
subst.c:3623: warning: `bufp' might be used uninitialized in this function
subst.c:4181: warning: `t' might be used uninitialized in this function
subst.c:4658: warning: `temp' might be used uninitialized in this function
hashlib.c:79: warning: `new_bucket' might be used uninitialized in this function
bashline.c:1538: warning: `aentry' might be used uninitialized in this function
findcmd.c:337: warning: `name_len' might be used uninitialized in this function
redir.c:90: warning: `oflags' might be used uninitialized in this function
redir.c:613: warning: `oflags' might be used uninitialized in this function
redir.c:617: warning: `new_redirect' might be used uninitialized in this function
pcomplete.c:510: warning: `js' might be used uninitialized in this function
./bind.def:108: warning: `cmd_seq' might be used uninitialized in this function
./enable.def:97: warning: `filename' might be used uninitialized in this function
./fg_bg.def:115: warning: `old_async_pid' might be used uninitialized in this function
./history.def:95: warning: `delete_arg' might be used uninitialized in this function
./set.def:741: warning: `t' might be used uninitialized in this function
./getopts.def:146: warning: `old_opterr' might be used uninitialized in this function
netopen.c:204: warning: `s' might be used uninitialized in this function
display.c:389: warning: `wc_width' might be used uninitialized in this function


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:

Comment 1 Tim Waugh 2003-03-25 18:03:25 UTC
> support/bashversion.c:65: warning: `rv' might be used uninitialized in this
function
> ./parse.y:2580: warning: `nestret' might be used uninitialized in this function
> variables.c:1445: warning: `tmp_value' might be used uninitialized in this
function
> expr.c:387: warning: `lvalue' might be used uninitialized in this function
> expr.c:386: warning: `op' might be used uninitialized in this function
> subst.c:3623: warning: `bufp' might be used uninitialized in this function
> subst.c:4181: warning: `t' might be used uninitialized in this function
...

The compiler is mistaken in these cases.

Thanks for pointing out the missed parameter in the first case; applied.

Fixed package will be bash-2.05b-23.


Note You need to log in before you can comment on or make changes to this bug.