diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-04-05 19:46:56 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-04-05 19:46:56 -0700 |
commit | e181b0717470194a853d5084f902fde539635822 (patch) | |
tree | 789f5dd541e9db2e084261e4ddb4ec7a98e8d50f /ffi.c | |
parent | 858ce927fc30d080793fffe42b0ce6fcddfbb3c5 (diff) | |
download | txr-e181b0717470194a853d5084f902fde539635822.tar.gz txr-e181b0717470194a853d5084f902fde539635822.tar.bz2 txr-e181b0717470194a853d5084f902fde539635822.zip |
warning cleanup: signed/unsigned in ternaries.
This is the third round of an effort to enable GCC's -Wextra
option. Instances of signed/unsigned mismatch between
the branches of ternary conditionals are addressed.
* ffi.c (pad_retval): Add cast into the consequent of
the conditional so it yields size_t, like the alternative.
* lib.c (split_str_keep): Likewise.
(vector): Cast -1 to ucnum so it has the same type as the
alloc_plus opposite to it.
* parser.c (lino_getch): Add a cast to wint_t to match
return value and opposite WEOF operand.
* stream.c (generic_get_line): Likewise.
* sysif.c (c_time): Convert both consequent and alternative
to time_t to silence warning.
Diffstat (limited to 'ffi.c')
-rw-r--r-- | ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -66,7 +66,7 @@ #define alignof(type) offsetof(struct {char x; type y;}, y) #define pad_retval(size) (!(size) || convert(size_t, size) > sizeof (ffi_arg) \ - ? (size) \ + ? (size_t) (size) \ : sizeof (ffi_arg)) #define min(a, b) ((a) < (b) ? (a) : (b)) |