提交 63861464 编写于 作者: C Chinmay Garde 提交者: GitHub

Update buildroot to account for stricter warning flags. (#3939)

上级 ca19ab0a
......@@ -75,7 +75,7 @@ allowed_hosts = [
]
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'b0b836db790abff26695a944224a4934480f2f48',
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'abb5036600abb462690f9f0091ec73b2d65fc337',
# Fuchsia compatibility
#
......
......@@ -244,7 +244,7 @@ class CustomTaskObserver : public fml::TaskObserver {
~CustomTaskObserver() override = default;
void DidProcessTask() {
void DidProcessTask() override {
if (lambda_) {
lambda_();
}
......
......@@ -85,7 +85,7 @@ std::vector<std::string> StringArrayToVector(JNIEnv* env, jobjectArray array) {
}
out.resize(length);
for (size_t i = 0; i < length; ++i) {
for (jsize i = 0; i < length; ++i) {
ScopedJavaLocalRef<jstring> java_string(
env, static_cast<jstring>(env->GetObjectArrayElement(array, i)));
out[i] = JavaStringToString(env, java_string.obj());
......
......@@ -83,7 +83,7 @@ static sk_sp<SkSurface> WrapOnscreenSurface(GrContext* context,
intptr_t fbo,
bool supports_srgb) {
const GrGLFramebufferInfo framebuffer_info = {
.fFBOID = fbo,
.fFBOID = static_cast<GrGLuint>(fbo),
};
const GrPixelConfig pixel_config =
......
......@@ -22,7 +22,7 @@ class AndroidSurfaceGL : public GPUSurfaceGLDelegate, public AndroidSurface {
~AndroidSurfaceGL() override;
bool IsValid() const;
bool IsValid() const override;
bool IsOffscreenContextValid() const;
......
......@@ -34,34 +34,34 @@ TEST(FlutterStandardCodec, CanEncodeAndDecodeNil) {
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeNSNull) {
char bytes[1] = {0x00};
uint8_t bytes[1] = {0x00};
checkEncodeDecode([NSNull null], [NSData dataWithBytes:bytes length:1]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeYes) {
char bytes[1] = {0x01};
uint8_t bytes[1] = {0x01};
checkEncodeDecode(@YES, [NSData dataWithBytes:bytes length:1]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeNo) {
char bytes[1] = {0x02};
uint8_t bytes[1] = {0x02};
checkEncodeDecode(@NO, [NSData dataWithBytes:bytes length:1]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeUInt8) {
char bytes[5] = {0x03, 0xfe, 0x00, 0x00, 0x00};
uint8_t bytes[5] = {0x03, 0xfe, 0x00, 0x00, 0x00};
UInt8 value = 0xfe;
checkEncodeDecode(@(value), [NSData dataWithBytes:bytes length:5]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeUInt16) {
char bytes[5] = {0x03, 0xdc, 0xfe, 0x00, 0x00};
uint8_t bytes[5] = {0x03, 0xdc, 0xfe, 0x00, 0x00};
UInt16 value = 0xfedc;
checkEncodeDecode(@(value), [NSData dataWithBytes:bytes length:5]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeUInt32) {
char bytes[9] = {0x04, 0x09, 0xba, 0xdc, 0xfe, 0x00, 0x00, 0x00, 0x00};
uint8_t bytes[9] = {0x04, 0x09, 0xba, 0xdc, 0xfe, 0x00, 0x00, 0x00, 0x00};
UInt32 value = 0xfedcba09;
checkEncodeDecode(@(value), [NSData dataWithBytes:bytes length:9]);
}
......@@ -75,24 +75,24 @@ TEST(FlutterStandardCodec, CanEncodeAndDecodeUInt64AsHexString) {
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeSInt8) {
char bytes[5] = {0x03, 0xfe, 0xff, 0xff, 0xff};
uint8_t bytes[5] = {0x03, 0xfe, 0xff, 0xff, 0xff};
SInt8 value = 0xfe;
checkEncodeDecode(@(value), [NSData dataWithBytes:bytes length:5]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeSInt16) {
char bytes[5] = {0x03, 0xdc, 0xfe, 0xff, 0xff};
uint8_t bytes[5] = {0x03, 0xdc, 0xfe, 0xff, 0xff};
SInt16 value = 0xfedc;
checkEncodeDecode(@(value), [NSData dataWithBytes:bytes length:5]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeSInt32) {
char bytes[5] = {0x03, 0x78, 0x56, 0x34, 0x12};
uint8_t bytes[5] = {0x03, 0x78, 0x56, 0x34, 0x12};
checkEncodeDecode(@(0x12345678), [NSData dataWithBytes:bytes length:5]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeSInt64) {
char bytes[9] = {0x04, 0xef, 0xcd, 0xab, 0x90, 0x78, 0x56, 0x34, 0x12};
uint8_t bytes[9] = {0x04, 0xef, 0xcd, 0xab, 0x90, 0x78, 0x56, 0x34, 0x12};
checkEncodeDecode(@(0x1234567890abcdef), [NSData dataWithBytes:bytes length:9]);
}
......@@ -103,27 +103,30 @@ TEST(FlutterStandardCodec, CanEncodeAndDecodeBigInteger) {
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeFloat32) {
char bytes[16] = {0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xfb, 0x21, 0x09, 0x40};
uint8_t bytes[16] = {0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x60, 0xfb, 0x21, 0x09, 0x40};
checkEncodeDecode(@3.1415927f, [NSData dataWithBytes:bytes length:16]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeFloat64) {
char bytes[16] = {0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x2d, 0x44, 0x54, 0xfb, 0x21, 0x09, 0x40};
uint8_t bytes[16] = {0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x18, 0x2d, 0x44, 0x54, 0xfb, 0x21, 0x09, 0x40};
checkEncodeDecode(@3.14159265358979311599796346854, [NSData dataWithBytes:bytes length:16]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeString) {
char bytes[13] = {0x07, 0x0b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64};
uint8_t bytes[13] = {0x07, 0x0b, 0x68, 0x65, 0x6c, 0x6c, 0x6f,
0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64};
checkEncodeDecode(@"hello world", [NSData dataWithBytes:bytes length:13]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeStringWithNonAsciiCodePoint) {
char bytes[7] = {0x07, 0x05, 0x68, 0xe2, 0x98, 0xba, 0x77};
uint8_t bytes[7] = {0x07, 0x05, 0x68, 0xe2, 0x98, 0xba, 0x77};
checkEncodeDecode(@"h\u263Aw", [NSData dataWithBytes:bytes length:7]);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeStringWithNonBMPCodePoint) {
char bytes[8] = {0x07, 0x06, 0x68, 0xf0, 0x9f, 0x98, 0x82, 0x77};
uint8_t bytes[8] = {0x07, 0x06, 0x68, 0xf0, 0x9f, 0x98, 0x82, 0x77};
checkEncodeDecode(@"h\U0001F602w", [NSData dataWithBytes:bytes length:8]);
}
......@@ -142,29 +145,29 @@ TEST(FlutterStandardCodec, CanEncodeAndDecodeDictionary) {
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeByteArray) {
char bytes[4] = {0xBA, 0x5E, 0xBA, 0x11};
uint8_t bytes[4] = {0xBA, 0x5E, 0xBA, 0x11};
NSData* data = [NSData dataWithBytes:bytes length:4];
FlutterStandardTypedData* value = [FlutterStandardTypedData typedDataWithBytes:data];
checkEncodeDecode(value);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeInt32Array) {
char bytes[8] = {0xBA, 0x5E, 0xBA, 0x11, 0xff, 0xff, 0xff, 0xff};
uint8_t bytes[8] = {0xBA, 0x5E, 0xBA, 0x11, 0xff, 0xff, 0xff, 0xff};
NSData* data = [NSData dataWithBytes:bytes length:8];
FlutterStandardTypedData* value = [FlutterStandardTypedData typedDataWithInt32:data];
checkEncodeDecode(value);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeInt64Array) {
char bytes[8] = {0xBA, 0x5E, 0xBA, 0x11, 0xff, 0xff, 0xff, 0xff};
uint8_t bytes[8] = {0xBA, 0x5E, 0xBA, 0x11, 0xff, 0xff, 0xff, 0xff};
NSData* data = [NSData dataWithBytes:bytes length:8];
FlutterStandardTypedData* value = [FlutterStandardTypedData typedDataWithInt64:data];
checkEncodeDecode(value);
}
TEST(FlutterStandardCodec, CanEncodeAndDecodeFloat64Array) {
char bytes[16] = {0xBA, 0x5E, 0xBA, 0x11, 0xff, 0xff, 0xff, 0xff,
0xBA, 0x5E, 0xBA, 0x11, 0xff, 0xff, 0xff, 0xff};
uint8_t bytes[16] = {0xBA, 0x5E, 0xBA, 0x11, 0xff, 0xff, 0xff, 0xff,
0xBA, 0x5E, 0xBA, 0x11, 0xff, 0xff, 0xff, 0xff};
NSData* data = [NSData dataWithBytes:bytes length:16];
FlutterStandardTypedData* value = [FlutterStandardTypedData typedDataWithFloat64:data];
checkEncodeDecode(value);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册