Feature #236

Remove warnings

Added by Massimo Del Fedele over 12 years ago. Updated about 12 years ago.

Status:ApprovedStart date:01/19/2012
Priority:ImmediateDue date:
Assignee:Massimo Del Fedele% Done:

100%

Category:GeneralSpent time:-
Target version:-

Description

Rebuilding Upp there are many warnings, most about variables deined/set but not used.
I'll drop a cathegoryzed list here :

[code]
VARIABLE SET BUT NOT USED :
uppsrc/CtrlLib/LabelBase.cpp:529:11: warning: variable ‘wa’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlLib/EditField.cpp:384:11: warning: variable ‘fi’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlLib/RichTextView.cpp:38:6: warning: variable ‘y’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlLib/DateTimeCtrl.cpp:1440:7: warning: variable ‘sz’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlLib/TabCtrl.cpp:132:7: warning: variable ‘sz’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlLib/TabCtrl.cpp:177:7: warning: variable ‘chsz’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlLib/TreeCtrl.cpp:1040:8: warning: variable ‘r’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlLib/DlgColor.cpp:346:8: warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlLib/DlgColor.cpp:472:7: warning: variable ‘rcsize’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlCore/CtrlClip.cpp:139:8: warning: variable ‘ssz’ set but not used [-Wunused-but-set-variable]
uppsrc/CtrlCore/ParseRTF.cpp:358:12: warning: variable ‘tbl_co’ set but not used [-Wunused-but-set-variable]
uppsrc/Core/Path.cpp:726:7: warning: variable ‘quote’ set but not used [-Wunused-but-set-variable]
uppsrc/Painter/DrawOp.cpp:79:8: warning: variable ‘sz’ set but not used [-Wunused-but-set-variable]
uppsrc/Painter/Approximate.cpp:56:12: warning: variable ‘p14’ set but not used [-Wunused-but-set-variable]
uppsrc/Painter/Mask.cpp:44:9: warning: variable ‘full’ set but not used [-Wunused-but-set-variable]
uppsrc/Draw/ImageOp.cpp:713:8: warning: variable ‘center’ set but not used [-Wunused-but-set-variable]
uppsrc/Draw/ImageOp.cpp:721:9: warning: variable ‘dcenterf’ set but not used [-Wunused-but-set-variable]
uppsrc/Draw/ImageOp.cpp:722:8: warning: variable ‘dcenter’ set but not used [-Wunused-but-set-variable]
uppsrc/RichText/TablePaint.cpp:155:14: warning: variable ‘_pi’ set but not used [-Wunused-but-set-variable]
uppsrc/RichText/TablePaint.cpp:111:8: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]

UNUSED VARIABLES :
uppsrc/CtrlLib/ArrayCtrl.cpp:2882:7: warning: unused variable ‘focusCursor’ [-Wunused-variable]
uppsrc/CtrlCore/ParseRTF.cpp:253:8: warning: unused variable ‘pos’ [-Wunused-variable]
uppsrc/Core/Path.cpp:1049:7: warning: unused variable ‘ret’ [-Wunused-variable]
uppsrc/Draw/FontCR.cpp:286:8: warning: unused variable ‘tl’ [-Wunused-variable]
uppsrc/Draw/FontCR.cpp:287:8: warning: unused variable ‘th’ [-Wunused-variable]
uppsrc/Draw/FontFc.cpp:32:9: warning: unused variable ‘sina’ [-Wunused-variable]
uppsrc/Draw/FontFc.cpp:32:15: warning: unused variable ‘cosa’ [-Wunused-variable]
uppsrc/Draw/FontFc.cpp:53:11: warning: unused variable ‘id’ [-Wunused-variable]
uppsrc/RichText/TxtPaint.cpp:125:6: warning: unused variable ‘t’ [-Wunused-variable]

USING UNINITIALIZED VARIABLE
uppsrc/CtrlCore/X11DnD.cpp:117:64: warning: ‘version’ may be used uninitialized in this function [-Wuninitialized]

UNUSED FUNCTIONS
uppsrc/CtrlLib/ArrayCtrl.cpp:75:13: warning: ‘void Upp::sPerformSimple(int, Upp::One<Upp::Ctrl>&, Upp::Callback1<Upp::One<Upp::Ctrl>&>)’ defined but not used [-Wunused-function]
uppsrc/Core/Log.cpp:255:13: warning: ‘void Upp::sLarge(Upp::String&, size_t*, int, const char*)’ defined but not used [-Wunused-function]

CONSTRUCTION ORDER MISMATCH
uppsrc/CtrlCore/ParseRTF.cpp:104:8: warning: ‘Upp::Rect Upp::RTFParser::CellInfo::cellmarginunits’ [-Wreorder]
uppsrc/CtrlCore/ParseRTF.cpp:185:1: warning: when initialized here [-Wreorder]
uppsrc/CtrlCore/ParseRTF.cpp: In constructor ‘Upp::RTFParser::Cell::Cell()’:
uppsrc/CtrlCore/ParseRTF.cpp:119:8: warning: ‘Upp::RTFParser::Cell::span’ will be initialized after [-Wreorder]
uppsrc/CtrlCore/ParseRTF.cpp:116:8: warning: ‘bool Upp::RTFParser::Cell::merge_first’ [-Wreorder]
uppsrc/CtrlCore/ParseRTF.cpp:194:1: warning: when initialized here [-Wreorder]

SIGNED/UNSIGNED COMPARAISON
uppsrc/Core/Algo.h:200:3: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
uppsrc/Core/BlockStream.cpp:412:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[/code]

History

#1 Updated by Miroslav Fidler over 12 years ago

  • Priority changed from Normal to Immediate

#2 Updated by Miroslav Fidler over 12 years ago

  • Tracker changed from Task to Feature
  • Assignee changed from Miroslav Fidler to Massimo Del Fedele

#3 Updated by Miroslav Fidler over 12 years ago

  • Status changed from New to Ready for QA

#4 Updated by Massimo Del Fedele about 12 years ago

  • Status changed from Ready for QA to Approved
  • % Done changed from 0 to 100

Almost perfect now... stil many warnings in plugins packages, but I guess those are from imported libraries so we shouldn't fix them.

Max

Also available in: Atom PDF