Skip to content

Remove warning, fix double free, bump version - #29

Merged
antirez merged 4 commits into
antirez:masterfrom
mattsta:fix-things-and-bump-version
Apr 4, 2014
Merged

Remove warning, fix double free, bump version#29
antirez merged 4 commits into
antirez:masterfrom
mattsta:fix-things-and-bump-version

Conversation

@mattsta

Copy link
Copy Markdown
Contributor

Four tiny fixes here:

  • remove a compile-time warning so we don't see it when building Redis
  • fix a double free (on error conditions)
  • refactor version checking to allow future versions to work too
  • bump version for easier inclusion in other projects

We don't need 'max' because 'idx' is monotonically increasing,
so when we exit the loop, 'idx' is 'max' by definition.
Removes compile-time warning of:
lua_cmsgpack.c: In function 'table_is_an_array':
lua_cmsgpack.c:370:21: warning: variable 'max' set but not used [-Wunused-but-set-variable]
long count = 0, max = 0, idx = 0;
^
(discovered by scan-build)
Use a more forgiving version comparison for the future.
This change future-proofs compatability against any potential
upcoming versions 503, 504, 601, .... (assuming these API changes
remain stable).
It's been two years since 0.3.0 and there have been a few
small changes since then (including 5.2 compat). Cutting
a new version allows other projects (and rocks) to pull
down additions easier.
Also adding a rockspec for 0.3.1 (tag 0.3.1 should be made
on the origin repo so rocks can pull properly).
antirez added a commit that referenced this pull request Apr 4, 2014
Remove warning, fix double free, bump version
@antirez
antirez merged commit f44f954 into antirez:masterApr 4, 2014
@antirez

Copy link
Copy Markdown
Owner

Thank you Matt 👍 , merged.

Please if you find more time to take care of lua-cmsgpack, try to look at #16. Thanks!

@mattsta

Copy link
Copy Markdown
ContributorAuthor

Thanks! I'll see what I can do about #16 now that I'm stuck in Lua mode for a while.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mattsta@antirez