← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH 4/4] Convert line endings in trace_helpers.{cpp, h} to Unix

 

Hi Jeff,

On 17.04.2018 15:33, Jeff Young wrote:

> Shall I merge these into 6.0?  (They aren’t required for 5.0 are they?)

IMO, these are trivial and should also go into 5.0. The code as is
compiles because gcc doesn't detect the error. MSVC encodes the type of
data objects and the return types of functions in the mangled symbol, so
mismatching declaration and definition cause undefined symbols there.

If you add one of the #include lines I've added without fixing the
surrounding code, it no longer compiles, even on gcc, which is a clear
sign of a bug. Especially in the second patch, where the discrepancy is
not just a missing "const", but the data object has a completely
different type, which would lead to a crash.

The extra constness is probably debatable, I've included that because
these would show up on the next /ANALYZE run as "could be made const".

Line endings should be consistent though, and having different line
endings in different branches will be really annoying in future merges.

   Simon

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References