Fails to build with -DNDEBUG (via -Db_ndebug=true) due to -Werror
$ git describe --tags
0.14.0-428-gfa9b9cc8
$ cc --version
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
$ meson setup -Db_ndebug=true /tmp/wlroots_build
$ meson compile -C /tmp/wlroots_build --ninja-args=-k0
[...]
backend/libinput/tablet_tool.c:19:13: error: unused function 'tablet_is_libinput' [-Werror,-Wunused-function]
static bool tablet_is_libinput(struct wlr_tablet *tablet) {
^
backend/wayland/output.c:466:24: error: unused variable 'output' [-Werror,-Wunused-variable]
struct wlr_wl_output *output = data;
^
backend/wayland/seat.c:861:26: error: unused variable 'output' [-Werror,-Wunused-variable]
struct wlr_wl_output *output = pointer->output;
^
examples/input-method.c:393:12: error: unused variable 'n' [-Werror,-Wunused-variable]
ssize_t n = read(timer_fd, &expirations, sizeof(expirations));
^
render/pixman/renderer.c:478:38: error: unused variable 'drm_fmt' [-Werror,-Wunused-variable]
const struct wlr_pixel_format_info *drm_fmt =
^
types/output/render.c:245:24: error: unused variable 'allocator' [-Werror,-Wunused-variable]
struct wlr_allocator *allocator = output->allocator;
^
types/wlr_output_management_v1.c:699:8: error: variable 'found' set but not used [-Werror,-Wunused-but-set-variable]
bool found = false;
^
render/wlr_renderer.c:220:25: error: variable 'xrgb8888' set but not used [-Werror,-Wunused-but-set-variable]
bool argb8888 = false, xrgb8888 = false;
^
render/wlr_renderer.c:220:7: error: variable 'argb8888' set but not used [-Werror,-Wunused-but-set-variable]
bool argb8888 = false, xrgb8888 = false;
^
types/wlr_screencopy_v1.c:281:23: error: unused variable 'renderer' [-Werror,-Wunused-variable]
struct wlr_renderer *renderer = output->renderer;
^
types/wlr_screencopy_v1.c:536:23: error: unused variable 'renderer' [-Werror,-Wunused-variable]
struct wlr_renderer *renderer = output->renderer;
^
types/wlr_surface.c:813:7: error: variable 'found' set but not used [-Werror,-Wunused-but-set-variable]
bool found = false;
^
xwayland/selection/dnd.c:122:19: error: unused variable 'drag' [-Werror,-Wunused-variable]
struct wlr_drag *drag = xwm->drag;
^
xwayland/selection/dnd.c:124:31: error: unused variable 'dest' [-Werror,-Wunused-variable]
struct wlr_xwayland_surface *dest = xwm->drag_focus;
^
xwayland/selection/dnd.c:137:31: error: unused variable 'dest' [-Werror,-Wunused-variable]
struct wlr_xwayland_surface *dest = xwm->drag_focus;
^
xwayland/selection/dnd.c:135:19: error: unused variable 'drag' [-Werror,-Wunused-variable]
struct wlr_drag *drag = xwm->drag;
^
Edited by Jan Beich