Bug 164259 - local variable used before set
Summary: local variable used before set
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: subversion
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-26 12:57 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-26 13:05:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-07-26 12:57:40 UTC
Description of problem:

I just tried to compile Redhat Fedora package
subversion-1.2.1-3 with the Intel C compiler version 8.1

The compiler said

subversion/libsvn_fs_base/lock.c(391): remark #592: variable "err" is used
before its value is set

The source code is

  svn_error_t *err;

  SVN_ERR (svn_fs_base__check_fs (fs));

  args.path = svn_fs_base__canonicalize_abspath (path, pool);
  args.lock_p = lock;
  return svn_fs_base__retry_txn (fs, txn_body_get_lock, &args, pool);
  return err;
}

Suggest initialise local variable "err" before first use.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Joe Orton 2005-07-26 13:05:19 UTC
The "return err" line is unreachable so there's no real bug here.  The unused
var and the unreachable line are fixed upstream already.


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