-Wunused-but-set-variable warnings

Dawit A adawit at kde.org
Fri Aug 26 21:05:46 BST 2011


On Fri, Aug 26, 2011 at 11:25 AM, David Faure <faure at kde.org> wrote:
> On Monday 04 July 2011 12:02:47 Dawit A wrote:
>> The following files all contain set but unused variables:
>>
>> kdelibs/kdecore/io/kar.cpp:109:19: warning: variable ‘uid’ set but not
>> used [-Wunused-but-set-variable]
>> kdelibs/kdecore/io/kar.cpp:109:24: warning: variable ‘gid’ set but not
>> used [-Wunused-but-set-variable]
>
> Small bug (unimplemented feature; an empty uid/gid string is then passed to
> KArchiveFile below). Fixed.
>
>> kdelibs/kdeui/widgets/ktabwidget.cpp:336:15: warning: variable
>> ‘overlap’ set but not used [-Wunused-but-set-variable]
>
> Removed.
>
>> kdelibs/kded/kbuildsycoca.cpp:478:21: warning: variable
>> ‘servicetypeFactory’ set but not used [-Wunused-but-set-variable]
>> kdelibs/kded/kbuildsycoca.cpp:479:28: warning: variable
>> ‘mimeTypeFactory’ set but not used [-Wunused-but-set-variable]
>
> Removed.
>
>> kdelibs/kio/kio/connection.cpp:169:39: warning: variable ‘type’ set
>> but not used [-Wunused-but-set-variable]
>
> Looks like a real bug / half-finished feature. Thiago?

I discussed this one with Thiago a while back, but forgot to commit the fix:

[Thursday, June 30, 2011] [15:43:38] <adwa>     thiago: I am cleaning
up set-but-unused variable warnings in kdelibs and one such variable
is yours in kdelibs/kio/kio/connection.cpp under
SocketConnectionBackend::connectToRemote. Can we get rid of it or use
it in the connectToPath call ?
[Thursday, June 30, 2011] [15:44:53] <thiago>   adwa: let me look at the code
[Thursday, June 30, 2011] [15:45:39] <thiago>   adwa: hmm... we lost
abstract sockets when we switched to QLocalSocket
[Thursday, June 30, 2011] [15:45:57] <thiago>   adwa: so just comment
it out (#if 0), to be returned when QLocalSocket supports abstract
sockets again
[Thursday, June 30, 2011] [15:48:15] <adwa>     thiago: ok. thanks.

I will go ahead and do that before I forget it.




More information about the kde-core-devel mailing list