During pre publish tidy (#22), a lot of warnings were due to signed to unsigned conversion. This was due to many variables being int where their actual use was unsigned indexing. I started converting these as part of #22 but it became apparent that it would affect a lot of code, and the changes may have caused regressions.
Work to do:
- Re-enable
-Wsign-conversion in CompilerWarnings.cmake, replace ints with size_t and review with Arni to confirm no bad assumptions made (e.g. alleles are tracked with actual int as commonly tagged as -7).
- Also search for
static_cast and remove any unnecessary usage.
- Ensure the final commit has
-Wsign-conversion enabled so this is picked up in CI so issues don't creep back in.
During pre publish tidy (#22), a lot of warnings were due to signed to unsigned conversion. This was due to many variables being
intwhere their actual use was unsigned indexing. I started converting these as part of #22 but it became apparent that it would affect a lot of code, and the changes may have caused regressions.Work to do:
-Wsign-conversionin CompilerWarnings.cmake, replaceintswithsize_tand review with Arni to confirm no bad assumptions made (e.g. alleles are tracked with actualintas commonly tagged as-7).static_castand remove any unnecessary usage.-Wsign-conversionenabled so this is picked up in CI so issues don't creep back in.