tezc / sc

Common libraries and data structures for C.
BSD 3-Clause "New" or "Revised" License
2.23k stars 239 forks source link

Fix minor issues in sc_array #82

Closed tezc closed 2 years ago

tezc commented 2 years ago

Fix minor issues in sc_array

Consider this usage: sc_array_del(arr, val++);

val will be incremented multiple time. Compilers (most if not all) will warn about this but looks like some people don't enable warnings :) Fixed the issue by pulling the variable to a local variable first.

codecov[bot] commented 2 years ago

Codecov Report

Merging #82 (3faf688) into master (020f6f7) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #82   +/-   ##
=======================================
  Coverage   99.81%   99.81%           
=======================================
  Files          21       21           
  Lines        2185     2185           
  Branches      382      382           
=======================================
  Hits         2181     2181           
  Partials        4        4           

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 020f6f7...3faf688. Read the comment docs.