summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2021-05-31 17:44:29 +0200
committerAndreas Müller <schnitzeltony@gmail.com>2021-05-31 17:44:29 +0200
commit6eba07bd195e0a1199a0fc62d7cc31ec376bc3dd (patch)
tree233df492d6cc66d11ddc61dc7d35b87207ed01b4 /examples
parent507d5709eaa42369624cda97d14d5ac79d0316e0 (diff)
downloadgupnp-6eba07bd195e0a1199a0fc62d7cc31ec376bc3dd.tar.gz
Fix build with hardened security flags
| ../gupnp-1.2.6/examples/get-volume.c: In function 'on_introspection': | ../gupnp-1.2.6/examples/get-volume.c:53:17: error: format not a string literal and no format arguments [-Werror=format-security] | 53 | g_critical (error->message); | | ^~~~~~~~~~ | ../gupnp-1.2.6/examples/get-volume.c:114:17: error: format not a string literal and no format arguments [-Werror=format-security] | 114 | g_critical (error->message); | | ^~~~~~~~~~ | ../gupnp-1.2.6/examples/get-volume.c: In function 'main': | ../gupnp-1.2.6/examples/get-volume.c:150:17: error: format not a string literal and no format arguments [-Werror=format-security] | 150 | g_error (error->message); | | ^~~~~~~ Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/get-volume.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/get-volume.c b/examples/get-volume.c
index 4601014..923581c 100644
--- a/examples/get-volume.c
+++ b/examples/get-volume.c
@@ -50,7 +50,7 @@ on_introspection (GObject *object, GAsyncResult *res, gpointer user_data)
&error);
if (error != NULL) {
- g_critical (error->message);
+ g_critical ("%s", error->message);
g_clear_error (&error);
}
@@ -111,7 +111,7 @@ on_introspection (GObject *object, GAsyncResult *res, gpointer user_data)
g_list_free (out_names);
if (error != NULL) {
- g_critical (error->message);
+ g_critical ("%s", error->message);
g_clear_error (&error);
} else {
g_print ("Current volume: %s\n",
@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
GUPnPContext *context = gupnp_context_new ("wlp3s0", 0, &error);
if (error != NULL) {
- g_error (error->message);
+ g_error ("%s", error->message);
}
GUPnPControlPoint *cp = gupnp_control_point_new (context, CONTENT_DIR);