Philipp Kloke <philipp.kloke@web.de>


Found
r1182496, r1140805, r1140782, r1140779, r1004349, r1004348, r1004324, r1004322, r1004314, r1004283, r1004282, r1004276

r1004276 | hwright | 2010-10-04 15:09:39 +0000 (Mon, 04 Oct 2010)

JavaHL: Const-ify several methods.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/bindings/javahl/native/JNIByteArray.h,
  subversion/bindings/javahl/native/JNIByteArray.cpp
  (isNull, getBytes): Make const.

* subversion/bindings/javahl/native/SVNBase.h,
  subversion/bindings/javahl/native/SVNBase.cpp
  (getCppAddr): Same.

* subversion/bindings/javahl/native/File.h,
  subversion/bindings/javahl/native/File.cpp
  (isNull): Same.

* subversion/bindings/javahl/native/ClientContext.h,
  subversion/bindings/javahl/native/ClientContext.cpp
  (getConfigDirectory): Same.


r1004282 | hwright | 2010-10-04 15:14:41 +0000 (Mon, 04 Oct 2010)

JavaHL: Remove unused variables.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/bindings/javahl/native/CreateJ.cpp
  (StringSet): Remove unused variable.

* subversion/bindings/javahl/native/SVNRepos.cpp
  (lslocks): Same.

* subversion/bindings/javahl/native/SVNClient.cpp
  (info_baton, streamFileContent): Same.

* subversion/bindings/javahl/native/Targets.cpp
  (array): Same.


r1004283 | hwright | 2010-10-04 15:21:43 +0000 (Mon, 04 Oct 2010)

* subversion/bindings/javahl/native/ClientContext.cpp
  (ClientContext): Initialize a member variable.

Found by: Philipp Kloke <philipp.kloke@web.de>


r1004314 | hwright | 2010-10-04 16:30:08 +0000 (Mon, 04 Oct 2010)

Tighten variable scope in many locations.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/libsvn_diff/diff_file.c,
  subversion/libsvn_subr/error.c,
  subversion/libsvn_subr/opt.c,
  subversion/libsvn_subr/dirent_uri.c,
  subversion/libsvn_subr/deprecated.c,
  subversion/libsvn_subr/io.c,
  subversion/libsvn_ra_local/ra_plugin.c,
  subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c,
  subversion/mod_dav_svn/reports/update.c,
  subversion/tests/svn_test_main.c,
  subversion/svndumpfilter/main.c,
  subversion/libsvn_ra_svn/cyrus_auth.c,
  subversion/libsvn_ra_svn/marshal.c,
  subversion/svn/propdel-cmd.c,
  subversion/svn/propget-cmd.c,
  subversion/svn/log-cmd.c,
  subversion/svn/propset-cmd.c,
  subversion/svn/switch-cmd.c,
  subversion/svn/proplist-cmd.c,
  subversion/svn/propedit-cmd.c,
  subversion/libsvn_fs_base/tree.c,
  subversion/libsvn_fs_base/revs-txns.c,
  subversion/libsvn_wc/deprecated.c,
  subversion/libsvn_wc/update_editor.c,
  subversion/libsvn_wc/old-and-busted.c,
  subversion/libsvn_wc/wc_db.c,
  subversion/svnlook/main.c,
  subversion/libsvn_client/export.c,
  subversion/libsvn_client/patch.c,
  subversion/libsvn_client/merge.c,
  subversion/libsvn_client/mergeinfo.c,
  subversion/libsvn_ra_neon/mergeinfo.c,
  subversion/libsvn_ra_serf/mergeinfo.c,
  subversion/libsvn_repos/reporter.c,
  subversion/libsvn_repos/fs-wrap.c,
  subversion/libsvn_repos/delta.c,
  subversion/svnserve/serve.c:
    Tighten variable scope.


r1004322 | hwright | 2010-10-04 17:04:24 +0000 (Mon, 04 Oct 2010)

Remove some unused cruft from ra_neon.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/libsvn_ra_neon/fetch.c
  (subdir_t, POP_SUBDIR, PUSH_SUBDIR): Remove.


r1004324 | hwright | 2010-10-04 17:09:36 +0000 (Mon, 04 Oct 2010)

Eliminate a few calls to strlen(), by just manually checking for the empty
string.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/libsvn_client/add.c
  (auto_props_enumerator): As above.

* subversion/libsvn_diff/parse-diff.c
  (parse_range): Same.

* subversion/libsvn_client/patch.c
  (match_hunk): Same.

* subversion/libsvn_fs_fs/tree.c
  (fs_copied_from): Same.


r1004348 | hwright | 2010-10-04 18:19:53 +0000 (Mon, 04 Oct 2010)

My reading of K&R indicates that free'ing a NULL pointer is a no-op, so
let's stop manually checking for that case.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
  (callback_destroy_data_keyring, callback_default_keyring,
   password_get_gnome_keyring, password_set_gnome_keyring):
    Don't check for NULL before calling free().


r1004349 | hwright | 2010-10-04 18:22:00 +0000 (Mon, 04 Oct 2010)

Fix a potential compilation error when building with
SVN_MERGE__ALLOW_ALL_FORWARD_MERGES_FROM_SELF.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/libsvn_client/merge.c
  (filter_merged_revisions): Properly put brace outside of ifdef block.


r1140779 | hwright | 2011-06-28 18:45:31 +0000 (Tue, 28 Jun 2011)

Collapse the scope on several variables in our codebase.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/libsvn_fs_fs/tree.c
  (history_prev),
* subversion/libsvn_subr/mergeinfo.c
  (combine_with_lastrange),
* subversion/libsvn_subr/simple_providers.c
  (svn_auth__simple_first_creds_helper),
* subversion/tests/libsvn_fs_base/fs-base-test.c
  (create_within_copy),
* subversion/libsvn_wc/adm_ops.c
  (check_can_add_node),
* subversion/libsvn_client/merge.c
  (remove_noop_merge_ranges, do_directory_merge),
* subversion/libsvn_client/delete.c
  (svn_client_delete4):
    Tighten various variable scopes.


r1140782 | hwright | 2011-06-28 18:49:56 +0000 (Tue, 28 Jun 2011)

* subversion/libsvn_ra_neon/session.c
  (get_server_settings): Conditionally declare a variable which is only
    used conditionally.

Found by: Philipp Kloke <philipp.kloke@web.de>


r1140805 | hwright | 2011-06-28 19:35:01 +0000 (Tue, 28 Jun 2011)

There are a couple of place where we assume the non-NULL-ness of a parent
baton, and then continue to check the baton's NULL-ness.  In these cases, we
can just remove the check, since we'll never get to that point with an invalid
value.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/svnrdump/dump_editor.c
  (open_directory, open_file),
* subversion/libsvn_repos/dump.c
  (open_directory, open_file):
    Don't check to see if the parent baton is NULL.


r1182496 | hwright | 2011-10-12 18:01:39 +0000 (Wed, 12 Oct 2011)

* subversion/libsvn_client/merge.c
  (merge_file_changed): Reduce variable scope.

Found by: Philipp Kloke <philipp.kloke@web.de>