Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 149906 - local variable used before set
local variable used before set
Product: Fedora
Classification: Fedora
Component: opencdk (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Enrico Scholz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2005-02-28 13:43 EST by David Binderman
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-03 12:50:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Binderman 2005-02-28 13:43:03 EST
Description of problem:

I just tried to compile package opencdk-0.5.5-1 from 
Redhat Fedora Extras development tree.

The compiler said

t-stream.c(452): remark #592: variable "rc" is used before its value
is set

The source code is

  int rc ;

  cdk_handle_new (&hd);
  cdk_keydb_new (&db, CDK_DBTYPE_SK_KEYRING, "sec.gpg", 7);
  cdk_strlist_add (&locusr, "twoaday@daredevil");
      //rc = cdk_file_clearsign (hd, locusr, file, "out.asc");
  if (rc)
    printf ("clearsign_file %s: `%s'\n", file, cdk_strerror (rc));

Suggest init local variable "rc" before first use. Should the 
commented out code be put back in ?

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Enrico Scholz 2005-03-03 12:50:23 EST
thx, reported upstream and will be (hopefully) fixed in the next release. It
happens in test-code only, so I do not fix it immediately.


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