[xsd-users] Regarding bugs - Type Mismatch: Signed to Unsigned

Boris Kolpackov boris at codesynthesis.com
Mon Oct 31 08:21:45 EDT 2022


Muralidhara B K <muralidhara.bk at microfocus.com> writes:

> As  part of static code analysis , bugs are reported against codes
> in codeSynthesis/xsd-4.0.0-i686-windows/libxsd/xsd/cxx/xml/char-utf8.txx.
> 
> Issue Type :  Type Mismatch: Signed to Unsigned
> 
> Issue are as  listed below,
> 
>   1.  The function in char-utf8.txx is declared to return an unsigned value, but on line 155 it returns a signed value. The function is declared to return an unsigned number but returns a signed value.
>   2.  The function in char-utf8.txx is declared to return an unsigned value, but on line 204 it returns a signed value. The function is declared to return an unsigned number but returns a signed value.
>   3.  The function in char-utf8.txx is declared to return an unsigned value, but on line 220 it returns a signed value. The function is declared to return an unsigned number but returns a signed value.
>   4.  The function in char-utf8.txx is declared to return an unsigned value, but on line 235 it returns a signed value. The function is declared to return an unsigned number but returns a signed value.
>   5.  The function in char-utf8.txx is declared to return an unsigned value, but on line 243 it returns a signed value. The function is declared to return an unsigned number but returns a signed value.
>   6.  The function in char-utf8.txx is declared to return an unsigned value, but on line 258 it returns a signed value. The function is declared to return an unsigned number but returns a signed value.
>   7.  The function in char-utf8.txx is declared to return an unsigned value, but on line 266 it returns a signed value. The function is declared to return an unsigned number but returns a signed value.
>   8.  The function in char-utf8.txx is declared to return an unsigned value, but on line 274 it returns a signed value. The function is declared to return an unsigned number but returns a signed value.

Firstly, there is no function return on these lines. Rather, it's
an assignment of char to unsigned char as part of the UTF8 sequence
analysis. These are not bugs but we can add explicit casts if that
helps.



More information about the xsd-users mailing list