[Kicad-developers] Issues with clang-format

2020-01-11 Thread Brian Piccioni
I know this isn't a "help me program" mailing list but given the number of formatting issues which I have caused in my merge requests I figure it would be better if I could get this solved. I am on Msys64 on Windows 10 platform I followed the instructions herehttps://docs.kicad-pcb.org/doxyg

[Kicad-developers] Clipper issue

2020-01-11 Thread Jeff Young
Could someone familiar with Clipper have a look at this one: https://scan8.coverity.com/reports.htm#v33181/p10844/fileInstanceId=29818824&defectInstanceId=10144638&mergedDefectId=102371

Re: [Kicad-developers] Markdown issue

2020-01-11 Thread Jeff Young
There’s also this one in Markdown: https://scan8.coverity.com/reports.htm#v33181/p10844/fileInstanceId=29813788&defectInstanceId=10144552&mergedDefectId=125666 > On 11 Jan 2020, at 20:32, Jeff Young wrote: > > Could someone familiar with Clipper have a look at this one: > > https://scan8.cover

[Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread Jeff Young
This looks safe enough: if( n_changed ) wxLogTrace( "CN", "Cluster %p : net : %d %s\n", cluster.get(), cluster->OriginNet(), (const char*) cluster->OriginNetName().c_str() ); else wxLogTrace( "CN", "Cluster %p : nothing to propagate\n", cluster.get() ); Sadly, the macro wxLog

Re: [Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread Ian McInerney
In this case we should just need to clarify the scope (which I just pushed a fix doing). In general... I am not as sure about. -Ian On Sat, Jan 11, 2020 at 9:28 PM Jeff Young wrote: > This looks safe enough: > > if( n_changed ) > wxLogTrace( "CN", "Cluster %p : net : %d %s\n", cluster.get()

Re: [Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread seth
I suppose that we could update our coding policy to require braces even for single line statements.-SethOn Jan 11, 2020 1:28 PM, Jeff Young wrote:This looks safe enough:if( n_changed )wxLogTrace( "CN", "Cluster %p : net : %d %s\n", cluster.get(),cluster->OriginNet(), (const char*)

Re: [Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread Ian McInerney
That is probably the best option, since many things in wxWidgets are implemented as macros but masquerade as functions. -Ian On Sat, Jan 11, 2020 at 10:07 PM wrote: > I suppose that we could update our coding policy to require braces even > for single line statements. > > -Seth > > On Jan 11, 2

Re: [Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread Wayne Stambaugh
I agree that adding the curly brackets would be the best option as well. It's less than ideal but it resolves the issue. On 1/11/20 6:21 PM, Ian McInerney wrote: > That is probably the best option, since many things in wxWidgets are > implemented as macros but masquerade as functions. > > -Ian >

Re: [Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread Jeff Young
Sure, but unless we go with Seth’s option, then it’s just going to happen again…. > On 11 Jan 2020, at 23:28, Wayne Stambaugh wrote: > > I agree that adding the curly brackets would be the best option as well. > It's less than ideal but it resolves the issue. > > On 1/11/20 6:21 PM, Ian McIner

Re: [Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread Jeff Young
We could also just require them on if/then/else statements…. > On 12 Jan 2020, at 00:35, Jeff Young wrote: > > Sure, but unless we go with Seth’s option, then it’s just going to happen > again…. > >> On 11 Jan 2020, at 23:28, Wayne Stambaugh > > wrote: >> >> I agr

Re: [Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread Ian McInerney
I thought that Wayne was agreeing with requiring them on all lengths of statements (single line). Although, now that I look at the code closer, I don't know if this is as dire a problem. While it is a macro, it is defined like this: #define wxLogTrace \ if ( !wxLog::IsLevelEnabled(w

Re: [Kicad-developers] Coverity finds an ugly bug in wxWidgets

2020-01-11 Thread Bevan Weiss
Is there any harm in having braces for each if / else / for / while statement (regardless of if it’s single line or not)? There is the possibility of harm in not doing it, so it seems that adding it to the code style rules, would be prudent. That Coverity is throwing a positive at this impli

[Kicad-developers] pns coverity issues

2020-01-11 Thread Mark Roszko
https://scan8.coverity.com/reports.htm#v22582/p10844/fileInstanceId=29833683&defectInstanceId=10148075&mergedDefectId=280285 467if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) 468{ 469s1opt = SEG( s1.A, ip ); 470s2opt