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 150665 - local variable used before set
local variable used before set
Product: Fedora
Classification: Fedora
Component: device-mapper-multipath (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
Depends On:
  Show dependency treegraph
Reported: 2005-03-09 09:14 EST by David Binderman
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-21 12:27:22 EDT
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-03-09 09:14:27 EST
Description of problem:

I just tried to compile device-mapper-multipath-0.4.2-1.0 from Redhat
Fedora Core development tree with the Intel C compiler.

The compiler said

main.c(650): remark #592: variable "mode" is used before its value is set

The source code is

                if (mkdir(CALLOUT_DIR, mode) < 0) {

Suggest init local variable mode before first use.

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Christophe Varoqui 2005-03-29 17:50:33 EST
is the following enough to calm ICC ?

@@ -682,7 +511,7 @@
 static int
-       mode_t mode;
+       mode_t mode = S_IRWXU;
        struct stat *buf;
        char ramfs_args[64];
        int i;
Comment 2 David Binderman 2005-03-30 04:36:09 EST
>is the following enough to calm ICC ?

I haven't tested it, but a visual inspection suggests it will.
Comment 3 Lars Marowsky-Bree 2005-04-21 07:08:47 EDT
This is fixed in 0.4.3 and up. Can this bug be resolved now?

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