Bug 114750 - used before set & missing return statement
used before set & missing return statement
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kinput2 (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Bill Huang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-02 06:29 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: v3.1-14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-12 03:02:22 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 2004-02-02 06:29:01 EST
Description of problem:

I just tried to compile package kinput2-v3.1-11 from Redhat
Fedora Core 1.

The compiler said

1.


XimpProto.c(1695): remark #592: variable "data" is used before its
value is set

The offending source code is

    long data[13];

    TRACE(("setStatusProperty()\n"));

    /* data[0]-data[3]: Area.{x,y,width,height} */
    if (mask & XIMP_STS_AREA_MASK) {
        data[0] = xsattr->areax = data[0];
        data[1] = xsattr->areay = data[1];
        data[2] = xsattr->areawidth = data[2];
        data[3] = xsattr->areaheight = data[3];
    }

I'm not sure why it's a good idea to copy around uninitialised data.

2.

Canna.c(702): remark #1011: missing return statement at end of
non-void function "initializeCannaConnection"
Canna.c(1010): remark #1011: missing return statement at end of
non-void function "changeTextForCanna"
Canna.c(1086): remark #1011: missing return statement at end of
non-void function "fixProcForCanna"
Canna.c(1115): remark #1011: missing return statement at end of
non-void function "shiftRight"
Canna.c(1141): remark #1011: missing return statement at end of
non-void function "shiftLeft"
Canna.c(1170): remark #1011: missing return statement at end of
non-void function "shiftLeftAll"
Canna.c(1200): remark #1011: missing return statement at end of
non-void function "ibufInitialize"
Canna.c(1254): remark #1011: missing return statement at end of
non-void function "toJapaneseMode"

You might want to tighten up on the return types of these functions.
Maybe some of them return void ?



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 2004-02-12 03:02:22 EST
Fixed in v3.1-14.

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