Skip to content

Commit 4f294b3

Browse files
changkunhyangah
authored andcommitted
app: resolve build warnings
iOS builders fail to build the mobile repository because of compile warnings. 1. "go build golang.org/x/mobile/app" can result in build error because of the warning "missing [super prepareOpenGL] call". 2. "null passed to a callee that requires a non-null argument" because argv is expected to not be a null argument. Resolve these warnings. Change-Id: I86130abc3a104be388475f5c316f5c3aef13aa92 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/387094 Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com> Trust: Hajime Hoshi <hajimehoshi@gmail.com> Run-TryBot: Changkun Ou <mail@changkun.de> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
1 parent 858099f commit 4f294b3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/darwin_desktop.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ @interface MobileGLView : NSOpenGLView<NSApplicationDelegate, NSWindowDelegate>
3434

3535
@implementation MobileGLView
3636
- (void)prepareOpenGL {
37+
[super prepareOpenGL];
3738
[self setWantsBestResolutionOpenGLSurface:YES];
3839
GLint swapInt = 1;
3940

app/darwin_ios.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ - (void)touchesCanceled:(NSSet*)touches withEvent:(UIEvent*)event {
136136
@end
137137

138138
void runApp(void) {
139+
char* argv[] = {};
139140
@autoreleasepool {
140-
UIApplicationMain(0, nil, nil, NSStringFromClass([GoAppAppDelegate class]));
141+
UIApplicationMain(0, argv, nil, NSStringFromClass([GoAppAppDelegate class]));
141142
}
142143
}
143144

0 commit comments

Comments
 (0)