@@ -169,6 +169,9 @@ void dbus_cb_fdn_methods(GDBusConnection *connection,
169169 GDBusMethodInvocation * invocation ,
170170 gpointer user_data )
171171{
172+ (void )object_path ;
173+ (void )interface_name ;
174+ (void )user_data ;
172175
173176 struct dbus_method * m = bsearch (method_name ,
174177 methods_fdn ,
@@ -225,6 +228,9 @@ void dbus_cb_dunst_methods(GDBusConnection *connection,
225228 GDBusMethodInvocation * invocation ,
226229 gpointer user_data )
227230{
231+ (void )object_path ;
232+ (void )interface_name ;
233+ (void )user_data ;
228234
229235 struct dbus_method * m = bsearch (method_name ,
230236 methods_dunst ,
@@ -236,8 +242,7 @@ void dbus_cb_dunst_methods(GDBusConnection *connection,
236242 m -> method (connection , sender , parameters , invocation );
237243 } else {
238244 LOG_M ("Unknown method name: '%s' (sender: '%s')." ,
239- method_name ,
240- sender );
245+ method_name , sender );
241246 }
242247}
243248
@@ -246,6 +251,9 @@ static void dbus_cb_dunst_ContextMenuCall(GDBusConnection *connection,
246251 GVariant * parameters ,
247252 GDBusMethodInvocation * invocation )
248253{
254+ (void )sender ;
255+ (void )parameters ;
256+
249257 LOG_D ("CMD: Calling context menu" );
250258 context_menu ();
251259
@@ -258,6 +266,8 @@ static void dbus_cb_dunst_NotificationAction(GDBusConnection *connection,
258266 GVariant * parameters ,
259267 GDBusMethodInvocation * invocation )
260268{
269+ (void )sender ;
270+
261271 guint32 notification_nr = 0 ;
262272 g_variant_get (parameters , "(u)" , & notification_nr );
263273
@@ -288,6 +298,9 @@ static void dbus_cb_dunst_NotificationClearHistory(GDBusConnection *connection,
288298 GVariant * parameters ,
289299 GDBusMethodInvocation * invocation )
290300{
301+ (void )sender ;
302+ (void )parameters ;
303+
291304 LOG_D ("CMD: Clearing the history" );
292305 queues_history_clear ();
293306 wake_up ();
@@ -301,6 +314,9 @@ static void dbus_cb_dunst_NotificationCloseAll(GDBusConnection *connection,
301314 GVariant * parameters ,
302315 GDBusMethodInvocation * invocation )
303316{
317+ (void )sender ;
318+ (void )parameters ;
319+
304320 LOG_D ("CMD: Pushing all to history" );
305321 queues_history_push_all ();
306322 wake_up ();
@@ -314,6 +330,9 @@ static void dbus_cb_dunst_NotificationCloseLast(GDBusConnection *connection,
314330 GVariant * parameters ,
315331 GDBusMethodInvocation * invocation )
316332{
333+ (void )sender ;
334+ (void )parameters ;
335+
317336 LOG_D ("CMD: Closing last notification" );
318337 const GList * list = queues_get_displayed ();
319338 if (list && list -> data ) {
@@ -331,6 +350,9 @@ static void dbus_cb_dunst_NotificationShow(GDBusConnection *connection,
331350 GVariant * parameters ,
332351 GDBusMethodInvocation * invocation )
333352{
353+ (void )sender ;
354+ (void )parameters ;
355+
334356 LOG_D ("CMD: Showing last notification from history" );
335357 queues_history_pop ();
336358 wake_up ();
@@ -344,6 +366,9 @@ static void dbus_cb_dunst_NotificationListHistory(GDBusConnection *connection,
344366 GVariant * parameters ,
345367 GDBusMethodInvocation * invocation )
346368{
369+ (void )sender ;
370+ (void )parameters ;
371+
347372 LOG_D ("CMD: Listing all notifications from history" );
348373
349374 GVariantBuilder builder ;
@@ -396,6 +421,9 @@ static void dbus_cb_dunst_NotificationPopHistory(GDBusConnection *connection,
396421 GVariant * parameters ,
397422 GDBusMethodInvocation * invocation )
398423{
424+ (void )sender ;
425+ (void )parameters ;
426+
399427 LOG_D ("CMD: Popping notification from history" );
400428
401429 guint32 id ;
@@ -413,6 +441,9 @@ static void dbus_cb_dunst_NotificationRemoveFromHistory(GDBusConnection *connect
413441 GVariant * parameters ,
414442 GDBusMethodInvocation * invocation )
415443{
444+ (void )sender ;
445+ (void )parameters ;
446+
416447 LOG_D ("CMD: Removing notification from history" );
417448
418449 guint32 id ;
@@ -450,7 +481,7 @@ static void gradient_entry(const struct gradient *grad, GVariantDict *dict, cons
450481 }
451482
452483 char * * strv = g_malloc ((grad -> length + 1 ) * sizeof (char * ));
453- for (int i = 0 ; i < grad -> length ; i ++ ) {
484+ for (size_t i = 0 ; i < grad -> length ; i ++ ) {
454485 char buf [10 ];
455486 if (color_to_string (grad -> colors [i ], buf ))
456487 strv [i ] = g_strdup (buf );
@@ -466,6 +497,9 @@ static void dbus_cb_dunst_RuleList(GDBusConnection *connection,
466497 GVariant * parameters ,
467498 GDBusMethodInvocation * invocation )
468499{
500+ (void )sender ;
501+ (void )parameters ;
502+
469503 LOG_D ("CMD: Listing all configured rules" );
470504
471505 GVariantBuilder builder ;
@@ -589,6 +623,9 @@ static void dbus_cb_dunst_RuleEnable(GDBusConnection *connection,
589623 GVariant * parameters ,
590624 GDBusMethodInvocation * invocation )
591625{
626+ (void )sender ;
627+ (void )parameters ;
628+
592629 // dbus param state: 0 → disable, 1 → enable, 2 → toggle.
593630
594631 int state = 0 ;
@@ -634,6 +671,8 @@ static void dbus_cb_dunst_ConfigReload(GDBusConnection *connection,
634671 GVariant * parameters ,
635672 GDBusMethodInvocation * invocation )
636673{
674+ (void )sender ;
675+
637676 gchar * * configs = NULL ;
638677 g_variant_get (parameters , "(^as)" , & configs );
639678 reload (configs );
@@ -649,6 +688,9 @@ static void dbus_cb_dunst_Ping(GDBusConnection *connection,
649688 GVariant * parameters ,
650689 GDBusMethodInvocation * invocation )
651690{
691+ (void )sender ;
692+ (void )parameters ;
693+
652694 g_dbus_method_invocation_return_value (invocation , NULL );
653695 g_dbus_connection_flush (connection , NULL , NULL , NULL );
654696}
@@ -660,6 +702,9 @@ static void dbus_cb_GetCapabilities(
660702 GVariant * parameters ,
661703 GDBusMethodInvocation * invocation )
662704{
705+ (void )sender ;
706+ (void )parameters ;
707+
663708 GVariantBuilder * builder ;
664709 GVariant * value ;
665710
@@ -669,7 +714,7 @@ static void dbus_cb_GetCapabilities(
669714 g_variant_builder_add (builder , "s" , "body-hyperlinks" );
670715 g_variant_builder_add (builder , "s" , "icon-static" );
671716
672- for (int i = 0 ; i < sizeof (stack_tag_hints )/sizeof (* stack_tag_hints ); ++ i )
717+ for (size_t i = 0 ; i < sizeof (stack_tag_hints )/sizeof (* stack_tag_hints ); ++ i )
673718 g_variant_builder_add (builder , "s" , stack_tag_hints [i ]);
674719
675720 // Since markup isn't a global variable anymore, look it up in the
@@ -761,7 +806,7 @@ static struct notification *dbus_message_to_notification(const gchar *sender, GV
761806 *
762807 * Only accept to first one we find.
763808 */
764- for (int i = 0 ; i < sizeof (stack_tag_hints )/sizeof (* stack_tag_hints ); ++ i ) {
809+ for (size_t i = 0 ; i < sizeof (stack_tag_hints )/sizeof (* stack_tag_hints ); ++ i ) {
765810 if ((dict_value = g_variant_lookup_value (hints , stack_tag_hints [i ], G_VARIANT_TYPE_STRING ))) {
766811 n -> stack_tag = g_variant_dup_string (dict_value , NULL );
767812 g_variant_unref (dict_value );
@@ -862,7 +907,7 @@ static struct notification *dbus_message_to_notification(const gchar *sender, GV
862907 size_t length = g_strv_length (cols );
863908 struct gradient * grad = gradient_alloc (length );
864909
865- for (int i = 0 ; i < length ; i ++ ) {
910+ for (size_t i = 0 ; i < length ; i ++ ) {
866911 if (!string_parse_color (cols [i ], & grad -> colors [i ])) {
867912 g_free (grad );
868913 goto end ;
@@ -903,7 +948,6 @@ static struct notification *dbus_message_to_notification(const gchar *sender, GV
903948
904949void signal_length_propertieschanged (void )
905950{
906-
907951 static unsigned int last_displayed = 0 ;
908952 static unsigned int last_history = 0 ;
909953 static unsigned int last_waiting = 0 ;
@@ -1005,6 +1049,8 @@ static void dbus_cb_CloseNotification(
10051049 GVariant * parameters ,
10061050 GDBusMethodInvocation * invocation )
10071051{
1052+ (void )sender ;
1053+
10081054 guint32 id ;
10091055 g_variant_get (parameters , "(u)" , & id );
10101056 if (settings .ignore_dbusclose ) {
@@ -1029,6 +1075,9 @@ static void dbus_cb_GetServerInformation(
10291075 GVariant * parameters ,
10301076 GDBusMethodInvocation * invocation )
10311077{
1078+ (void )sender ;
1079+ (void )parameters ;
1080+
10321081 GVariant * answer = g_variant_new ("(ssss)" , "dunst" , "knopwob" , VERSION , "1.2" );
10331082
10341083 g_dbus_method_invocation_return_value (invocation , answer );
@@ -1127,6 +1176,12 @@ GVariant *dbus_cb_dunst_Properties_Get(GDBusConnection *connection,
11271176 GError * * error ,
11281177 gpointer user_data )
11291178{
1179+ (void )connection ;
1180+ (void )sender ;
1181+ (void )object_path ;
1182+ (void )interface_name ;
1183+ (void )user_data ;
1184+
11301185 struct dunst_status status = dunst_status_get ();
11311186
11321187 if (STR_EQ (property_name , "paused" )) {
@@ -1158,6 +1213,9 @@ gboolean dbus_cb_dunst_Properties_Set(GDBusConnection *connection,
11581213 GError * * error ,
11591214 gpointer user_data )
11601215{
1216+ (void )sender ;
1217+ (void )user_data ;
1218+
11611219 int targetPauseLevel = -1 ;
11621220 if (STR_EQ (property_name , "paused" )) {
11631221 if (g_variant_get_boolean (value )) {
@@ -1207,7 +1265,7 @@ gboolean dbus_cb_dunst_Properties_Set(GDBusConnection *connection,
12071265
12081266
12091267static const GDBusInterfaceVTable interface_vtable_fdn = {
1210- dbus_cb_fdn_methods
1268+ dbus_cb_fdn_methods ,
12111269};
12121270
12131271static const GDBusInterfaceVTable interface_vtable_dunst = {
@@ -1220,6 +1278,9 @@ static void dbus_cb_bus_acquired(GDBusConnection *connection,
12201278 const gchar * name ,
12211279 gpointer user_data )
12221280{
1281+ (void )name ;
1282+ (void )user_data ;
1283+
12231284 GError * err = NULL ;
12241285 if (!g_dbus_connection_register_object (
12251286 connection ,
@@ -1248,6 +1309,8 @@ static void dbus_cb_name_acquired(GDBusConnection *connection,
12481309 const gchar * name ,
12491310 gpointer user_data )
12501311{
1312+ (void )user_data ;
1313+
12511314 // If we're not able to get org.fd.N bus, we've still got a problem
12521315 if (STR_EQ (name , FDN_NAME ))
12531316 dbus_conn = connection ;
@@ -1371,6 +1434,9 @@ static void dbus_cb_name_lost(GDBusConnection *connection,
13711434 const gchar * name ,
13721435 gpointer user_data )
13731436{
1437+ (void )name ;
1438+ (void )user_data ;
1439+
13741440 if (connection ) {
13751441 char * name ;
13761442 unsigned int pid ;
0 commit comments