Skip to content

Remove warning, fix double free, bump version #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 4, 2014

Conversation

mattsta
Copy link
Contributor

@mattsta mattsta commented Apr 4, 2014

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

mattsta added 4 commits April 4, 2014 15:30
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:master Apr 4, 2014
@antirez
Copy link
Owner

antirez commented Apr 4, 2014

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
Contributor Author

mattsta commented Apr 4, 2014

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

Sign up for free to 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