> 8 - unsigned int nOffset = 1, frameType = 0, frameState = 0,
> frameActions = 0;
> 9 + unsigned int nOffset = 1, frameType, frameState, frameActions;
>
> Are these guaranteed to be assigned to something we know later in the
> function? If so, we can move them there and declare and assign them at the
> same time.
Hmm. It seems I made a mistake - Maybe cppcheck had a problem with the #ifdef.
But those variables are used only here in the function updateWindowProperties ():
...as those variables are not used anywhere else in this function and are always 0 anyway.
Unfortunately I am having problems convincing cmake and make to compile the KDE part of Compiz here to test it, but it *should* be okay. Please check the diff.
> 8 - unsigned int nOffset = 1, frameType = 0, frameState = 0,
> frameActions = 0;
> 9 + unsigned int nOffset = 1, frameType, frameState, frameActions;
>
> Are these guaranteed to be assigned to something we know later in the
> function? If so, we can move them there and declare and assign them at the
> same time.
Hmm. It seems I made a mistake - Maybe cppcheck had a problem with the #ifdef. perties ():
But those variables are used only here in the function updateWindowPro
#ifdef QT_45 quads_to_ property (data, nOffset - 1, mX11Pixmap,
decor_
&mBorder, &mBorder, &mBorder, &mBorder,
0, 0,
quads, nQuad, frameType, frameState, frameActions);
So theoretically we could remove the declaration of those variables completely and simplify this to:
#ifdef QT_45 quads_to_ property (data, nOffset - 1, mX11Pixmap,
decor_
&mBorder, &mBorder, &mBorder, &mBorder,
0, 0,
quads, nQuad, 0, 0, 0);
...as those variables are not used anywhere else in this function and are always 0 anyway.
Unfortunately I am having problems convincing cmake and make to compile the KDE part of Compiz here to test it, but it *should* be okay. Please check the diff.