mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-29 17:10:11 +01:00
Fix warnings from compiler option '-Wshadow'
Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98192
This commit is contained in:
parent
6292e7c278
commit
d0be2333d5
10 changed files with 31 additions and 33 deletions
|
|
@ -354,14 +354,14 @@ append_unescaped_value (DBusString *unescaped,
|
|||
* in the semicolon-separated list should be tried first.
|
||||
*
|
||||
* @param address the address.
|
||||
* @param entry return location to an array of entries.
|
||||
* @param entry_result return location to an array of entries.
|
||||
* @param array_len return location for array length.
|
||||
* @param error address where an error can be returned.
|
||||
* @returns #TRUE on success, #FALSE otherwise.
|
||||
*/
|
||||
dbus_bool_t
|
||||
dbus_parse_address (const char *address,
|
||||
DBusAddressEntry ***entry,
|
||||
DBusAddressEntry ***entry_result,
|
||||
int *array_len,
|
||||
DBusError *error)
|
||||
{
|
||||
|
|
@ -553,7 +553,7 @@ dbus_parse_address (const char *address,
|
|||
}
|
||||
|
||||
_dbus_list_clear (&entries);
|
||||
*entry = entry_array;
|
||||
*entry_result = entry_array;
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ typedef struct DBusAddressEntry DBusAddressEntry;
|
|||
|
||||
DBUS_EXPORT
|
||||
dbus_bool_t dbus_parse_address (const char *address,
|
||||
DBusAddressEntry ***entry,
|
||||
DBusAddressEntry ***entry_result,
|
||||
int *array_len,
|
||||
DBusError *error);
|
||||
DBUS_EXPORT
|
||||
|
|
|
|||
|
|
@ -1044,8 +1044,6 @@ _dbus_list_test (void)
|
|||
{
|
||||
DBusList *got_link1;
|
||||
DBusList *got_link2;
|
||||
|
||||
DBusList *link2;
|
||||
|
||||
void *data1_indirect;
|
||||
void *data1;
|
||||
|
|
|
|||
|
|
@ -3068,10 +3068,10 @@ array_write_value (TestTypeNode *node,
|
|||
link = _dbus_list_get_first_link (&container->children);
|
||||
while (link != NULL)
|
||||
{
|
||||
TestTypeNode *child = link->data;
|
||||
TestTypeNode *child2 = link->data;
|
||||
DBusList *next = _dbus_list_get_next_link (&container->children, link);
|
||||
|
||||
if (!node_write_value (child, block, &sub, seed + i))
|
||||
if (!node_write_value (child2, block, &sub, seed + i))
|
||||
goto oom;
|
||||
|
||||
link = next;
|
||||
|
|
@ -3132,20 +3132,20 @@ array_read_or_set_value (TestTypeNode *node,
|
|||
link = _dbus_list_get_first_link (&container->children);
|
||||
while (link != NULL)
|
||||
{
|
||||
TestTypeNode *child = link->data;
|
||||
TestTypeNode *child2 = link->data;
|
||||
DBusList *next = _dbus_list_get_next_link (&container->children, link);
|
||||
|
||||
_dbus_assert (child->klass->typecode ==
|
||||
_dbus_assert (child2->klass->typecode ==
|
||||
_dbus_type_reader_get_element_type (reader));
|
||||
|
||||
if (realign_root == NULL)
|
||||
{
|
||||
if (!node_read_value (child, &sub, seed + i))
|
||||
if (!node_read_value (child2, &sub, seed + i))
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!node_set_value (child, &sub, realign_root, seed + i))
|
||||
if (!node_set_value (child2, &sub, realign_root, seed + i))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,11 +139,11 @@ generate_trivial_inner (DBusMessageDataIter *iter,
|
|||
_dbus_assert_not_reached ("oom");
|
||||
|
||||
{
|
||||
DBusMessageIter iter;
|
||||
DBusMessageIter iter2;
|
||||
const char *v_STRING = "This is an error";
|
||||
|
||||
dbus_message_iter_init_append (message, &iter);
|
||||
if (!dbus_message_iter_append_basic (&iter,
|
||||
dbus_message_iter_init_append (message, &iter2);
|
||||
if (!dbus_message_iter_append_basic (&iter2,
|
||||
DBUS_TYPE_STRING,
|
||||
&v_STRING))
|
||||
_dbus_assert_not_reached ("oom");
|
||||
|
|
|
|||
|
|
@ -262,12 +262,12 @@ _dbus_timeout_list_set_functions (DBusTimeoutList *timeout_list,
|
|||
link2 = _dbus_list_get_first_link (&timeout_list->timeouts);
|
||||
while (link2 != link)
|
||||
{
|
||||
DBusList *next = _dbus_list_get_next_link (&timeout_list->timeouts,
|
||||
link2);
|
||||
DBusList *next2 = _dbus_list_get_next_link (&timeout_list->timeouts,
|
||||
link2);
|
||||
|
||||
(* remove_function) (link2->data, data);
|
||||
|
||||
link2 = next;
|
||||
link2 = next2;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -326,8 +326,8 @@ _dbus_watch_list_set_functions (DBusWatchList *watch_list,
|
|||
link2 = _dbus_list_get_first_link (&watch_list->watches);
|
||||
while (link2 != link)
|
||||
{
|
||||
DBusList *next = _dbus_list_get_next_link (&watch_list->watches,
|
||||
link2);
|
||||
DBusList *next2 = _dbus_list_get_next_link (&watch_list->watches,
|
||||
link2);
|
||||
#ifdef DBUS_ENABLE_VERBOSE_MODE
|
||||
DBusWatch *watch2 = link2->data;
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ _dbus_watch_list_set_functions (DBusWatchList *watch_list,
|
|||
|
||||
(* remove_function) (link2->data, data);
|
||||
|
||||
link2 = next;
|
||||
link2 = next2;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -951,14 +951,14 @@ static const guchar partial_message[] =
|
|||
|
||||
static void
|
||||
send_all_with_fd (GSocket *socket,
|
||||
const guchar *partial_message,
|
||||
const guchar *local_partial_message,
|
||||
gsize len,
|
||||
int fd)
|
||||
{
|
||||
GSocketControlMessage *fdm = g_unix_fd_message_new ();
|
||||
GError *error = NULL;
|
||||
gssize sent;
|
||||
GOutputVector vector = { partial_message, len };
|
||||
GOutputVector vector = { local_partial_message, len };
|
||||
|
||||
g_unix_fd_message_append_fd (G_UNIX_FD_MESSAGE (fdm), fd, &error);
|
||||
g_assert_no_error (error);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ static Atom address_atom;
|
|||
static Atom pid_atom;
|
||||
|
||||
static int
|
||||
x_io_error_handler (Display *xdisplay)
|
||||
x_io_error_handler (Display *local_xdisplay)
|
||||
{
|
||||
verbose ("X IO error\n");
|
||||
kill_bus_and_exit (0);
|
||||
|
|
|
|||
|
|
@ -457,13 +457,13 @@ main (int argc, char *argv[])
|
|||
{
|
||||
char *arg;
|
||||
char *c;
|
||||
int type;
|
||||
int type2;
|
||||
int secondary_type;
|
||||
int container_type;
|
||||
DBusMessageIter *target_iter;
|
||||
DBusMessageIter container_iter;
|
||||
|
||||
type = DBUS_TYPE_INVALID;
|
||||
type2 = DBUS_TYPE_INVALID;
|
||||
arg = argv[i++];
|
||||
c = strchr (arg, ':');
|
||||
|
||||
|
|
@ -497,9 +497,9 @@ main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (arg[0] == 0)
|
||||
type = DBUS_TYPE_STRING;
|
||||
type2 = DBUS_TYPE_STRING;
|
||||
else
|
||||
type = type_from_name (arg);
|
||||
type2 = type_from_name (arg);
|
||||
|
||||
if (container_type == DBUS_TYPE_DICT_ENTRY)
|
||||
{
|
||||
|
|
@ -514,7 +514,7 @@ main (int argc, char *argv[])
|
|||
*(c++) = 0;
|
||||
secondary_type = type_from_name (arg);
|
||||
sig[0] = DBUS_DICT_ENTRY_BEGIN_CHAR;
|
||||
sig[1] = type;
|
||||
sig[1] = type2;
|
||||
sig[2] = secondary_type;
|
||||
sig[3] = DBUS_DICT_ENTRY_END_CHAR;
|
||||
sig[4] = '\0';
|
||||
|
|
@ -527,7 +527,7 @@ main (int argc, char *argv[])
|
|||
else if (container_type != DBUS_TYPE_INVALID)
|
||||
{
|
||||
char sig[2];
|
||||
sig[0] = type;
|
||||
sig[0] = type2;
|
||||
sig[1] = '\0';
|
||||
dbus_message_iter_open_container (&iter,
|
||||
container_type,
|
||||
|
|
@ -540,14 +540,14 @@ main (int argc, char *argv[])
|
|||
|
||||
if (container_type == DBUS_TYPE_ARRAY)
|
||||
{
|
||||
append_array (target_iter, type, c);
|
||||
append_array (target_iter, type2, c);
|
||||
}
|
||||
else if (container_type == DBUS_TYPE_DICT_ENTRY)
|
||||
{
|
||||
append_dict (target_iter, type, secondary_type, c);
|
||||
append_dict (target_iter, type2, secondary_type, c);
|
||||
}
|
||||
else
|
||||
append_arg (target_iter, type, c);
|
||||
append_arg (target_iter, type2, c);
|
||||
|
||||
if (container_type != DBUS_TYPE_INVALID)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue