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>
This commit is contained in:
Changkun Ou 2022-02-21 14:58:38 +01:00 committed by Hyang-Ah Hana Kim
parent 858099ff78
commit 4f294b3ab5
2 changed files with 3 additions and 1 deletions

View File

@ -34,6 +34,7 @@ uint64 threadID() {
@implementation MobileGLView
- (void)prepareOpenGL {
[super prepareOpenGL];
[self setWantsBestResolutionOpenGLSurface:YES];
GLint swapInt = 1;

View File

@ -136,8 +136,9 @@ static void sendTouches(int change, NSSet* touches) {
@end
void runApp(void) {
char* argv[] = {};
@autoreleasepool {
UIApplicationMain(0, nil, nil, NSStringFromClass([GoAppAppDelegate class]));
UIApplicationMain(0, argv, nil, NSStringFromClass([GoAppAppDelegate class]));
}
}