Compiler warnings in TechDraw

Discussions about the development of the TechDraw workbench
wmayer
Site Admin
Posts: 13282
Joined: Thu Feb 19, 2009 10:32 am

Compiler warnings in TechDraw

Postby wmayer » Fri Aug 17, 2018 7:38 am

Hi,

the travis build produces some warnings in the TechDraw code due to a self-assignment. The relevant part is:
/home/travis/build/FreeCAD/FreeCAD/src/Mod/TechDraw/Gui/QGIViewDimension.cpp:605:25: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]
tip = tip;
~~~ ^ ~~~
/home/travis/build/FreeCAD/FreeCAD/src/Mod/TechDraw/Gui/QGIViewDimension.cpp:606:25: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]
gap = gap;
~~~ ^ ~~~
/home/travis/build/FreeCAD/FreeCAD/src/Mod/TechDraw/Gui/QGIViewDimension.cpp:650:25: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]
tip = tip;
~~~ ^ ~~~
/home/travis/build/FreeCAD/FreeCAD/src/Mod/TechDraw/Gui/QGIViewDimension.cpp:651:25: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]
gap = gap;
~~~ ^ ~~~
/home/travis/build/FreeCAD/FreeCAD/src/Mod/TechDraw/Gui/QGIViewDimension.cpp:752:21: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]
tip = tip;
~~~ ^ ~~~
/home/travis/build/FreeCAD/FreeCAD/src/Mod/TechDraw/Gui/QGIViewDimension.cpp:753:21: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]
gap = gap;
~~~ ^ ~~~
6 warnings generated.
wandererfan
Posts: 2023
Joined: Tue Nov 06, 2012 5:42 pm

Re: Compiler warnings in TechDraw

Postby wandererfan » Fri Aug 17, 2018 1:03 pm

wmayer wrote:
Fri Aug 17, 2018 7:38 am
the travis build produces some warnings in the TechDraw code due to a self-assignment. The relevant part is:
Ok, thanks, I'll fix them.