]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add some missing case values to please clang
authorNick Mathewson <nickm@torproject.org>
Thu, 28 Mar 2013 01:04:08 +0000 (21:04 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 28 Mar 2013 01:04:08 +0000 (21:04 -0400)
It seems that some versions of clang that would prefer the
-Wswitch-enum compiler flag to warn about switch statements with
missing enum values, even if those switch statements have a
default.

Fixes bug 8598; bugfix on 0.2.4.10-alpha.

changes/bug8598 [new file with mode: 0644]
src/or/circuitbuild.c

diff --git a/changes/bug8598 b/changes/bug8598
new file mode 100644 (file)
index 0000000..e31c8f3
--- /dev/null
@@ -0,0 +1,6 @@
+  o Bugfixes:
+    - Fix compilation warning with some versions of clang that would prefer
+      the -Wswitch-enum compiler flag to warn about switch statements with
+      missing enum values, even if those switch statements have a default:
+      statement. Fixes bug 8598; bugfix on 0.2.4.10-alpha.
+
index ce552b47f4a10eacff04e4ce95a89852d43a568f..aec6c6acf23bf12f3698757d42f515cae8a7b8c0 100644 (file)
@@ -2010,6 +2010,9 @@ pathbias_check_close(origin_circuit_t *ocirc, int reason)
       pathbias_count_use_failed(ocirc);
       break;
 
+    case PATH_STATE_NEW_CIRC:
+    case PATH_STATE_BUILD_ATTEMPTED:
+    case PATH_STATE_ALREADY_COUNTED:
     default:
       // Other states are uninteresting. No stats to count.
       break;