diff --git a/kiwmi/output.c b/kiwmi/output.c index bc9b5a7..0e8a3d4 100644 --- a/kiwmi/output.c +++ b/kiwmi/output.c @@ -58,7 +58,7 @@ output_frame_notify(struct wl_listener *listener, void *data) } static void -output_destroy_nofity(struct wl_listener *listener, void *data) +output_destroy_nofity(struct wl_listener *listener, void *UNUSED(data)) { struct kiwmi_output *output = wl_container_of(listener, output, destroy); diff --git a/meson.build b/meson.build index 9d2f6ad..a3b3e08 100644 --- a/meson.build +++ b/meson.build @@ -36,4 +36,11 @@ else endif add_project_arguments('-DKIWMI_VERSION=@0@'.format(version), language: 'c') +compiler = meson.get_compiler('c') +if compiler.get_id() == 'gcc' or compiler.get_id() == 'clang' + add_project_arguments('-DUNUSED(x)=UNUSED_ ## x __attribute__((__unused__))', language: 'c') +else + add_project_arguments('-DUNUSED(x)=UNUSED_ ## x', language: 'c') +endif + subdir('kiwmi')