fix warning
This commit is contained in:
@@ -189,6 +189,7 @@ func (p *parser) newError(errMsg string) *ParseTypeError {
|
||||
return &ParseTypeError{QualType: p.s.Source(), ErrMsg: errMsg}
|
||||
}
|
||||
|
||||
// TODO(xsw): check expect results
|
||||
func (p *parser) expect(tokExp token.Token) error {
|
||||
p.next()
|
||||
if p.tok != tokExp {
|
||||
@@ -330,6 +331,7 @@ func (p *parser) parseFunc(pkg *types.Package, t types.Type, inFlags int) (ret t
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_ = inFlags
|
||||
return ctypes.NewFunc(types.NewTuple(args...), results, variadic), nil
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ func NewPointer(typ types.Type) types.Type {
|
||||
}
|
||||
case *types.Signature:
|
||||
if gogen.IsCSignature(t) {
|
||||
return types.NewSignature(nil, t.Params(), t.Results(), t.Variadic())
|
||||
return types.NewSignatureType(nil, nil, nil, t.Params(), t.Results(), t.Variadic())
|
||||
}
|
||||
case *types.Named:
|
||||
if typ == ValistTag {
|
||||
|
||||
Reference in New Issue
Block a user