dbus: fix 64-bit compiler warnings 24/278524/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.061519 accepted/tizen/7.0/unified/hotfix/20221116.110704 accepted/tizen/unified/20220722.031020 submit/tizen/20220721.133433 tizen_7.0_m2_release
authorGaurav Gupta <g.gupta@samsung.com>
Tue, 19 Jul 2022 06:10:34 +0000 (11:40 +0530)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 21 Jul 2022 11:19:41 +0000 (13:19 +0200)
Fix 64-bit compiler warnings.

Change-Id: I799a07c197a95d80a4fb33998ca113533ac4a54e
Signed-off-by: Gaurav Gupta <g.gupta@samsung.com>
dbus/dbus-signals.c
dbus/dbus-transport-kdbus.c

index 68fbeb5..420aea5 100644 (file)
@@ -847,7 +847,7 @@ bus_match_rule_parse_arg_match (MatchRule     *rule,
       else
         {
           dbus_set_error (error, DBUS_ERROR_MATCH_RULE_INVALID,
-              "Key '%s' in match rule contains junk after argument number (%u). Only 'arg%upath' (for example) or 'arg0namespace' are valid", key, arg, arg);
+              "Key '%s' in match rule contains junk after argument number (%lu). Only 'arg%lupath' (for example) or 'arg0namespace' are valid", key, arg, arg);
           goto failed;
         }
     }
@@ -865,7 +865,7 @@ bus_match_rule_parse_arg_match (MatchRule     *rule,
       rule->args[arg] != NULL)
     {
       dbus_set_error (error, DBUS_ERROR_MATCH_RULE_INVALID,
-                      "Argument %d matched more than once in match rule\n", key);
+                      "Argument %s matched more than once in match rule\n", key);
       goto failed;
     }
 
index 5bb82e5..9e7bdba 100755 (executable)
@@ -775,7 +775,7 @@ kdbus_write_msg_internal (DBusTransportKdbus  *transport,
   ret_size = header_size + body_size;
 
   /* check whether we can and should use memfd */
-  if ((dst_id != KDBUS_DST_ID_BROADCAST) && (ret_size > MEMFD_SIZE_THRESHOLD))
+  if ((dst_id != KDBUS_DST_ID_BROADCAST) && ((uint64_t)ret_size > MEMFD_SIZE_THRESHOLD))
       memfd = kdbus_acquire_memfd ();
 
   _dbus_message_get_unix_fds (message, &unix_fds, &fds_count);
@@ -1051,7 +1051,7 @@ kdbus_write_msg_internal (DBusTransportKdbus  *transport,
     {
       DBusString str;
       int size, ret, *fds;
-      unsigned n_fds;
+      int n_fds;
       char *data;
 
       /* check message size */
@@ -1096,7 +1096,7 @@ kdbus_write_msg_internal (DBusTransportKdbus  *transport,
       _dbus_string_init_const_len (&str, data, ret);
 
       /* create DBusMessage from kmsg */
-      *sync_reply = _dbus_decode_kmsg (&str, msg_reply->src_id, fds, n_fds);
+      *sync_reply = _dbus_decode_kmsg (&str, msg_reply->src_id, fds, (unsigned int)n_fds);
       if (*sync_reply == NULL)
         ret_size = -1;
 
@@ -3820,7 +3820,7 @@ do_reading (DBusTransport *transport)
   if (!dbus_watch_get_enabled (kdbus_transport->read_watch))
     return TRUE;
 
-  if (!_dbus_message_loader_get_unix_fds (transport->loader, &fds, &n_fds))
+  if (!_dbus_message_loader_get_unix_fds (transport->loader, &fds, (unsigned int *)&n_fds))
   {
       _dbus_verbose ("Out of memory reading file descriptors\n");
       oom = TRUE;