summaryrefslogtreecommitdiff
path: root/tests.c
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-06-20 22:44:30 -0700
committerJoshua Haberman <joshua@reverberate.org>2009-06-20 22:51:05 -0700
commit2bb7637797276287eb1823d644689dc0858bb48b (patch)
treee19f561b52d9e8a334a58ff4f397d28757057a77 /tests.c
parent79d57263f59835277c2a9d855e69bf03c7ada506 (diff)
Fixed conversion warning in tests.c.
Diffstat (limited to 'tests.c')
-rw-r--r--tests.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests.c b/tests.c
index c29c9a0..854dbf1 100644
--- a/tests.c
+++ b/tests.c
@@ -8,7 +8,7 @@ void test_get_v_uint64_t()
upb_status_t status;
uint8_t zero[] = {0x00};
- uint8_t *zero_buf = zero;
+ void *zero_buf = zero;
uint64_t zero_val = 0;
status = get_v_uint64_t(&zero_buf, &zero_val);
assert(status == UPB_STATUS_OK);
@@ -16,28 +16,28 @@ void test_get_v_uint64_t()
assert(zero_buf == zero + sizeof(zero));
uint8_t one[] = {0x01};
- uint8_t *one_buf = one;
+ void *one_buf = one;
uint64_t one_val = 0;
status = get_v_uint64_t(&one_buf, &one_val);
assert(status == UPB_STATUS_OK);
assert(one_val == 1);
uint8_t twobyte[] = {0xAC, 0x02};
- uint8_t *twobyte_buf = twobyte;
+ void *twobyte_buf = twobyte;
uint64_t twobyte_val = 0;
status = get_v_uint64_t(&twobyte_buf, &twobyte_val);
assert(status == UPB_STATUS_OK);
assert(twobyte_val == 300);
uint8_t tenbyte[] = {0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x7F};
- uint8_t *tenbyte_buf = tenbyte;
+ void *tenbyte_buf = tenbyte;
uint64_t tenbyte_val = 0;
status = get_v_uint64_t(&tenbyte_buf, &tenbyte_val);
assert(status == UPB_STATUS_OK);
assert(tenbyte_val == 0x89101c305080c101);
uint8_t elevenbyte[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01};
- uint8_t *elevenbyte_buf = elevenbyte;
+ void *elevenbyte_buf = elevenbyte;
uint64_t elevenbyte_val = 0;
status = get_v_uint64_t(&elevenbyte_buf, &elevenbyte_val);
assert(status == UPB_ERROR_UNTERMINATED_VARINT);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback