From f49fabead47abb754f4bd301ef4bf3cb96820c03 Mon Sep 17 00:00:00 2001 From: Oleg Efimov Date: Tue, 6 Jan 2015 18:58:28 +0300 Subject: [PATCH] t: fix compile warnings about pointers of different types assignments warning: assigning to 'uint8_t *' (aka 'unsigned char *') from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] --- t/generated-code2/test-generated-code2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/generated-code2/test-generated-code2.c b/t/generated-code2/test-generated-code2.c index 1d7bc46..f2fda19 100644 --- a/t/generated-code2/test-generated-code2.c +++ b/t/generated-code2/test-generated-code2.c @@ -2002,7 +2002,7 @@ test_message_check(void) /* test with required_string not set */ m.required_string = NULL; m.required_msg = &sm; - m.required_bytes.data = str; m.required_bytes.len = 1; + m.required_bytes.data = (uint8_t *)str; m.required_bytes.len = 1; assert(0 == protobuf_c_message_check(&m.base)); /* test with required_msg not set */ @@ -2016,7 +2016,7 @@ test_message_check(void) assert(0 == protobuf_c_message_check(&m.base)); /* test with all required fields set */ - m.required_bytes.data = str; m.required_bytes.len = 1; + m.required_bytes.data = (uint8_t *)str; m.required_bytes.len = 1; assert(1 == protobuf_c_message_check(&m.base)); /* test with incomplete required submessage */ @@ -2041,7 +2041,7 @@ test_message_check(void) assert(0 == protobuf_c_message_check(&m.base)); /* test with correct optional bytes */ - m.optional_bytes.data = str; m.optional_bytes.len = 1; + m.optional_bytes.data = (uint8_t *)str; m.optional_bytes.len = 1; assert(1 == protobuf_c_message_check(&m.base)); /* test with repeated strings set incorrectly */ @@ -2076,7 +2076,7 @@ test_message_check(void) assert(0 == protobuf_c_message_check(&m.base)); /* test with repeated bytes set correctly */ - bd.data = str; + bd.data = (uint8_t *)str; assert(1 == protobuf_c_message_check(&m.base)); /* test with empty repeated string vector */