Bug 79629 - bad source code
bad source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-14 05:10 EST by d.binderman
Modified: 2007-04-18 12:49 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-25 13:03:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2002-12-14 05:10:46 EST
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 13:03:25 EST
> 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.