You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2017/12/15 19:34:38 UTC

svn commit: r1818318 - in /subversion/trunk: subversion/tests/libsvn_client/ subversion/tests/libsvn_fs_fs/ subversion/tests/libsvn_repos/ subversion/tests/libsvn_subr/ tools/client-side/svnconflict/ tools/dev/svnmover/

Author: julianfoad
Date: Fri Dec 15 19:34:38 2017
New Revision: 1818318

URL: http://svn.apache.org/viewvc?rev=1818318&view=rev
Log:
Don't ignore error returns.

Found by: danielsh
  using tools/dev/warn-unused-result.sh

Modified:
    subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c
    subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
    subversion/trunk/subversion/tests/libsvn_repos/authz-test.c
    subversion/trunk/subversion/tests/libsvn_repos/dump-load-test.c
    subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c
    subversion/trunk/subversion/tests/libsvn_subr/priority-queue-test.c
    subversion/trunk/tools/client-side/svnconflict/svnconflict.c
    subversion/trunk/tools/dev/svnmover/svnmover.c

Modified: subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c?rev=1818318&r1=1818317&r2=1818318&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c Fri Dec 15 19:34:38 2017
@@ -540,7 +540,7 @@ create_wc_with_dir_add_vs_dir_add_merge_
       /* Now move the new directory to the colliding path. */
       new_dir_path = svn_relpath_join(trunk_path, new_dir_name, b->pool);
       SVN_ERR(sbox_wc_update(b, "", SVN_INVALID_REVNUM));
-      sbox_wc_move(b, move_src_path, new_dir_path);
+      SVN_ERR(sbox_wc_move(b, move_src_path, new_dir_path));
       SVN_ERR(sbox_wc_commit(b, ""));
     }
   new_dir_path = svn_relpath_join(branch_path, new_dir_name, b->pool);

Modified: subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1818318&r1=1818317&r2=1818318&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Fri Dec 15 19:34:38 2017
@@ -1631,8 +1631,8 @@ delta_chain_with_plain(const svn_test_op
   svn_hash_sets(props, "p", svn_string_create(prop_value->data, pool));
 
   hash_rep = svn_stringbuf_create_empty(pool);
-  svn_hash_write2(props, svn_stream_from_stringbuf(hash_rep, pool), "END",
-                  pool);
+  SVN_ERR(svn_hash_write2(props, svn_stream_from_stringbuf(hash_rep, pool),
+                          "END", pool));
 
   SVN_ERR(svn_fs_begin_txn(&txn, fs, rev, pool));
   SVN_ERR(svn_fs_txn_root(&root, txn, pool));

Modified: subversion/trunk/subversion/tests/libsvn_repos/authz-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_repos/authz-test.c?rev=1818318&r1=1818317&r2=1818318&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_repos/authz-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_repos/authz-test.c Fri Dec 15 19:34:38 2017
@@ -277,9 +277,9 @@ test_authz_parse(const svn_test_opts_t *
 
   printf("[users]\n");
   if (authz->has_anon_rights)
-    print_user_rights(NULL, NULL, 0, &authz->anon_rights, pool);
+    SVN_ERR(print_user_rights(NULL, NULL, 0, &authz->anon_rights, pool));
   if (authz->has_authn_rights)
-    print_user_rights(NULL, NULL, 0, &authz->authn_rights, pool);
+    SVN_ERR(print_user_rights(NULL, NULL, 0, &authz->authn_rights, pool));
   SVN_ERR(svn_iter_apr_hash(NULL, authz->user_rights,
                             print_user_rights, NULL, pool));
   printf("\n\n");

Modified: subversion/trunk/subversion/tests/libsvn_repos/dump-load-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_repos/dump-load-test.c?rev=1818318&r1=1818317&r2=1818318&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_repos/dump-load-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_repos/dump-load-test.c Fri Dec 15 19:34:38 2017
@@ -81,7 +81,7 @@ test_dump_bad_props(svn_stringbuf_t **du
                              notify_func, notify_baton,
                              NULL, NULL, NULL, NULL,
                              pool));
-  svn_stream_close(stream);
+  SVN_ERR(svn_stream_close(stream));
 
   /* Check that the property appears in the dump data */
   expected_str = apr_psprintf(pool, "K %d\n%s\n"
@@ -131,7 +131,7 @@ test_load_bad_props(svn_stringbuf_t *dum
                              notify_func, notify_baton,
                              NULL, NULL, /*cancellation*/
                              pool));
-  svn_stream_close(stream);
+  SVN_ERR(svn_stream_close(stream));
 
   /* Check the loaded property */
   fs = svn_repos_fs(repos);

Modified: subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1818318&r1=1818317&r2=1818318&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c Fri Dec 15 19:34:38 2017
@@ -1762,7 +1762,7 @@ test_rangelist_merge_overlap(apr_pool_t
      svn_string_t * tmp_string;
      svn_rangelist_t *range_list;
 
-     svn_rangelist_to_string(&tmp_string, rangelist, pool);
+     SVN_ERR(svn_rangelist_to_string(&tmp_string, rangelist, pool));
 
      SVN_ERR(svn_rangelist__parse(&range_list, tmp_string->data, pool));
   }

Modified: subversion/trunk/subversion/tests/libsvn_subr/priority-queue-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/priority-queue-test.c?rev=1818318&r1=1818317&r2=1818318&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/priority-queue-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/priority-queue-test.c Fri Dec 15 19:34:38 2017
@@ -125,7 +125,7 @@ verify_queue_order(svn_priority_queue__t
     }
 
   /* the queue should now be empty */
-  verify_empty_queue(queue);
+  SVN_ERR(verify_empty_queue(queue));
 
   return SVN_NO_ERROR;
 }
@@ -154,7 +154,7 @@ test_empty_queue(apr_pool_t *pool)
   svn_priority_queue__t *queue
     = svn_priority_queue__create(elements, compare_func);
 
-  verify_empty_queue(queue);
+  SVN_ERR(verify_empty_queue(queue));
 
   return SVN_NO_ERROR;
 }
@@ -214,7 +214,7 @@ test_update(apr_pool_t *pool)
     }
 
   /* the queue should now be empty */
-  verify_empty_queue(queue);
+  SVN_ERR(verify_empty_queue(queue));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/tools/client-side/svnconflict/svnconflict.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/svnconflict/svnconflict.c?rev=1818318&r1=1818317&r2=1818318&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/svnconflict/svnconflict.c (original)
+++ subversion/trunk/tools/client-side/svnconflict/svnconflict.c Fri Dec 15 19:34:38 2017
@@ -363,12 +363,12 @@ svnconflict_list(apr_getopt_t *os, void
                         &conflict, local_abspath, ctx, pool));
 
   if (text_conflicted)
-    svn_cmdline_printf(pool, "text-conflict\n");
+    SVN_ERR(svn_cmdline_printf(pool, "text-conflict\n"));
 
   for (i = 0; i < props_conflicted->nelts; i++)
     {
       const char *propname = APR_ARRAY_IDX(props_conflicted, i, const char *); 
-      svn_cmdline_printf(pool, "prop-conflict: %s\n", propname);
+      SVN_ERR(svn_cmdline_printf(pool, "prop-conflict: %s\n", propname));
     }
 
   if (tree_conflicted)
@@ -380,14 +380,14 @@ svnconflict_list(apr_getopt_t *os, void
                                                        &local_change,
                                                        conflict, ctx,
                                                        pool, pool));
-      svn_cmdline_printf(pool, "tree-conflict: %s %s\n",
-                         incoming_change, local_change);
+      SVN_ERR(svn_cmdline_printf(pool, "tree-conflict: %s %s\n",
+                                 incoming_change, local_change));
     }
 
   return SVN_NO_ERROR;
 }
 
-static void
+static svn_error_t *
 print_conflict_options(apr_array_header_t *options, apr_pool_t *pool)
 {
   int i;
@@ -401,8 +401,9 @@ print_conflict_options(apr_array_header_
       option = APR_ARRAY_IDX(options, i, svn_client_conflict_option_t *);
       id = svn_client_conflict_option_get_id(option);
       label = svn_client_conflict_option_get_label(option, pool);
-      svn_cmdline_printf(pool, "%d: %s\n", id, label);
+      SVN_ERR(svn_cmdline_printf(pool, "%d: %s\n", id, label));
     }
+  return SVN_NO_ERROR;
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
@@ -433,7 +434,7 @@ svnconflict_options_text(apr_getopt_t *o
   SVN_ERR(svn_client_conflict_text_get_resolution_options(&options,
                                                           conflict, ctx,
                                                           pool, pool));
-  print_conflict_options(options, pool);
+  SVN_ERR(print_conflict_options(options, pool));
 
   return SVN_NO_ERROR;
 }
@@ -466,7 +467,7 @@ svnconflict_options_prop(apr_getopt_t *o
   SVN_ERR(svn_client_conflict_prop_get_resolution_options(&options,
                                                           conflict, ctx,
                                                           pool, pool));
-  print_conflict_options(options, pool);
+  SVN_ERR(print_conflict_options(options, pool));
 
   return SVN_NO_ERROR;
 }
@@ -500,7 +501,7 @@ svnconflict_options_tree(apr_getopt_t *o
   SVN_ERR(svn_client_conflict_tree_get_resolution_options(&options,
                                                           conflict, ctx,
                                                           pool, pool));
-  print_conflict_options(options, pool);
+  SVN_ERR(print_conflict_options(options, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/tools/dev/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/svnmover/svnmover.c?rev=1818318&r1=1818317&r2=1818318&view=diff
==============================================================================
--- subversion/trunk/tools/dev/svnmover/svnmover.c (original)
+++ subversion/trunk/tools/dev/svnmover/svnmover.c Fri Dec 15 19:34:38 2017
@@ -2436,7 +2436,7 @@ do_put_file(svn_branch__txn_t *txn,
     else
       SVN_ERR(svn_stream_for_stdin2(&src, FALSE, scratch_pool));
 
-    svn_stringbuf_from_stream(&text, src, 0, scratch_pool);
+    SVN_ERR(svn_stringbuf_from_stream(&text, src, 0, scratch_pool));
   }
   payload = svn_element__payload_create_file(props, text, scratch_pool);