mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
756 stars 138 forks source link

FIx unitialized variable #128

Closed jschueller closed 3 years ago

codecov[bot] commented 3 years ago

Codecov Report

Merging #128 into master will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #128   +/-   ##
=======================================
  Coverage   94.37%   94.38%           
=======================================
  Files           3        3           
  Lines        3060     3064    +4     
=======================================
+ Hits         2888     2892    +4     
  Misses        172      172           
Impacted Files Coverage Δ
src/md4c.c 94.29% <100.00%> (+<0.01%) :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 440ccd8...e6a9892. Read the comment docs.

mity commented 3 years ago

Thanks for it but I believe all those variables actually are initialized. Check the MD_CHECK macro and its use in those functions. So I don't currently see any reason for merging this PR, at least in its current state.

That said, however, your PR points a finger to a real problem: In retrospect, I agree the code may be confusing as it is now and it should be fixed. I would say, we likely should get rid of that macro and do simply what it does manually at each call site, to improve the readability of the code.

jschueller commented 3 years ago

Its mainly to silence the warning, I dont think there's anythong wrong, but it doesnt hurt.