openzim / libzim

Reference implementation of the ZIM specification
https://download.openzim.org/release/libzim/
GNU General Public License v2.0
164 stars 50 forks source link

Move to c++17 #819

Closed mgautierfr closed 11 months ago

mgautierfr commented 1 year ago

Fix #757

All our compilers should handle c++17. Let's move on.

This PR also (re)add werror=true and fix different warnings (raised differently by different compilers)

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 60.00% and project coverage change: +0.05% :tada:

Comparison is base (66b3b7f) 57.47% compared to head (51947a8) 57.53%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #819 +/- ## ========================================== + Coverage 57.47% 57.53% +0.05% ========================================== Files 98 98 Lines 4541 4540 -1 Branches 1910 1907 -3 ========================================== + Hits 2610 2612 +2 Misses 674 674 + Partials 1257 1254 -3 ``` | [Files Changed](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim) | Coverage Δ | | |---|---|---| | [include/zim/archive.h](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-aW5jbHVkZS96aW0vYXJjaGl2ZS5o) | `94.82% <ø> (ø)` | | | [src/cluster.cpp](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-c3JjL2NsdXN0ZXIuY3Bw) | `35.29% <ø> (+0.51%)` | :arrow_up: | | [src/fileimpl.cpp](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-c3JjL2ZpbGVpbXBsLmNwcA==) | `47.95% <ø> (ø)` | | | [src/tools.cpp](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-c3JjL3Rvb2xzLmNwcA==) | `53.65% <0.00%> (ø)` | | | [src/writer/contentProvider.cpp](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-c3JjL3dyaXRlci9jb250ZW50UHJvdmlkZXIuY3Bw) | `58.33% <0.00%> (ø)` | | | [include/zim/search\_iterator.h](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-aW5jbHVkZS96aW0vc2VhcmNoX2l0ZXJhdG9yLmg=) | `100.00% <100.00%> (ø)` | | | [include/zim/suggestion\_iterator.h](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-aW5jbHVkZS96aW0vc3VnZ2VzdGlvbl9pdGVyYXRvci5o) | `87.50% <100.00%> (ø)` | | | [src/writer/dirent.cpp](https://app.codecov.io/gh/openzim/libzim/pull/819?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim#diff-c3JjL3dyaXRlci9kaXJlbnQuY3Bw) | `60.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/openzim/libzim/pull/819/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openzim)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.