eerimoq / detools

Binary delta encoding tools.
Other
157 stars 16 forks source link

Fix C library warning when neither of NONE and CRLE are in use #2

Closed rgilton closed 4 years ago

rgilton commented 4 years ago

When CRLE and NONE compressions are both disabled, the chunk_read function is unused, and so a compiler warning is generated. This patch prevents those functions from being defined in such conditions.

Sorry -- for some reason I didn't notice this on in my first pull request.

codecov[bot] commented 4 years ago

Codecov Report

Merging #2 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #2   +/-   ##
=======================================
  Coverage   93.56%   93.56%           
=======================================
  Files           5        5           
  Lines        1865     1865           
=======================================
  Hits         1745     1745           
  Misses        120      120
Impacted Files Coverage Δ
src/c/detools.c 92.63% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c825d30...1f03054. Read the comment docs.

eerimoq commented 4 years ago

You could add tests of more configurations here, just to ensure they will work in future releases:

https://github.com/eerimoq/detools/blob/master/Makefile#L50-L60