From 6b58ba831aaa89cd39e39e1c640c06fcc2b5058e Mon Sep 17 00:00:00 2001 From: murray Date: Thu, 13 Apr 2023 12:58:59 +0100 Subject: [PATCH] fix warnings --- Makefile | 4 ++-- main.c | 17 +++++++++++++++-- tsm/Makefile | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e3e2518..c1c9572 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ WAYLAND_SCANNER := wayland-scanner PREFIX ?= /usr/local BINDIR ?= $(PREFIX)/bin -VERSION="0.4.0-git" +VERSION="0.5.0" -CFLAGS ?= -Wall -Wextra -Wno-unused-parameter -Wno-parentheses +CFLAGS ?= -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-format-overflow override CFLAGS += -DVERSION=\"$(VERSION)\" VPATH=$(WAYLAND_PROTOCOLS_DIR)/stable/xdg-shell:$(WAYLAND_PROTOCOLS_DIR)/unstable/xdg-decoration diff --git a/main.c b/main.c index 97a2c0e..8241374 100644 --- a/main.c +++ b/main.c @@ -31,6 +31,10 @@ int font_init(int, char *, int *, int *); void font_deinit(void); unsigned char *get_glyph(uint32_t, uint32_t, int); +static void noop() +{ +} + enum deco { DECO_AUTO, DECO_SERVER, @@ -1266,7 +1270,10 @@ static struct wl_pointer_listener ptr_listener = { ptr_frame, ptr_axis_source, ptr_axis_stop, - ptr_axis_discrete + ptr_axis_discrete, +#ifdef WL_POINTER_AXIS_VALUE120_SINCE_VERSION + noop, +#endif }; static void seat_capabilities(void *data, struct wl_seat *seat, uint32_t caps) @@ -1427,7 +1434,13 @@ static void toplvl_close(void *data, struct xdg_toplevel *t) static const struct xdg_toplevel_listener toplvl_listener = { toplvl_configure, - toplvl_close + toplvl_close, +#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION + noop, +#endif +#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION + noop, +#endif }; static void configure(void *d, struct xdg_surface *surf, uint32_t serial) diff --git a/tsm/Makefile b/tsm/Makefile index ae8dea1..7c9671d 100644 --- a/tsm/Makefile +++ b/tsm/Makefile @@ -1,4 +1,4 @@ -CFLAGS ?= -Wall -Wextra -Wno-unused-parameter -Wno-parentheses +CFLAGS ?= -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-format-overflow OBJ=wcwidth.o shl-htable.o\ tsm-render.o tsm-screen.o tsm-selection.o\