Skip to content
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

Fix technical UB + compiler warnings #549

Closed
wants to merge 1 commit into from

Commits on Aug 11, 2021

  1. Fix technical UB + compiler warnings

    Summary:
    * XXH*_update functions technically have UB on pointer arithmetic
    beyond the bounds of the input object, which can trigger a compiler
    warning in the case of statically sized input buffer. This can be
    solved with cast to uintptr_t where available. (In theory if your
    buffer is close to an extreme of your address space, it could still
    over/underflow, but eh.)
    
    * typedef XXH_endianess in implementation is unused, so removed.
    (When it was in xxhash.c it would cause compiler warning.)
    
    Test Plan: existing tests
    pdillinger committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    4d6083b View commit details
    Browse the repository at this point in the history