Просмотр исходного кода

Remove unreachable code to fix go vet (#249)

Morgan Jones 9 лет назад
Родитель
Сommit
cd8b52f826
3 измененных файлов с 0 добавлено и 3 удалено
  1. 0 1
      decode.go
  2. 0 1
      emitterc.go
  3. 0 1
      parserc.go

+ 0 - 1
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 {

+ 0 - 1
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.

+ 0 - 1
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: