]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add explicit "default: break;" statements for coverage of enum-typed switch
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 31 Mar 2019 08:26:43 +0000 (10:26 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 31 Mar 2019 08:35:04 +0000 (10:35 +0200)
codegen/valaccodebasemodule.vala
libvaladoc/gtkdocrenderer.vala
vala/valaparser.vala
valadoc/doclets/gtkdoc/commentconverter.vala

index 62fd6655440fb1cc5249099786a6911482e37342..7ce4347833d6a5c604b442519d1e8296baaac2e6 100644 (file)
@@ -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) {
index 6ffc801418b9379b97848905766676f6e62fea9d..f1197eda11bcc98364a977d005ad3278a5c43eb7 100644 (file)
@@ -300,6 +300,8 @@ public class Valadoc.GtkdocRenderer : ContentRenderer {
                        writer.start_tag ("blockquote");
                        tag = "blockquote";
                        break;
+               default:
+                       break;
                }
 
                element.accept_children (this);
index 2614dad72f5a460d080a83660c981d0da5704bdf..9216b1c160996bc1f5570fd6179fdba9884115f5 100644 (file)
@@ -1690,6 +1690,8 @@ public class Vala.Parser : CodeVisitor {
                                return true;
                        }
                        break;
+               default:
+                       break;
                }
 
                rollback (begin);
index be31313ff6d52f4c0e48a7a6fb32268d541523d9..a8b960e1be058cc9f136f3b7cccecad89655e840 100644 (file)
@@ -219,6 +219,8 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
                        current_builder.append ("<code>");
                        tag = "code";
                        break;
+               default:
+                       break;
                }
                run.accept_children (this);