aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2021-08-15 17:57:35 +0200
committerMark Wielaard <mark@klomp.org>2021-08-15 17:57:48 +0200
commit6109a6b4b1ca6453b42a3b99f1998e0eb5674741 (patch)
tree72e16e96210056f56d7203386526b741b9544677
parent52c1cdc9c63baeb090680daf6762c02362f2c6cd (diff)
downloadgcc-6109a6b4b1ca6453b42a3b99f1998e0eb5674741.zip
gcc-6109a6b4b1ca6453b42a3b99f1998e0eb5674741.tar.gz
gcc-6109a6b4b1ca6453b42a3b99f1998e0eb5674741.tar.bz2
Suppress uninitialized candidate_type warning in process_traits_for_candidates
Without handling the default case in the switch statement gcc 10.2.1 will warn: rust-hir-path-probe.h:75:40: warning: ‘candidate_type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
-rw-r--r--gcc/rust/typecheck/rust-hir-path-probe.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/typecheck/rust-hir-path-probe.h b/gcc/rust/typecheck/rust-hir-path-probe.h
index 87c9662..22b1074 100644
--- a/gcc/rust/typecheck/rust-hir-path-probe.h
+++ b/gcc/rust/typecheck/rust-hir-path-probe.h
@@ -260,6 +260,7 @@ private:
break;
case TraitItemReference::TraitItemType::ERROR:
+ default:
gcc_unreachable ();
break;
}