You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/06/12 15:26:00 UTC

svn commit: r1349319 - in /subversion/trunk: subversion/svnversion/main.c tools/dev/svnraisetreeconflict/main.c

Author: stefan2
Date: Tue Jun 12 13:25:59 2012
New Revision: 1349319

URL: http://svn.apache.org/viewvc?rev=1349319&view=rev
Log:
Fix "unreachable code" warning. usage() will do an unconditional exit(), so
we don't need to return early in the callers afterwards.

* subversion/svnversion/main.c
  (main): add comment to usage() invocation and remove trailing return
* tools/dev/svnraisetreeconflict/main.c
  (main): add comment to usage() invocation and remove trailing return

Modified:
    subversion/trunk/subversion/svnversion/main.c
    subversion/trunk/tools/dev/svnraisetreeconflict/main.c

Modified: subversion/trunk/subversion/svnversion/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnversion/main.c?rev=1349319&r1=1349318&r2=1349319&view=diff
==============================================================================
--- subversion/trunk/subversion/svnversion/main.c (original)
+++ subversion/trunk/subversion/svnversion/main.c Tue Jun 12 13:25:59 2012
@@ -179,10 +179,8 @@ main(int argc, const char *argv[])
       if (APR_STATUS_IS_EOF(status))
         break;
       if (status != APR_SUCCESS)
-        {
-          usage(pool);
-          return EXIT_FAILURE;
-        }
+        usage(pool);  /* this will exit() */
+
       switch (opt)
         {
         case 'n':
@@ -201,8 +199,7 @@ main(int argc, const char *argv[])
           is_version = TRUE;
           break;
         default:
-          usage(pool);
-          return EXIT_FAILURE;
+          usage(pool);  /* this will exit() */
         }
     }
 
@@ -212,10 +209,7 @@ main(int argc, const char *argv[])
       exit(0);
     }
   if (os->ind > argc || os->ind < argc - 2)
-    {
-      usage(pool);
-      return EXIT_FAILURE;
-    }
+    usage(pool);  /* this will exit() */
 
   SVN_INT_ERR(svn_utf_cstring_to_utf8(&wc_path,
                                       (os->ind < argc) ? os->argv[os->ind]

Modified: subversion/trunk/tools/dev/svnraisetreeconflict/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/svnraisetreeconflict/main.c?rev=1349319&r1=1349318&r2=1349319&view=diff
==============================================================================
--- subversion/trunk/tools/dev/svnraisetreeconflict/main.c (original)
+++ subversion/trunk/tools/dev/svnraisetreeconflict/main.c Tue Jun 12 13:25:59 2012
@@ -365,10 +365,8 @@ main(int argc, const char *argv[])
       if (APR_STATUS_IS_EOF(status))
         break;
       if (status != APR_SUCCESS)
-        {
-          usage(pool);
-          return EXIT_FAILURE;
-        }
+        usage(pool);  /* this will exit() */
+
       switch (opt)
         {
         case 'h':
@@ -379,8 +377,7 @@ main(int argc, const char *argv[])
           exit(0);
           break;
         default:
-          usage(pool);
-          return EXIT_FAILURE;
+          usage(pool);  /* this will exit() */
         }
     }
 
@@ -396,10 +393,7 @@ main(int argc, const char *argv[])
     }
 
   if (remaining_argv->nelts < 1)
-    {
-      usage(pool);
-      return EXIT_FAILURE;
-    }
+    usage(pool);  /* this will exit() */
 
   /* Do the main task */
   SVNRAISETC_INT_ERR(raise_tree_conflict(remaining_argv->nelts,