diff options
author | Marek Vasut <marex@denx.de> | 2025-03-17 04:12:47 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-02 20:00:59 -0600 |
commit | 74eb84686f9600d5aeed001f913c1e8c91b1a4ca (patch) | |
tree | 8a34cdfbae403c824bd3dba8847e00e71872940d /tools/u_boot_pylib/command.py | |
parent | b86a651b646c0c676ab2746344edb2d7e5d81e98 (diff) |
fs: exfat: Fix conversion overflow errors
Fix the following conversion overflow errors. The UTF8-to-UTF16
conversion is done through 32bit wchar_t, but U-Boot codebase is
built with -fshort-wchar which limits wchar_t to 16bit. Replace
the built-in wchar_t with u32 to assure the intermediate type is
32bit.
"
fs/exfat/utf.c: In function ‘utf8_to_wchar’:
fs/exfat/utf.c:165:23: warning: overflow in conversion from ‘int’ to ‘wchar_t’ {aka ‘short unsigned int’} changes value from ‘(int)(short unsigned int)*input << 18 & 1835008’ to ‘0’ [-Woverflow]
165 | *wc = ((wchar_t) input[0] & 0x07) << 18;
| ^
fs/exfat/utf.c:170:23: warning: overflow in conversion from ‘int’ to ‘wchar_t’ {aka ‘short unsigned int’} changes value from ‘(int)(short unsigned int)*input << 24 & 50331648’ to ‘0’ [-Woverflow]
170 | *wc = ((wchar_t) input[0] & 0x03) << 24;
| ^
fs/exfat/utf.c:175:23: warning: overflow in conversion from ‘int’ to ‘wchar_t’ {aka ‘short unsigned int’} changes value from ‘(int)(short unsigned int)*input << 30 & 1073741824’ to ‘0’ [-Woverflow]
175 | *wc = ((wchar_t) input[0] & 0x01) << 30;
| ^
"
Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'tools/u_boot_pylib/command.py')
0 files changed, 0 insertions, 0 deletions