-Wunused-but-set-variable warnings
Dawit A
adawit at kde.org
Tue Jul 5 07:22:45 BST 2011
On Mon, Jul 4, 2011 at 5:05 PM, Matthias Fuchs <mat69 at gmx.net> wrote:
> Am Montag 04 Juli 2011, 20:07:20 schrieb Albert Astals Cid:
>> 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?
>>
>> Albert
>
> Indeed. IIRC in some cases the public API has unused members. Removing them
> could lead to ABI problems.
I was not talking about unused members, but unused-but-set variables.
There is a difference. Most importantly though the compiler does not
throw any warnings for public member variables. I know cause I do not
get any such warnings for one of the classes I wrote eons ago,
KIO::Auth.
More information about the kde-core-devel
mailing list