bind: fix compiler warnings
CL 29298 got rid of error type wrappers, but failed to update a variable type accordingly. Exposed by CL 31517 that enables -Werror. Change-Id: I2c2b75dcd43b89ffa7fb008150b1aee09ec25229 Reviewed-on: https://go-review.googlesource.com/31518 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
2ea7e2cc92
commit
7f64fd241f
|
@ -926,7 +926,7 @@ func (g *ObjcGen) genInterfaceMethodProxy(obj *types.TypeName, m *types.Func) {
|
|||
var rets []string
|
||||
for i, p := range s.retParams {
|
||||
if isErrorType(p.typ) {
|
||||
g.Printf("id<GoUniverseerror> _%s = nil;\n", p.name)
|
||||
g.Printf("NSError *_%s = nil;\n", p.name)
|
||||
if i == len(s.retParams)-1 { // last param.
|
||||
g.Printf("if (!returnVal) {\n")
|
||||
} else {
|
||||
|
|
|
@ -163,7 +163,7 @@ func (g *ObjcWrapper) genCFuncBody(n *objc.Named, f *objc.Func, super bool) {
|
|||
}
|
||||
g.Printf(");\n")
|
||||
if errParam != nil {
|
||||
g.Printf("id<GoUniverseerror> _%s = nil;\n", errParam.Name)
|
||||
g.Printf("NSError *_%s = nil;\n", errParam.Name)
|
||||
if f.Ret != nil {
|
||||
g.Printf("if (!res && %s != nil) {\n", errParam.Name)
|
||||
} else {
|
||||
|
|
|
@ -232,7 +232,7 @@ int32_t cproxyinterfaces_Error_Err(int32_t refnum) {
|
|||
GoInterfacesError* o = go_seq_objc_from_refnum(refnum);
|
||||
NSError* error = nil;
|
||||
BOOL returnVal = [o err:&error];
|
||||
id<GoUniverseerror> _error = nil;
|
||||
NSError *_error = nil;
|
||||
if (!returnVal) {
|
||||
_error = error;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ struct cproxyissue12403_Parsable_ToJSON_return cproxyissue12403_Parsable_ToJSON(
|
|||
NSError* error = nil;
|
||||
BOOL returnVal = [o toJSON:&ret0_ error:&error];
|
||||
nstring _ret0_ = go_seq_from_objc_string(ret0_);
|
||||
id<GoUniverseerror> _error = nil;
|
||||
NSError *_error = nil;
|
||||
if (!returnVal) {
|
||||
_error = error;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue