diff options
author | Paul Selkirk <paul@psgd.org> | 2017-10-11 17:32:33 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2017-10-11 17:36:00 -0400 |
commit | 4026cce22d330d3b9c4b218dd2e19d4f60412e05 (patch) | |
tree | 7f04989c6905f6b80b4d5d3cfe65a430f6b6ed2c /projects/libhal-test/printf.c | |
parent | c746ed393aff2a86a1f53e636d2530559be53d6f (diff) |
Cleanup: signed/unsigned mismatches, mostly in loop counters
Diffstat (limited to 'projects/libhal-test/printf.c')
-rw-r--r-- | projects/libhal-test/printf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/projects/libhal-test/printf.c b/projects/libhal-test/printf.c index 5a15d12..18feb8d 100644 --- a/projects/libhal-test/printf.c +++ b/projects/libhal-test/printf.c @@ -244,7 +244,7 @@ OK, I found my mistake. The math here is _always_ unsigned */ if (precision != 0)
{
width = max(width, precision);
- if (precision > strlen(where))
+ if (precision > strlen((const char *)where))
flags |= PR_LZ;
precision = 0;
}
@@ -295,7 +295,7 @@ EMIT2: if((flags & PR_LJ) == 0) count++;
}
/* emit string/char/converted number */
- for(int i = (flags & PR_WS) ? 1 : 0;
+ for(unsigned i = (flags & PR_WS) ? 1 : 0;
i < length; ++i)
{
fn(*where++, &ptr);
|