Bug 144890 - 2 * local variable used before set
Summary: 2 * local variable used before set
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Bill Huang
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-12 15:26 UTC by David Binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

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


Attachments (Terms of Use)

Description David Binderman 2005-01-12 15:26:23 UTC
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 10:08:37 UTC
Please test the latest version of ruby, 1.8.3-2.

Comment 2 David Binderman 2005-09-26 11:02:44 UTC
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 12:43:30 UTC
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-27 03:46:51 UTC
Fixed in 1.8.4-1.


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