signedness: Fix obvious sign problems

* These should be easily verified as correct.
* Tested on gcc-5.2.0 and clang-3.6.2
This commit is contained in:
Kyle Manna 2015-08-17 18:48:17 -07:00
parent 9fe7167920
commit 7d2e122f2f
2 changed files with 4 additions and 4 deletions

View file

@ -318,7 +318,7 @@ TEST(WireFormat, StructRoundTrip_OneSegmentPerAllocation) {
struct capn ctx2; struct capn ctx2;
memset(&ctx2, 0, sizeof(ctx2)); memset(&ctx2, 0, sizeof(ctx2));
for (int i = 0; i < sizeof(segments)/sizeof(segments[0]); i++) { for (size_t i = 0; i < sizeof(segments)/sizeof(segments[0]); i++) {
capn_append_segment(&ctx2, segments[i]); capn_append_segment(&ctx2, segments[i]);
} }
@ -374,7 +374,7 @@ TEST(WireFormat, StructRoundTrip_OneSegmentPerAllocation_NoTag) {
struct capn ctx2; struct capn ctx2;
memset(&ctx2, 0, sizeof(ctx2)); memset(&ctx2, 0, sizeof(ctx2));
for (int i = 0; i < sizeof(segments)/sizeof(segments[0]); i++) { for (size_t i = 0; i < sizeof(segments)/sizeof(segments[0]); i++) {
capn_append_segment(&ctx2, segments[i]); capn_append_segment(&ctx2, segments[i]);
} }
@ -424,7 +424,7 @@ TEST(WireFormat, StructRoundTrip_MultipleSegmentsWithMultipleAllocations) {
struct capn ctx2; struct capn ctx2;
memset(&ctx2, 0, sizeof(ctx2)); memset(&ctx2, 0, sizeof(ctx2));
for (int i = 0; i < sizeof(segments)/sizeof(segments[0]); i++) { for (size_t i = 0; i < sizeof(segments)/sizeof(segments[0]); i++) {
capn_append_segment(&ctx2, segments[i]); capn_append_segment(&ctx2, segments[i]);
} }

View file

@ -189,7 +189,7 @@ TEST(Schema, ReadSimple) {
struct CodeGeneratorRequest req; struct CodeGeneratorRequest req;
read_CodeGeneratorRequest(&req, root); read_CodeGeneratorRequest(&req, root);
for (size_t i = 0; i < req.nodes.p.len; i++) { for (int i = 0; i < req.nodes.p.len; i++) {
} }
} }