[tor-commits] [tor/master] Add some missing case values to please clang
nickm at torproject.org
nickm at torproject.org
Thu Mar 28 01:07:45 UTC 2013
commit 7f8098d2d0e719f3ea9e35a7f930477f8fc7682a
Author: Nick Mathewson <nickm at torproject.org>
Date: Wed Mar 27 21:04:08 2013 -0400
Add some missing case values to please clang
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 | 6 ++++++
src/or/circuitbuild.c | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/changes/bug8598 b/changes/bug8598
new file mode 100644
index 0000000..e31c8f3
--- /dev/null
+++ b/changes/bug8598
@@ -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.
+
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index ce552b4..aec6c6a 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -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;
More information about the tor-commits
mailing list