Supress UNUSED parameter warnings

This commit is contained in:
buffet 2019-03-07 18:51:33 +01:00
parent 411e30dd1f
commit 8a2e11ee28
2 changed files with 8 additions and 1 deletions

View file

@ -58,7 +58,7 @@ output_frame_notify(struct wl_listener *listener, void *data)
} }
static void 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); struct kiwmi_output *output = wl_container_of(listener, output, destroy);

View file

@ -36,4 +36,11 @@ else
endif endif
add_project_arguments('-DKIWMI_VERSION=@0@'.format(version), language: 'c') 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') subdir('kiwmi')