D28062: Fix compiler warnings

Vlad Zahorodnii <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.