News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Do we need to fix this build warning in wxScintilla

Started by ollydbg, October 12, 2014, 10:54:51 AM

Previous topic - Next topic

ollydbg


[ 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?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

MortenMacFly

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?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: 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?
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") .

MortenMacFly

Hmmm.... I can't remember what I had in mind with that... I'll have a look.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]