From d7863b7424b1be5da33e9d632365f3e2c0538461 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Thu, 28 Jul 2011 15:38:05 +0000 Subject: iter git-svn-id: https://svn.kapsi.fi/jpa/nanopb@948 e3a754e5-d11d-0410-8d38-ebb782a927b9 --- tests/test_decode1.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/test_decode1.c b/tests/test_decode1.c index 4e0d7117..a507b0dc 100644 --- a/tests/test_decode1.c +++ b/tests/test_decode1.c @@ -37,8 +37,8 @@ const pb_field_t Person_PhoneNumber_fields[] = { membersize(Person_PhoneNumber, number), 0, 0}, {2, PB_HTYPE_OPTIONAL | PB_LTYPE_VARINT, - offsetof(Person_PhoneNumber, type), - offsetof(Person_PhoneNumber, has_type), + offsetof(Person_PhoneNumber, type) - offsetof(Person_PhoneNumber, number), + (int)offsetof(Person_PhoneNumber, has_type) - (int)offsetof(Person_PhoneNumber, type), membersize(Person_PhoneNumber, type), 0, &Person_PhoneType_type_default}, @@ -51,17 +51,17 @@ const pb_field_t Person_fields[] = { membersize(Person, name), 0, 0}, {2, PB_HTYPE_REQUIRED | PB_LTYPE_VARINT, - offsetof(Person, id), 0, + offsetof(Person, id) - offsetof(Person, name), 0, membersize(Person, id), 0, 0}, {3, PB_HTYPE_OPTIONAL | PB_LTYPE_STRING, - offsetof(Person, email), - offsetof(Person, has_email), + offsetof(Person, email) - offsetof(Person, id), + (int)offsetof(Person, has_email) - (int)offsetof(Person, email), membersize(Person, email), 0, 0}, {4, PB_HTYPE_ARRAY | PB_LTYPE_SUBMESSAGE, - offsetof(Person, phone), - offsetof(Person, phone_size), + offsetof(Person, phone) - offsetof(Person, email), + (int)offsetof(Person, phone_size) - (int)offsetof(Person, phone), membersize(Person, phone[0]), membersize(Person, phone) / membersize(Person, phone[0]), Person_PhoneNumber_fields}, -- cgit 1.2.3-korg