apache / arrow-nanoarrow

Helpers for Arrow C Data & Arrow C Stream interfaces
https://arrow.apache.org/nanoarrow
Apache License 2.0
169 stars 35 forks source link

chore: Enable more compiler warnings #351

Closed paleolimbot closed 9 months ago

paleolimbot commented 9 months ago

As noted in https://github.com/apache/arrow-nanoarrow/issues/224, we can use a format check attribute to ensure that format strings/types match and check that ArrowErrorCode is always checked.

While I was in it for compiler warnings, I enabled a few more that recently caused a problem in the Arrow R package.

To minimize impact on existing usage, these are only enabled when NANOARROW_DEBUG is defined (as it is for all CMake debug builds and in our CI).

codecov-commenter commented 9 months ago

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (34b0ca5) 88.04% compared to head (6f5ec81) 87.96%.

Files Patch % Lines
r/src/schema.c 80.00% 3 Missing :warning:
r/src/array.c 71.42% 2 Missing :warning:
r/src/as_array.c 88.23% 2 Missing :warning:
src/nanoarrow/schema.c 80.00% 2 Missing :warning:
r/src/materialize.c 75.00% 1 Missing :warning:
r/src/util.h 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #351 +/- ## ========================================== - Coverage 88.04% 87.96% -0.08% ========================================== Files 72 72 Lines 11711 11733 +22 ========================================== + Hits 10311 10321 +10 - Misses 1400 1412 +12 ```

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