diff options
author | Dave Beckett <dave@dajobe.org> | 2011-08-31 21:34:59 -0700 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2011-08-31 21:34:59 -0700 |
commit | 240a56453d75494cd2106354b30052180df2702f (patch) | |
tree | 02e98504fb6331b4925f3307443085f67dc34724 /src/raptor_nfc_test.c | |
parent | 7b9e3df4b43698abd33cbda6b9baa174dcec488c (diff) | |
download | raptor-240a56453d75494cd2106354b30052180df2702f.tar.gz |
Add more RAPTOR_GOOD_CAST and RAPTOR_BAD_CAST and fix some.
Diffstat (limited to 'src/raptor_nfc_test.c')
-rw-r--r-- | src/raptor_nfc_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raptor_nfc_test.c b/src/raptor_nfc_test.c index 81508586..3c9b024a 100644 --- a/src/raptor_nfc_test.c +++ b/src/raptor_nfc_test.c @@ -96,7 +96,7 @@ decode_to_utf8(unsigned char *utf8_string, size_t utf8_string_length, u += raptor_unicode_utf8_string_put_char(c, u, (end-p)); - if((u-utf8_string) > (int)utf8_string_length) { + if((u-utf8_string) > RAPTOR_GOOD_CAST(int, utf8_string_length)) { fprintf(stderr, "decode_to_utf8 overwote utf8_string buffer at byte %d\n", (u-utf8_string)); @@ -125,7 +125,7 @@ utf8_print(const unsigned char *input, int length, FILE *stream) return; if(i) fputc(' ', stream); - fprintf(stream, "U+%04X", (int)c); + fprintf(stream, "U+%04X", RAPTOR_GOOD_CAST(int, c)); input += size; i += size; } |