aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/init-wstring.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-08wstring: extend is_string_type() to also detect wide stringsLuc Van Oostenryck1-1/+0
When evaluating initializers, it must be known if it is for a string or not. But sparse doesn't known about wide strings. Fix this by modifying is_string_type() to use is_wchar_type() in addition of is_byte_type(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-08wstring: add support for checking size in string initializerLuc Van Oostenryck1-0/+41
A warning is given for string initializers if the LHS array is not large enough to contains the string. But this check doesn't knowns about wide strings. Fix this by selecting the correct char type and use this type for the size calculations. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>