Bug 144890 - 2 * local variable used before set
2 * local variable used before set
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ruby (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Bill Huang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-12 10:26 EST by David Binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 1.8.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-12-26 22:46:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description David Binderman 2005-01-12 10:26:23 EST
Description of problem:

I just tried to compile package ruby-1.8.2-1 from 
Redhat Fedora development tree.

The compiler said

ossl_ocsp.c(264): remark #592: variable "req" is used before its value
is set

The source code is

    OCSP_REQUEST *req;
    VALUE str;
    unsigned char *p;
    long len;

    if((len = i2d_OCSP_REQUEST(req, NULL)) <= 0)

Suggest init local variable "req" before first use.

2.

rubyext.c(831): remark #592: variable "size" is used before its value
is set

The source code is

        int size = NUM2INT(rb_funcall(size, s_to_i, 0));

The trouble with this code is that there is a parameter called size,
and a local variable also called size. Suggest code re-work.


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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Akira TAGOH 2005-09-26 06:08:37 EDT
Please test the latest version of ruby, 1.8.3-2.
Comment 2 David Binderman 2005-09-26 07:02:44 EDT
The machine with the Intel C compiler on it died.

I think if you want to verify that this bug is fixed in the latest 
release, I can recommend a quick visual inspection of the source code.
Comment 3 Akira TAGOH 2005-09-26 08:43:30 EDT
Yes, I did :) the surrounding source code you pointed out looks like modified.
that's why I asked you now.
Comment 4 Akira TAGOH 2005-12-26 22:46:51 EST
Fixed in 1.8.4-1.

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