[vala/staging] Add explicit "default: break; " statements for coverage of enum-typed switch
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] Add explicit "default: break; " statements for coverage of enum-typed switch
- Date: Sun, 31 Mar 2019 08:37:22 +0000 (UTC)
commit abaf1a57b0035540ad625b847a288a32603ea465
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Mar 31 10:26:43 2019 +0200
Add explicit "default: break;" statements for coverage of enum-typed switch
codegen/valaccodebasemodule.vala | 2 ++
libvaladoc/gtkdocrenderer.vala | 2 ++
vala/valaparser.vala | 2 ++
valadoc/doclets/gtkdoc/commentconverter.vala | 2 ++
4 files changed, 8 insertions(+)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 62fd66554..7ce434783 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1414,6 +1414,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
case CCodeUnaryOperator.POSTFIX_INCREMENT:
case CCodeUnaryOperator.POSTFIX_DECREMENT:
return false;
+ default:
+ break;
}
return is_constant_ccode_expression (cunary.inner);
} else if (cexpr is CCodeBinaryExpression) {
diff --git a/libvaladoc/gtkdocrenderer.vala b/libvaladoc/gtkdocrenderer.vala
index 6ffc80141..f1197eda1 100644
--- a/libvaladoc/gtkdocrenderer.vala
+++ b/libvaladoc/gtkdocrenderer.vala
@@ -300,6 +300,8 @@ public class Valadoc.GtkdocRenderer : ContentRenderer {
writer.start_tag ("blockquote");
tag = "blockquote";
break;
+ default:
+ break;
}
element.accept_children (this);
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 2614dad72..9216b1c16 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -1690,6 +1690,8 @@ public class Vala.Parser : CodeVisitor {
return true;
}
break;
+ default:
+ break;
}
rollback (begin);
diff --git a/valadoc/doclets/gtkdoc/commentconverter.vala b/valadoc/doclets/gtkdoc/commentconverter.vala
index be31313ff..a8b960e1b 100644
--- a/valadoc/doclets/gtkdoc/commentconverter.vala
+++ b/valadoc/doclets/gtkdoc/commentconverter.vala
@@ -219,6 +219,8 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
current_builder.append ("<code>");
tag = "code";
break;
+ default:
+ break;
}
run.accept_children (this);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]