mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Fix a collection of type / format string mismatches.
Ilya Shipitsin sent me a list of errors reported by a tool 'cppcheck', which I hadn't seen before, together with some fixes for things already taken off that list. This change picks out all the things from the remaining list that I could quickly identify as actual errors, which it turns out are all format-string goofs along the lines of using a %d with an unsigned int, or a %u with a signed int, or (in the cases in charset/utf8.c) an actual _size_ mismatch which could in principle have caused trouble on a big-endian target.
This commit is contained in:
@ -267,7 +267,7 @@ void utf8_read_test(int line, char *input, int inlen, ...)
|
||||
}
|
||||
if (l != str[i]) {
|
||||
printf("%d: char %d came out as %08x, should be %08x\n",
|
||||
line, i, str[i], l);
|
||||
line, i, str[i], (unsigned)l);
|
||||
total_errs++;
|
||||
}
|
||||
}
|
||||
@ -306,7 +306,7 @@ void utf8_write_test(int line, const long *input, int inlen, ...)
|
||||
}
|
||||
if (l != str[i]) {
|
||||
printf("%d: char %d came out as %08x, should be %08x\n",
|
||||
line, i, str[i], l);
|
||||
line, i, str[i], (unsigned)l);
|
||||
total_errs++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user