kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #16474
Re: broken code in pcbnew/dragsegm.cpp
Le 18/01/2015 21:26, Mark Roszko a écrit :
> I am going through static analyzer results.
>
> http://puu.sh/eHuN9/7eebd45887.png
>
> m_Flag is a bool.(I double checked the class defintion of the vector
> g_DragSegmentList which DRAG_SEGM_PICKER) The masking doesn't make sense at
> all.
>
>
> The same problem is visible in the function AddSegmentToDragList
>
> http://puu.sh/eHvAH/14e3818931.png
>
> where mFlag is again used on wrapper as a bitmask.
>
>
> I think the UndrawAndMarkSegmentsToDrag function was meant to be checking
> for the bit 0 and bit 1 flags that AddSegmentToDragList set but somehow
> ended up like this.
>
>
> Unfortunately I am not familar with pcbnew at all to know what it was
> intended to do 100% yet so I'm hoping someone else does.
>
Thanks.
This was a bug. m_Flag is used as int.
Fixed now, with a bit of code cleaning.
--
Jean-Pierre CHARRAS
Follow ups
References