diff --git a/decode.go b/decode.go index b13ab9f..052ecfc 100644 --- a/decode.go +++ b/decode.go @@ -120,7 +120,6 @@ func (p *parser) parse() *node { default: panic("attempted to parse unknown event: " + strconv.Itoa(int(p.event.typ))) } - panic("unreachable") } func (p *parser) node(kind int) *node { diff --git a/emitterc.go b/emitterc.go index 2befd55..6ecdcb3 100644 --- a/emitterc.go +++ b/emitterc.go @@ -666,7 +666,6 @@ func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, return yaml_emitter_set_emitter_error(emitter, "expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS") } - return false } // Expect ALIAS. diff --git a/parserc.go b/parserc.go index 0a7037a..81d05df 100644 --- a/parserc.go +++ b/parserc.go @@ -166,7 +166,6 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool default: panic("invalid parser state") } - return false } // Parse the production: