You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/10/06 21:13:51 UTC

[GitHub] [zookeeper] ztzg opened a new pull request #1486: ZOOKEEPER-3954: C client: GCC 10 compilation fixes

ztzg opened a new pull request #1486:
URL: https://github.com/apache/zookeeper/pull/1486


   The most important change in this PR avoids a confusing and scary compilation issue [encountered by Michael Hudson-Doyle](https://issues.apache.org/jira/browse/ZOOKEEPER-3954) when building 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.
   
   That issue is easily "fixed" 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.
   
   The remaining changes get rid of a couple of innocuous warnings, to that the client can successfully build even when configured with `-Werror`.
   
   See also https://github.com/apache/zookeeper/pull/1481.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] symat closed pull request #1486: ZOOKEEPER-3954: C client: GCC 10 compilation fixes

Posted by GitBox <gi...@apache.org>.
symat closed pull request #1486:
URL: https://github.com/apache/zookeeper/pull/1486


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org