Bug 114750 - used before set & missing return statement
Summary: used before set & missing return statement
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kinput2   
(Show other bugs)
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Bill Huang
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-02 11:29 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: v3.1-14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-12 08:02:22 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 d.binderman 2004-02-02 11:29:01 UTC
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 08:02:22 UTC
Fixed in v3.1-14.


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