Age | Commit message (Collapse) | Author |
|
The data in jis0208.h initializes a two-dimensional array, so insert the
missing braces to prevent a compiler warning about missing braces around
initializer.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Use `unsigned char *s` rather than `char *s`. First, this fixes compiler
warnings when these functions are called from utf8dec_wchar() passing
the `in` pointer of type `unsigned char *`.
Second, these functions are always called with characters >= 0x80 so the
sign bit is set. Shifting right a negative signed value will insert `1`
from the left side, so `foo >> 1` where foo is negative will always have
the sign bit set. So at least "case 2" would never return true.
There is a similar problem with tests like
(*(s+1) >= 0xA0) && (*(s+1) <= 0xBF)
This condition is always false with `char *s`.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
gcc suggests to set parentheses around '-'/'+' inside '<<' if the
corresponding warnings are enabled. Make the compiler happy and make
the code easier to understand for developers.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Perform an explicit cast to prevent the corresponding compiler warning.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
With gcc-14 warnings caused by type mismatches turn to errors:
- iconv_t is not a pointer type, convert the result directly to iconv_t
in combine_to_from()
- unsigned int is not the same as wchar_t, use temporary wchar_t wc as
an argument for utf8dec_wchar()
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
Missed in 5fdd379d9dbf8be74f2f1a0d33e62958e817ae7d.
|
|
|
|
|
|
A lot of packages use the same autoconf macro, fake EUC_JP to
succeed. Tested with wget,libcdio and gnupg.
|
|
To use it enable UCLIBC_HAS_LIBICONV, then iconv_open/iconv_close
should be available.
|