From 5183e1d4b4c54ad2a464ad58c95c489f93b4280d Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Thu, 26 Sep 2019 17:26:23 +0200 Subject: [PATCH] bluez-monitor: fix usage of pw_properties_setf without a format string Otherwise compilation will fail with certain -Wformat-security flags Add the flag to the warnings. --- meson.build | 1 + src/examples/bluez-monitor.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index aa60db353..1db426215 100644 --- a/meson.build +++ b/meson.build @@ -46,6 +46,7 @@ if cc.get_id() == 'gcc' '-Wsign-compare', '-Wimplicit-fallthrough', '-Wpointer-arith', + '-Wformat-security', # '-DFASTPATH', language : 'c') endif diff --git a/src/examples/bluez-monitor.c b/src/examples/bluez-monitor.c index 74771ae3f..0c273e864 100644 --- a/src/examples/bluez-monitor.c +++ b/src/examples/bluez-monitor.c @@ -123,7 +123,7 @@ static struct bluez5_node *bluez5_create_node(struct bluez5_object *obj, uint32_ pw_properties_setf(node->props, PW_KEY_NODE_NAME, "%s.%s", info->factory_name, str); pw_properties_set(node->props, PW_KEY_NODE_DESCRIPTION, str); - pw_properties_setf(node->props, "factory.name", info->factory_name); + pw_properties_set(node->props, "factory.name", info->factory_name); node->monitor = monitor; node->object = obj;