-Wunused-but-set-variable warnings

Dawit A adawit at kde.org
Tue Jul 5 07:50:34 BST 2011


On Mon, Jul 4, 2011 at 2:07 PM, Albert Astals Cid <aacid at kde.org> wrote:
> A Monday, July 04, 2011, Dawit A va escriure:
>
>> The following files all contain set but unused variables:
>
>>
>
>> snip
>
>>
>
>> Unlike the -Wunused-parameter fixing this warning messages requires
>
>> context because the variable may be set and unused due to a mistake
>
>> that can potentially be causing a bug. As such can kdelibs cmake file
>
>> be changed to error out, -Werror=unused-but-set-variable, for such
>
>> warnings ?
>
> You really want to make kdelibs uncompilable?

Why would that make it uncompilable again ? I am not asking the change
to be done without first addressing the existing issues. That does not
make any sense. In fact, I went through and fixed almost all of the
-Wunused-paramter warnings, which I have yet to post for review.
However, I cannot do the same for this particular warning for the
reasons I already stated above. If I was going to do it, it would have
to be agreed that we will turn such warnings into errors going forward
or it would be a useless endavor since someone else down the line
would break it again!




More information about the kde-core-devel mailing list