tinybox icon indicating copy to clipboard operation
tinybox copied to clipboard

Fails to build with Clang due to -Werror

Open jbeich opened this issue 4 years ago • 0 comments

$ cc --version
FreeBSD clang version 10.0.1 ([email protected]:llvm/llvm-project.git llvmorg-10.0.1-rc2-0-g77d76b71d7d)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

$ meson _build && ninja -C _build
[...]
../tinybox/style/style.c:200:24: error: address of array 'config_style->font' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
    if (!config_style->font) {
        ~~~~~~~~~~~~~~~^~~~
../tinybox/menu/render.c:251:9: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
    if (!menu->menu_type == TBX_MENU) {
        ^                ~~
../tinybox/menu/render.c:251:9: note: add parentheses after the '!' to evaluate the comparison first
    if (!menu->menu_type == TBX_MENU) {
        ^
         (                          )
../tinybox/menu/render.c:251:9: note: add parentheses around left hand side expression to silence this warning
    if (!menu->menu_type == TBX_MENU) {
        ^
        (               )

jbeich avatar Jul 18 '20 00:07 jbeich