Bug 79629

Summary: bad source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-03-25 18:03:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.