@@ -169,6 +169,9 @@ void dbus_cb_fdn_methods(GDBusConnection *connection,
169
169
GDBusMethodInvocation * invocation ,
170
170
gpointer user_data )
171
171
{
172
+ (void )object_path ;
173
+ (void )interface_name ;
174
+ (void )user_data ;
172
175
173
176
struct dbus_method * m = bsearch (method_name ,
174
177
methods_fdn ,
@@ -225,6 +228,9 @@ void dbus_cb_dunst_methods(GDBusConnection *connection,
225
228
GDBusMethodInvocation * invocation ,
226
229
gpointer user_data )
227
230
{
231
+ (void )object_path ;
232
+ (void )interface_name ;
233
+ (void )user_data ;
228
234
229
235
struct dbus_method * m = bsearch (method_name ,
230
236
methods_dunst ,
@@ -236,8 +242,7 @@ void dbus_cb_dunst_methods(GDBusConnection *connection,
236
242
m -> method (connection , sender , parameters , invocation );
237
243
} else {
238
244
LOG_M ("Unknown method name: '%s' (sender: '%s')." ,
239
- method_name ,
240
- sender );
245
+ method_name , sender );
241
246
}
242
247
}
243
248
@@ -246,6 +251,9 @@ static void dbus_cb_dunst_ContextMenuCall(GDBusConnection *connection,
246
251
GVariant * parameters ,
247
252
GDBusMethodInvocation * invocation )
248
253
{
254
+ (void )sender ;
255
+ (void )parameters ;
256
+
249
257
LOG_D ("CMD: Calling context menu" );
250
258
context_menu ();
251
259
@@ -258,6 +266,8 @@ static void dbus_cb_dunst_NotificationAction(GDBusConnection *connection,
258
266
GVariant * parameters ,
259
267
GDBusMethodInvocation * invocation )
260
268
{
269
+ (void )sender ;
270
+
261
271
guint32 notification_nr = 0 ;
262
272
g_variant_get (parameters , "(u)" , & notification_nr );
263
273
@@ -288,6 +298,9 @@ static void dbus_cb_dunst_NotificationClearHistory(GDBusConnection *connection,
288
298
GVariant * parameters ,
289
299
GDBusMethodInvocation * invocation )
290
300
{
301
+ (void )sender ;
302
+ (void )parameters ;
303
+
291
304
LOG_D ("CMD: Clearing the history" );
292
305
queues_history_clear ();
293
306
wake_up ();
@@ -301,6 +314,9 @@ static void dbus_cb_dunst_NotificationCloseAll(GDBusConnection *connection,
301
314
GVariant * parameters ,
302
315
GDBusMethodInvocation * invocation )
303
316
{
317
+ (void )sender ;
318
+ (void )parameters ;
319
+
304
320
LOG_D ("CMD: Pushing all to history" );
305
321
queues_history_push_all ();
306
322
wake_up ();
@@ -314,6 +330,9 @@ static void dbus_cb_dunst_NotificationCloseLast(GDBusConnection *connection,
314
330
GVariant * parameters ,
315
331
GDBusMethodInvocation * invocation )
316
332
{
333
+ (void )sender ;
334
+ (void )parameters ;
335
+
317
336
LOG_D ("CMD: Closing last notification" );
318
337
const GList * list = queues_get_displayed ();
319
338
if (list && list -> data ) {
@@ -331,6 +350,9 @@ static void dbus_cb_dunst_NotificationShow(GDBusConnection *connection,
331
350
GVariant * parameters ,
332
351
GDBusMethodInvocation * invocation )
333
352
{
353
+ (void )sender ;
354
+ (void )parameters ;
355
+
334
356
LOG_D ("CMD: Showing last notification from history" );
335
357
queues_history_pop ();
336
358
wake_up ();
@@ -344,6 +366,9 @@ static void dbus_cb_dunst_NotificationListHistory(GDBusConnection *connection,
344
366
GVariant * parameters ,
345
367
GDBusMethodInvocation * invocation )
346
368
{
369
+ (void )sender ;
370
+ (void )parameters ;
371
+
347
372
LOG_D ("CMD: Listing all notifications from history" );
348
373
349
374
GVariantBuilder builder ;
@@ -396,6 +421,9 @@ static void dbus_cb_dunst_NotificationPopHistory(GDBusConnection *connection,
396
421
GVariant * parameters ,
397
422
GDBusMethodInvocation * invocation )
398
423
{
424
+ (void )sender ;
425
+ (void )parameters ;
426
+
399
427
LOG_D ("CMD: Popping notification from history" );
400
428
401
429
guint32 id ;
@@ -413,6 +441,9 @@ static void dbus_cb_dunst_NotificationRemoveFromHistory(GDBusConnection *connect
413
441
GVariant * parameters ,
414
442
GDBusMethodInvocation * invocation )
415
443
{
444
+ (void )sender ;
445
+ (void )parameters ;
446
+
416
447
LOG_D ("CMD: Removing notification from history" );
417
448
418
449
guint32 id ;
@@ -450,7 +481,7 @@ static void gradient_entry(const struct gradient *grad, GVariantDict *dict, cons
450
481
}
451
482
452
483
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 ++ ) {
454
485
char buf [10 ];
455
486
if (color_to_string (grad -> colors [i ], buf ))
456
487
strv [i ] = g_strdup (buf );
@@ -466,6 +497,9 @@ static void dbus_cb_dunst_RuleList(GDBusConnection *connection,
466
497
GVariant * parameters ,
467
498
GDBusMethodInvocation * invocation )
468
499
{
500
+ (void )sender ;
501
+ (void )parameters ;
502
+
469
503
LOG_D ("CMD: Listing all configured rules" );
470
504
471
505
GVariantBuilder builder ;
@@ -589,6 +623,9 @@ static void dbus_cb_dunst_RuleEnable(GDBusConnection *connection,
589
623
GVariant * parameters ,
590
624
GDBusMethodInvocation * invocation )
591
625
{
626
+ (void )sender ;
627
+ (void )parameters ;
628
+
592
629
// dbus param state: 0 → disable, 1 → enable, 2 → toggle.
593
630
594
631
int state = 0 ;
@@ -634,6 +671,8 @@ static void dbus_cb_dunst_ConfigReload(GDBusConnection *connection,
634
671
GVariant * parameters ,
635
672
GDBusMethodInvocation * invocation )
636
673
{
674
+ (void )sender ;
675
+
637
676
gchar * * configs = NULL ;
638
677
g_variant_get (parameters , "(^as)" , & configs );
639
678
reload (configs );
@@ -649,6 +688,9 @@ static void dbus_cb_dunst_Ping(GDBusConnection *connection,
649
688
GVariant * parameters ,
650
689
GDBusMethodInvocation * invocation )
651
690
{
691
+ (void )sender ;
692
+ (void )parameters ;
693
+
652
694
g_dbus_method_invocation_return_value (invocation , NULL );
653
695
g_dbus_connection_flush (connection , NULL , NULL , NULL );
654
696
}
@@ -660,6 +702,9 @@ static void dbus_cb_GetCapabilities(
660
702
GVariant * parameters ,
661
703
GDBusMethodInvocation * invocation )
662
704
{
705
+ (void )sender ;
706
+ (void )parameters ;
707
+
663
708
GVariantBuilder * builder ;
664
709
GVariant * value ;
665
710
@@ -669,7 +714,7 @@ static void dbus_cb_GetCapabilities(
669
714
g_variant_builder_add (builder , "s" , "body-hyperlinks" );
670
715
g_variant_builder_add (builder , "s" , "icon-static" );
671
716
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 )
673
718
g_variant_builder_add (builder , "s" , stack_tag_hints [i ]);
674
719
675
720
// 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
761
806
*
762
807
* Only accept to first one we find.
763
808
*/
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 ) {
765
810
if ((dict_value = g_variant_lookup_value (hints , stack_tag_hints [i ], G_VARIANT_TYPE_STRING ))) {
766
811
n -> stack_tag = g_variant_dup_string (dict_value , NULL );
767
812
g_variant_unref (dict_value );
@@ -862,7 +907,7 @@ static struct notification *dbus_message_to_notification(const gchar *sender, GV
862
907
size_t length = g_strv_length (cols );
863
908
struct gradient * grad = gradient_alloc (length );
864
909
865
- for (int i = 0 ; i < length ; i ++ ) {
910
+ for (size_t i = 0 ; i < length ; i ++ ) {
866
911
if (!string_parse_color (cols [i ], & grad -> colors [i ])) {
867
912
g_free (grad );
868
913
goto end ;
@@ -903,7 +948,6 @@ static struct notification *dbus_message_to_notification(const gchar *sender, GV
903
948
904
949
void signal_length_propertieschanged (void )
905
950
{
906
-
907
951
static unsigned int last_displayed = 0 ;
908
952
static unsigned int last_history = 0 ;
909
953
static unsigned int last_waiting = 0 ;
@@ -1005,6 +1049,8 @@ static void dbus_cb_CloseNotification(
1005
1049
GVariant * parameters ,
1006
1050
GDBusMethodInvocation * invocation )
1007
1051
{
1052
+ (void )sender ;
1053
+
1008
1054
guint32 id ;
1009
1055
g_variant_get (parameters , "(u)" , & id );
1010
1056
if (settings .ignore_dbusclose ) {
@@ -1029,6 +1075,9 @@ static void dbus_cb_GetServerInformation(
1029
1075
GVariant * parameters ,
1030
1076
GDBusMethodInvocation * invocation )
1031
1077
{
1078
+ (void )sender ;
1079
+ (void )parameters ;
1080
+
1032
1081
GVariant * answer = g_variant_new ("(ssss)" , "dunst" , "knopwob" , VERSION , "1.2" );
1033
1082
1034
1083
g_dbus_method_invocation_return_value (invocation , answer );
@@ -1127,6 +1176,12 @@ GVariant *dbus_cb_dunst_Properties_Get(GDBusConnection *connection,
1127
1176
GError * * error ,
1128
1177
gpointer user_data )
1129
1178
{
1179
+ (void )connection ;
1180
+ (void )sender ;
1181
+ (void )object_path ;
1182
+ (void )interface_name ;
1183
+ (void )user_data ;
1184
+
1130
1185
struct dunst_status status = dunst_status_get ();
1131
1186
1132
1187
if (STR_EQ (property_name , "paused" )) {
@@ -1158,6 +1213,9 @@ gboolean dbus_cb_dunst_Properties_Set(GDBusConnection *connection,
1158
1213
GError * * error ,
1159
1214
gpointer user_data )
1160
1215
{
1216
+ (void )sender ;
1217
+ (void )user_data ;
1218
+
1161
1219
int targetPauseLevel = -1 ;
1162
1220
if (STR_EQ (property_name , "paused" )) {
1163
1221
if (g_variant_get_boolean (value )) {
@@ -1207,7 +1265,7 @@ gboolean dbus_cb_dunst_Properties_Set(GDBusConnection *connection,
1207
1265
1208
1266
1209
1267
static const GDBusInterfaceVTable interface_vtable_fdn = {
1210
- dbus_cb_fdn_methods
1268
+ dbus_cb_fdn_methods ,
1211
1269
};
1212
1270
1213
1271
static const GDBusInterfaceVTable interface_vtable_dunst = {
@@ -1220,6 +1278,9 @@ static void dbus_cb_bus_acquired(GDBusConnection *connection,
1220
1278
const gchar * name ,
1221
1279
gpointer user_data )
1222
1280
{
1281
+ (void )name ;
1282
+ (void )user_data ;
1283
+
1223
1284
GError * err = NULL ;
1224
1285
if (!g_dbus_connection_register_object (
1225
1286
connection ,
@@ -1248,6 +1309,8 @@ static void dbus_cb_name_acquired(GDBusConnection *connection,
1248
1309
const gchar * name ,
1249
1310
gpointer user_data )
1250
1311
{
1312
+ (void )user_data ;
1313
+
1251
1314
// If we're not able to get org.fd.N bus, we've still got a problem
1252
1315
if (STR_EQ (name , FDN_NAME ))
1253
1316
dbus_conn = connection ;
@@ -1371,6 +1434,9 @@ static void dbus_cb_name_lost(GDBusConnection *connection,
1371
1434
const gchar * name ,
1372
1435
gpointer user_data )
1373
1436
{
1437
+ (void )name ;
1438
+ (void )user_data ;
1439
+
1374
1440
if (connection ) {
1375
1441
char * name ;
1376
1442
unsigned int pid ;
0 commit comments