Review Request 124883: Fix compilation on platforms where char is unsigned
Tom Hall
tahall256 at gmail.com
Sat Aug 22 20:48:23 BST 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124883/
-----------------------------------------------------------
Review request for Calligra.
Repository: calligra
Description
-------
The C standard defines char to be either signed char or unsigned char. In this case, the char is used to store negative values to signify categories of characters as well as actual characters. Therefore it must be a signed char and doesn't work on platforms where char is unsigned (e.g. ARM). In this specific case, compilation of the file fails with:
> "error: narrowing conversion of '-127' from 'int' to 'char' inside { } [-Wnarrowing]".
There may be similar issues elsewhere where the char isn't inside initialiser braces, so it compiles successfully, but silently truncates or wraps the negative values.
Diffs
-----
filters/karbon/eps/PsCommentLexer.cpp 6487df6
Diff: https://git.reviewboard.kde.org/r/124883/diff/
Testing
-------
Thanks,
Tom Hall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150822/24f9b11a/attachment.htm>
More information about the calligra-devel
mailing list