Bug 164259

Summary: local variable used before set
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: subversionAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-26 13:05:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.