D28062: Fix compiler warnings
Vlad Zahorodnii
noreply at phabricator.kde.org
Mon Mar 16 15:22:24 GMT 2020
zzag added a comment.
Perhaps it would be worth to split this patch because it fixes a lot of issues. Overall, +1.
INLINE COMMENTS
> screenshot.cpp:671
> for (int y = 0; y < h; y++) {
> - uint *q = (uint*)img.scanLine(y);
> + uint *q = (uint*) (img.scanLine(y));
> for (int x = 0; x < w; ++x) {
Looks like you forgot to add reinterpret_cast.
> apol wrote in screenshot.cpp:661
> The warning is:
> `kwin/effects/screenshot/screenshot.cpp:671:23: warning: cast from 'uchar *' (aka 'unsigned char *') to 'uint *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]`
Coding style nitpick: add whitespace before `*`.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D28062
To: apol, #kwin
Cc: zzag, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200316/4ce654ff/attachment-0001.html>
More information about the kwin
mailing list