diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | lib.c | 4 | ||||
-rw-r--r-- | stream.c | 2 |
3 files changed, 14 insertions, 3 deletions
@@ -1,5 +1,16 @@ 2009-11-23 Kaz Kylheku <kkylheku@gmail.com> + Follow up on 64 bit compilation warnings. + + * lib.c (chr, chrp): Do not convert directly between wchar_t and + the pointer type; go through cnum intermediate value. + + * stream.c (vformat): Fix bad cast from pointer to int; this was + missed in the conversion to cnum because it should have been a + cast to long originally. + +2009-11-23 Kaz Kylheku <kkylheku@gmail.com> + * Makefile (conftest.o): revert change that took CFLAGS from this target. @@ -1015,7 +1015,7 @@ val string_lt(val astr, val bstr) val chr(wchar_t ch) { - return (val) ((ch << TAG_SHIFT) | TAG_CHR); + return (val) (((cnum) ch << TAG_SHIFT) | TAG_CHR); } val chrp(val chr) @@ -1027,7 +1027,7 @@ wchar_t c_chr(val chr) { if (!is_chr(chr)) type_mismatch(lit("~s is not a character"), chr, nao); - return ((wchar_t) chr) >> TAG_SHIFT; + return (wchar_t) ((cnum) chr >> TAG_SHIFT); } val chr_str(val str, val index) @@ -879,7 +879,7 @@ val vformat(val stream, val fmtstr, va_list vl) continue; case 'p': ptr = va_arg(vl, void *); - value = (int) ptr; + value = (cnum) ptr; strcpy(num_buf, "0x"); sprintf(num_buf + 2, num_fmt->hex, value); goto output_num; |