View Issue Details

IDProjectCategoryView StatusLast Update
0002468FreeCADBugpublic2016-03-09 21:16
Reporterdcb Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version0.16 
Summary0002468: freecad-0.15.4671/src/Base/Handle.cpp:61: bad test ?
Descriptionfreecad-0.15.4671/src/Base/Handle.cpp:61:25: warning: ordered comparison of pointer with integer zero [-Wextra]

Source code is

   assert(_lRefCount > 0);

Maybe better code

   assert(_lRefCount != 0);
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2016-03-09 21:16

administrator   ~0006898

No, it must be: assert(*_lRefCount > 0);

In the past _lRefCount was an int but has been replaced later by an "QAtomicInt*" to make sure that it also with multiple threads without using a mutex.

Related Changesets

FreeCAD: master 3ca1ec2c

2016-03-09 22:13:05

wmayer

Details Diff
+ issue 0002468: freecad-0.15.4671/src/Base/Handle.cpp:61: bad test ? Affected Issues
0002468
mod - src/Base/Handle.cpp Diff File

Issue History

Date Modified Username Field Change
2016-03-08 20:59 dcb New Issue
2016-03-09 21:14 wmayer Changeset attached => FreeCAD Master master 3ca1ec2c
2016-03-09 21:16 wmayer Note Added: 0006898
2016-03-09 21:16 wmayer Status new => closed
2016-03-09 21:16 wmayer Assigned To => wmayer
2016-03-09 21:16 wmayer Resolution open => fixed
2016-03-09 21:16 wmayer Fixed in Version => 0.16