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

ZOOKEEPER-3954: C client: GCC 10 compilation fixes #1487

Closed

Commits on Oct 6, 2020

  1. ZOOKEEPER-3954: C client: Avoid compilation issue with aggressive inl…

    …ining
    
    Michael Hudson-Doyle experienced an error while compiling the C client
    with GCC 10 and aggressive optimization settings:
    
    > `free_auth_completions` is being inlined into `free_completions`,
    > and this lets gcc see that members of `a_list` are being accessed
    > without initialization
    
    This is (fortunately!) a red herring: what GCC doesn't see is that, in
    practice, `zoo_lock_auth` always returns zero, and that `a_list` is
    always initialized in the conditional block which follows it.
    
    Let's "fix" this by removing the `if`.  The rest of the client code
    doesn't check `zoo_lock_auth`'s return value--and we have bigger
    issues if unconditional locks start failing anyway.
    ztzg committed Oct 6, 2020
    Configuration menu
    Copy the full SHA
    9f87663 View commit details
    Browse the repository at this point in the history