[prev in list] [next in list] [prev in thread] [next in thread]
List: calligra-devel
Subject: Re: Review Request 124883: Fix compilation of PsCommentLexer.cpp on platforms where char is unsigned
From: "Boudewijn Rempt" <boud () valdyas ! org>
Date: 2015-08-26 7:11:37
Message-ID: 20150826071137.4103.29405 () mimi ! kde ! org
[Download RAW message or body]
--===============2191310490760328691==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124883/#review84385
-----------------------------------------------------------
Karbon is currently unmaintained, but your patch doesn't break the build for me, so \
I'm fine with it going in...
- Boudewijn Rempt
On Aug. 22, 2015, 7:53 p.m., Tom Hall wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124883/
> -----------------------------------------------------------
>
> (Updated Aug. 22, 2015, 7:53 p.m.)
>
>
> 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
>
>
--===============2191310490760328691==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/124883/">https://git.reviewboard.kde.org/r/124883/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Karbon is currently unmaintained, but your patch doesn't break the build \
for me, so I'm fine with it going in...</p></pre> <br />
<p>- Boudewijn Rempt</p>
<br />
<p>On August 22nd, 2015, 7:53 p.m. UTC, Tom Hall wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for Calligra.</div>
<div>By Tom Hall.</div>
<p style="color: grey;"><i>Updated Aug. 22, 2015, 7:53 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
calligra
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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:</p> <blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">"error: narrowing conversion of '-127' from 'int' to 'char' inside { } \
[-Wnarrowing]".</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>filters/karbon/eps/PsCommentLexer.cpp <span style="color: \
grey">(6487df6)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/124883/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============2191310490760328691==--
[Attachment #3 (text/plain)]
_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic