Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on October 12, 2014, 10:54:51 am

Title: Do we need to fix this build warning in wxScintilla
Post by: ollydbg on October 12, 2014, 10:54:51 am
Code
[ 97.8%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -D__WX__ -DWINVER=0x0501 -DLINK_LEXERS -DSCI_LEXER -DWXMAKINGDLL_SCI -iquote.objs\include -I.objs\include -I. -IE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\include -IE:\code\wx-mingw-build-481-dw2\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Isdk\wxscintilla\src\scintilla\include -Isdk\wxscintilla\src\scintilla\src -Isdk\wxscintilla\src\scintilla\lexlib -c sdk\wxscintilla\src\ScintillaWX.cpp -o .objs\sdk\wxscintilla\src\ScintillaWX.o
sdk\wxscintilla\src\ScintillaWX.cpp: In member function 'virtual void ScintillaWX::Paste()':
sdk\wxscintilla\src\ScintillaWX.cpp:632:10: warning: variable 'haveTextString' set but not used [-Wunused-but-set-variable]

Any comments?
Title: Re:
Post by: MortenMacFly on October 12, 2014, 08:17:24 pm
I can't have a look at the moment but blindly I remember that in this method there are probably #defines for different platforms. So are you sure it's really unused?
Title: Re:
Post by: Jenna on October 12, 2014, 09:23:47 pm
I can't have a look at the moment but blindly I remember that in this method there are probably #defines for different platforms. So are you sure it's really unused?
Yes it is (unused).
It is set to true if there is rect-data or normal text, but never used later in the function.
The only distinction is done between rect-data and normal data.

It first appeared in the scintilla 3.5.0-branch in svn r9893 ("* prepare branch for merge to trunk") .
Title: Re:
Post by: MortenMacFly on October 12, 2014, 09:52:48 pm
Hmmm.... I can't remember what I had in mind with that... I'll have a look.