Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.24
-
Ubuntu clang version 3.6.0-2ubuntu1~trusty1 with -Wpointer-bool-conversion
Description
MariaDB 10.0 triggers Clang 3.6's -Wpointer-bool-conversion warnings. These warnings trigger when a pointer which the compiler knows cannot be null is converted to a bool (e.g. in a comparison). These mostly arise from statically or stack-allocated arrays or structures, but may also be triggered by _attribute_((nonnull)) on functions.
The attached patch cleans up these issues in the client, server, and InnoDB — mostly by removing or adjusting the comparison — so that they compile successfully with -Werror=pointer-bool-conversion.
Thanks,
— David