Index: dbus/dbus-mainloop.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-mainloop.c,v retrieving revision 1.18 diff -u -r1.18 dbus-mainloop.c --- dbus/dbus-mainloop.c 15 Jan 2005 07:15:38 -0000 1.18 +++ dbus/dbus-mainloop.c 7 Sep 2006 22:44:30 -0000 @@ -134,8 +134,8 @@ cb->timeout = timeout; cb->function = function; - _dbus_get_current_time (&cb->last_tv_sec, - &cb->last_tv_usec); + _dbus_get_current_time ((long *)&cb->last_tv_sec, + (long *)&cb->last_tv_usec); cb->callback.refcount = 1; cb->callback.type = CALLBACK_TIMEOUT; cb->callback.data = data; @@ -643,7 +643,7 @@ unsigned long tv_sec; unsigned long tv_usec; - _dbus_get_current_time (&tv_sec, &tv_usec); + _dbus_get_current_time ((long *)&tv_sec, (long *)&tv_usec); link = _dbus_list_get_first_link (&loop->callbacks); while (link != NULL) @@ -713,7 +713,7 @@ unsigned long tv_sec; unsigned long tv_usec; - _dbus_get_current_time (&tv_sec, &tv_usec); + _dbus_get_current_time ((long *)&tv_sec, (long *)&tv_usec); /* It'd be nice to avoid this O(n) thingy here */ link = _dbus_list_get_first_link (&loop->callbacks); Index: dbus/dbus-marshal-basic.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-marshal-basic.c,v retrieving revision 1.29 diff -u -r1.29 dbus-marshal-basic.c --- dbus/dbus-marshal-basic.c 6 Sep 2006 00:14:06 -0000 1.29 +++ dbus/dbus-marshal-basic.c 7 Sep 2006 22:44:32 -0000 @@ -216,7 +216,7 @@ data = _dbus_string_get_data_len (str, offset, 2); - pack_2_octets (value, byte_order, data); + pack_2_octets (value, byte_order, (unsigned char *)data); } static void @@ -232,7 +232,7 @@ data = _dbus_string_get_data_len (str, offset, 4); - pack_4_octets (value, byte_order, data); + pack_4_octets (value, byte_order, (unsigned char *)data); } static void @@ -248,7 +248,7 @@ data = _dbus_string_get_data_len (str, offset, 8); - pack_8_octets (value, byte_order, data); + pack_8_octets (value, byte_order, (unsigned char *)data); } /** @@ -304,7 +304,7 @@ _dbus_assert (_DBUS_ALIGN_VALUE (pos, 4) == (unsigned) pos); old_len = _dbus_unpack_uint32 (byte_order, - _dbus_string_get_const_data_len (str, pos, 4)); + (unsigned char *)_dbus_string_get_const_data_len (str, pos, 4)); new_len = _dbus_string_get_length (&dstr); @@ -475,7 +475,7 @@ _dbus_assert (pos + 4 <= _dbus_string_get_length (str)); return _dbus_unpack_uint32 (byte_order, - _dbus_string_get_const_data (str) + pos); + (unsigned char *)_dbus_string_get_const_data (str) + pos); } /** @@ -753,7 +753,7 @@ else value_len = data_len + 1; /* value has a nul */ - _dbus_string_init_const_len (&value_str, value, value_len); + _dbus_string_init_const_len (&value_str, (char *)value, value_len); pos = insert_at; @@ -807,7 +807,8 @@ int *pos_after) { return marshal_len_followed_by_bytes (MARSHAL_AS_STRING, - str, insert_at, value, + str, insert_at, + (unsigned char *)value, strlen (value), byte_order, pos_after); } @@ -819,7 +820,8 @@ int *pos_after) { return marshal_len_followed_by_bytes (MARSHAL_AS_SIGNATURE, - str, insert_at, value, + str, insert_at, + (unsigned char *)value, strlen (value), DBUS_COMPILER_BYTE_ORDER, /* irrelevant */ pos_after); @@ -911,7 +913,7 @@ int pos; DBusString value_str; - _dbus_string_init_const_len (&value_str, value, n_elements); + _dbus_string_init_const_len (&value_str, (char *)value, n_elements); pos = insert_at; @@ -1032,7 +1034,7 @@ goto error; _dbus_string_init_const_len (&t, - (const unsigned char*) value, + (char*) value, len_in_bytes); if (!_dbus_string_copy (&t, 0, @@ -1478,7 +1480,7 @@ d = _dbus_string_get_const_data_len (str, start, len); - _dbus_verbose_bytes (d, len, start); + _dbus_verbose_bytes ((unsigned char *)d, len, start); } static int @@ -1631,9 +1633,9 @@ _dbus_verbose_bytes_of_string (&str, dump_pos, \ _dbus_string_get_length (&str) - dump_pos); \ _dbus_verbose ("LITERAL DATA\n"); \ - _dbus_verbose_bytes ((char*)literal, sizeof (literal), 0); \ + _dbus_verbose_bytes ((unsigned char*)literal, sizeof (literal), 0); \ _dbus_verbose ("READ DATA\n"); \ - _dbus_verbose_bytes ((char*)v_ARRAY_##typename, sizeof (literal), 0); \ + _dbus_verbose_bytes ((unsigned char*)v_ARRAY_##typename, sizeof (literal), 0); \ _dbus_assert_not_reached ("demarshaled wrong fixed array value"); \ } \ } while (0) @@ -1754,13 +1756,13 @@ /* Arrays */ MARSHAL_TEST_FIXED_ARRAY (INT16, DBUS_BIG_ENDIAN, array2); MARSHAL_TEST_FIXED_ARRAY (INT16, DBUS_LITTLE_ENDIAN, array2); - MARSHAL_TEST_FIXED_ARRAY (UINT16, DBUS_BIG_ENDIAN, array2); - MARSHAL_TEST_FIXED_ARRAY (UINT16, DBUS_LITTLE_ENDIAN, array2); + MARSHAL_TEST_FIXED_ARRAY (UINT16, DBUS_BIG_ENDIAN, (dbus_uint16_t *)array2); + MARSHAL_TEST_FIXED_ARRAY (UINT16, DBUS_LITTLE_ENDIAN, (dbus_uint16_t *)array2); MARSHAL_TEST_FIXED_ARRAY (INT32, DBUS_BIG_ENDIAN, array4); MARSHAL_TEST_FIXED_ARRAY (INT32, DBUS_LITTLE_ENDIAN, array4); - MARSHAL_TEST_FIXED_ARRAY (UINT32, DBUS_BIG_ENDIAN, array4); - MARSHAL_TEST_FIXED_ARRAY (UINT32, DBUS_LITTLE_ENDIAN, array4); + MARSHAL_TEST_FIXED_ARRAY (UINT32, DBUS_BIG_ENDIAN, (dbus_uint32_t *)array4); + MARSHAL_TEST_FIXED_ARRAY (UINT32, DBUS_LITTLE_ENDIAN, (dbus_uint32_t *)array4); MARSHAL_TEST_FIXED_ARRAY (BYTE, DBUS_BIG_ENDIAN, array1); MARSHAL_TEST_FIXED_ARRAY (BYTE, DBUS_LITTLE_ENDIAN, array1); Index: dbus/dbus-marshal-byteswap.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-marshal-byteswap.c,v retrieving revision 1.5 diff -u -r1.5 dbus-marshal-byteswap.c --- dbus/dbus-marshal-byteswap.c 16 Jun 2005 04:27:45 -0000 1.5 +++ dbus/dbus-marshal-byteswap.c 7 Sep 2006 22:44:32 -0000 @@ -164,7 +164,7 @@ sig_len = *p; ++p; - _dbus_string_init_const_len (&sig, p, sig_len); + _dbus_string_init_const_len (&sig, (char *)p, sig_len); p += (sig_len + 1); /* 1 for nul */ @@ -237,7 +237,7 @@ byteswap_body_helper (&reader, TRUE, old_byte_order, new_byte_order, - _dbus_string_get_data_len (value_str, value_pos, 0), + (unsigned char *)_dbus_string_get_data_len (value_str, value_pos, 0), NULL); } Index: dbus/dbus-marshal-header.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-marshal-header.c,v retrieving revision 1.15 diff -u -r1.15 dbus-marshal-header.c --- dbus/dbus-marshal-header.c 27 Oct 2005 16:35:43 -0000 1.15 +++ dbus/dbus-marshal-header.c 7 Sep 2006 22:44:33 -0000 @@ -1426,7 +1426,7 @@ { unsigned char *flags_p; - flags_p = _dbus_string_get_data_len (&header->data, FLAGS_OFFSET, 1); + flags_p = (unsigned char *)_dbus_string_get_data_len (&header->data, FLAGS_OFFSET, 1); if (value) *flags_p |= flag; @@ -1447,7 +1447,7 @@ { const unsigned char *flags_p; - flags_p = _dbus_string_get_const_data_len (&header->data, FLAGS_OFFSET, 1); + flags_p = (unsigned char *)_dbus_string_get_const_data_len (&header->data, FLAGS_OFFSET, 1); return (*flags_p & flag) != 0; } Index: dbus/dbus-marshal-recursive.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-marshal-recursive.c,v retrieving revision 1.51 diff -u -r1.51 dbus-marshal-recursive.c --- dbus/dbus-marshal-recursive.c 3 Aug 2006 20:34:36 -0000 1.51 +++ dbus/dbus-marshal-recursive.c 7 Sep 2006 22:44:36 -0000 @@ -212,7 +212,7 @@ _dbus_assert (_DBUS_ALIGN_VALUE (len_pos, 4) == (unsigned) len_pos); array_len = _dbus_unpack_uint32 (reader->byte_order, - _dbus_string_get_const_data_len (reader->value_str, len_pos, 4)); + (unsigned char *)_dbus_string_get_const_data_len (reader->value_str, len_pos, 4)); #if RECURSIVE_MARSHAL_READ_TRACE _dbus_verbose (" reader %p len_pos %d array len %u len_offset %d\n", @@ -335,7 +335,7 @@ _dbus_assert (type_str != NULL); _dbus_assert (type_pos != NULL); - start = type_str; + start = (unsigned char *)type_str; p = start + *type_pos; _dbus_assert (*p != DBUS_STRUCT_END_CHAR); @@ -950,9 +950,9 @@ { _dbus_assert (!reader->klass->types_only); - *value_location = _dbus_string_get_const_data_len (reader->value_str, - reader->value_pos, - 0); + *value_location = (unsigned char *)_dbus_string_get_const_data_len (reader->value_str, + reader->value_pos, + 0); } /** @@ -2010,7 +2010,7 @@ _dbus_assert (_DBUS_ALIGN_VALUE (sub->u.array.len_pos, 4) == (unsigned) sub->u.array.len_pos); len = _dbus_unpack_uint32 (sub->byte_order, - _dbus_string_get_const_data_len (sub->value_str, + (unsigned char *)_dbus_string_get_const_data_len (sub->value_str, sub->u.array.len_pos, 4)); @@ -2655,7 +2655,7 @@ (unsigned) fixup.len_pos_in_reader); old_len = _dbus_unpack_uint32 (reader->byte_order, - _dbus_string_get_const_data_len (reader->value_str, + (unsigned char *)_dbus_string_get_const_data_len (reader->value_str, fixup.len_pos_in_reader, 4)); if (old_len != fixup.new_len && !append_fixup (fixups, &fixup)) Index: dbus/dbus-marshal-validate.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-marshal-validate.c,v retrieving revision 1.23 diff -u -r1.23 dbus-marshal-validate.c --- dbus/dbus-marshal-validate.c 3 Aug 2006 20:34:36 -0000 1.23 +++ dbus/dbus-marshal-validate.c 7 Sep 2006 22:44:37 -0000 @@ -82,9 +82,9 @@ goto out; } - p = _dbus_string_get_const_data_len (type_str, type_pos, 0); + p = (unsigned char *)_dbus_string_get_const_data_len (type_str, type_pos, 0); - end = _dbus_string_get_const_data_len (type_str, type_pos + len, 0); + end = (unsigned char *)_dbus_string_get_const_data_len (type_str, type_pos + len, 0); struct_depth = 0; array_depth = 0; dict_entry_depth = 0; @@ -231,7 +231,7 @@ { if (*p == DBUS_TYPE_ARRAY && p != end) { - const char *p1; + const unsigned char *p1; p1 = p + 1; if (*p1 == DBUS_STRUCT_END_CHAR || *p1 == DBUS_DICT_ENTRY_END_CHAR) @@ -383,7 +383,7 @@ if (current_type == DBUS_TYPE_OBJECT_PATH) { DBusString str; - _dbus_string_init_const_len (&str, p, claimed_len); + _dbus_string_init_const_len (&str, (char *)p, claimed_len); if (!_dbus_validate_path (&str, 0, _dbus_string_get_length (&str))) return DBUS_INVALID_BAD_PATH; @@ -393,7 +393,7 @@ else if (current_type == DBUS_TYPE_STRING) { DBusString str; - _dbus_string_init_const_len (&str, p, claimed_len); + _dbus_string_init_const_len (&str, (char *)p, claimed_len); if (!_dbus_string_validate_utf8 (&str, 0, _dbus_string_get_length (&str))) return DBUS_INVALID_BAD_UTF8_IN_STRING; @@ -459,7 +459,7 @@ if (claimed_len + 1 > (unsigned long) (end - p)) return DBUS_INVALID_SIGNATURE_LENGTH_OUT_OF_BOUNDS; - _dbus_string_init_const_len (&str, p, claimed_len); + _dbus_string_init_const_len (&str, (char *)p, claimed_len); validity = _dbus_validate_signature_with_reason (&str, 0, _dbus_string_get_length (&str)); @@ -503,7 +503,7 @@ if (claimed_len + 1 > (unsigned long) (end - p)) return DBUS_INVALID_VARIANT_SIGNATURE_LENGTH_OUT_OF_BOUNDS; - _dbus_string_init_const_len (&sig, p, claimed_len); + _dbus_string_init_const_len (&sig, (char *)p, claimed_len); reason = _dbus_validate_signature_with_reason (&sig, 0, _dbus_string_get_length (&sig)); if (!(reason == DBUS_VALID)) @@ -651,7 +651,7 @@ _dbus_type_reader_init_types_only (&reader, expected_signature, expected_signature_start); - p = _dbus_string_get_const_data_len (value_str, value_pos, len); + p = (unsigned char *)_dbus_string_get_const_data_len (value_str, value_pos, len); end = p + len; validity = validate_body_helper (&reader, byte_order, TRUE, p, end, &p); @@ -726,7 +726,7 @@ if (len == 0) return FALSE; - s = _dbus_string_get_const_data (str) + start; + s = (unsigned char *)_dbus_string_get_const_data (str) + start; end = s + len; if (*s != '/') @@ -796,7 +796,7 @@ return FALSE; last_dot = NULL; - iface = _dbus_string_get_const_data (str) + start; + iface = (unsigned char *)_dbus_string_get_const_data (str) + start; end = iface + len; s = iface; @@ -870,7 +870,7 @@ if (len == 0) return FALSE; - member = _dbus_string_get_const_data (str) + start; + member = (unsigned char *)_dbus_string_get_const_data (str) + start; end = member + len; s = member; @@ -974,7 +974,7 @@ return FALSE; last_dot = NULL; - iface = _dbus_string_get_const_data (str) + start; + iface = (unsigned char *)_dbus_string_get_const_data (str) + start; end = iface + len; s = iface; Index: dbus/dbus-message-factory.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-message-factory.c,v retrieving revision 1.10 diff -u -r1.10 dbus-message-factory.c --- dbus/dbus-message-factory.c 12 Jul 2006 16:52:44 -0000 1.10 +++ dbus/dbus-message-factory.c 7 Sep 2006 22:44:38 -0000 @@ -868,6 +868,8 @@ return TRUE; } +#if 0 +/* code not used now but may be in the future */ static dbus_bool_t find_next_typecode (DBusMessageDataIter *iter, DBusString *data, @@ -926,6 +928,7 @@ return TRUE; } +#endif static const int typecodes[] = { DBUS_TYPE_INVALID, @@ -949,7 +952,9 @@ DBUS_DICT_ENTRY_END_CHAR, 255 /* random invalid typecode */ }; - + +#if 0 +/* not used right now but may be in the future */ static dbus_bool_t generate_typecode_changed (DBusMessageDataIter *iter, DBusString *data, @@ -1006,6 +1011,7 @@ *expected_validity = DBUS_VALIDITY_UNKNOWN; return TRUE; } +#endif typedef struct { Index: dbus/dbus-server.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-server.c,v retrieving revision 1.44 diff -u -r1.44 dbus-server.c --- dbus/dbus-server.c 6 Sep 2006 00:14:06 -0000 1.44 +++ dbus/dbus-server.c 7 Sep 2006 22:44:38 -0000 @@ -129,7 +129,7 @@ init_guid (&server->guid); - _dbus_string_init_const_len (&guid_raw, (signed char*) server->guid.as_bytes, + _dbus_string_init_const_len (&guid_raw, (char*) server->guid.as_bytes, sizeof (server->guid.as_bytes)); if (!_dbus_string_hex_encode (&guid_raw, 0, &server->guid_hex, Index: dbus/dbus-sha.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-sha.c,v retrieving revision 1.8 diff -u -r1.8 dbus-sha.c --- dbus/dbus-sha.c 15 Jan 2005 07:15:38 -0000 1.8 +++ dbus/dbus-sha.c 7 Sep 2006 22:44:39 -0000 @@ -459,7 +459,7 @@ sha_finish (context, digest); - if (!_dbus_string_append_len (results, digest, 20)) + if (!_dbus_string_append_len (results, (char *)digest, 20)) return FALSE; /* some kind of security paranoia, though it seems pointless @@ -523,7 +523,7 @@ DBusString expected_str; DBusString results; - _dbus_string_init_const_len (&input_str, input, input_len); + _dbus_string_init_const_len (&input_str, (char *)input, input_len); _dbus_string_init_const (&expected_str, expected); if (!_dbus_string_init (&results)) @@ -549,7 +549,7 @@ check_sha_str (const char *input, const char *expected) { - return check_sha_binary (input, strlen (input), expected); + return check_sha_binary ((unsigned char *)input, strlen (input), expected); } static dbus_bool_t Index: dbus/dbus-string-util.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-string-util.c,v retrieving revision 1.3 diff -u -r1.3 dbus-string-util.c --- dbus/dbus-string-util.c 25 Feb 2005 22:03:30 -0000 1.3 +++ dbus/dbus-string-util.c 7 Sep 2006 22:44:39 -0000 @@ -184,7 +184,7 @@ int end; if (len < 0) - len = strlen (data); + len = strlen ((char *)data); if (!_dbus_string_init (&orig)) _dbus_assert_not_reached ("could not init string"); @@ -195,7 +195,7 @@ if (!_dbus_string_init (&decoded)) _dbus_assert_not_reached ("could not init string"); - if (!_dbus_string_append_len (&orig, data, len)) + if (!_dbus_string_append_len (&orig, (char *)data, len)) _dbus_assert_not_reached ("couldn't append orig data"); if (!_dbus_string_hex_encode (&orig, 0, &encoded, 0)) @@ -230,24 +230,24 @@ static void test_roundtrips (TestRoundtripFunc func) { - (* func) ("Hello this is a string\n", -1); - (* func) ("Hello this is a string\n1", -1); - (* func) ("Hello this is a string\n12", -1); - (* func) ("Hello this is a string\n123", -1); - (* func) ("Hello this is a string\n1234", -1); - (* func) ("Hello this is a string\n12345", -1); - (* func) ("", 0); - (* func) ("1", 1); - (* func) ("12", 2); - (* func) ("123", 3); - (* func) ("1234", 4); - (* func) ("12345", 5); - (* func) ("", 1); - (* func) ("1", 2); - (* func) ("12", 3); - (* func) ("123", 4); - (* func) ("1234", 5); - (* func) ("12345", 6); + (* func) ((unsigned char *)"Hello this is a string\n", -1); + (* func) ((unsigned char *)"Hello this is a string\n1", -1); + (* func) ((unsigned char *)"Hello this is a string\n12", -1); + (* func) ((unsigned char *)"Hello this is a string\n123", -1); + (* func) ((unsigned char *)"Hello this is a string\n1234", -1); + (* func) ((unsigned char *)"Hello this is a string\n12345", -1); + (* func) ((unsigned char *)"", 0); + (* func) ((unsigned char *)"1", 1); + (* func) ((unsigned char *)"12", 2); + (* func) ((unsigned char *)"123", 3); + (* func) ((unsigned char *)"1234", 4); + (* func) ((unsigned char *)"12345", 5); + (* func) ((unsigned char *)"", 1); + (* func) ((unsigned char *)"1", 2); + (* func) ((unsigned char *)"12", 3); + (* func) ((unsigned char *)"123", 4); + (* func) ((unsigned char *)"1234", 5); + (* func) ((unsigned char *)"12345", 6); { unsigned char buf[512]; int i; Index: dbus/dbus-sysdeps.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps.c,v retrieving revision 1.111 diff -u -r1.111 dbus-sysdeps.c --- dbus/dbus-sysdeps.c 7 Sep 2006 18:24:11 -0000 1.111 +++ dbus/dbus-sysdeps.c 7 Sep 2006 22:44:40 -0000 @@ -947,7 +947,7 @@ { #ifdef SO_PEERCRED struct ucred cr; - int cr_len = sizeof (cr); + size_t cr_len = sizeof (cr); if (getsockopt (client_fd, SOL_SOCKET, SO_PEERCRED, &cr, &cr_len) == 0 && cr_len == sizeof (cr)) @@ -2470,7 +2470,7 @@ pseudorandom_generate_random_bytes_buffer (char *buffer, int n_bytes) { - unsigned long tv_usec; + long tv_usec; int i; /* fall back to pseudorandom */ Index: dbus/dbus-userdb.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-userdb.c,v retrieving revision 1.19 diff -u -r1.19 dbus-userdb.c --- dbus/dbus-userdb.c 6 Mar 2006 19:06:45 -0000 1.19 +++ dbus/dbus-userdb.c 7 Sep 2006 22:44:40 -0000 @@ -75,11 +75,11 @@ */ dbus_bool_t _dbus_is_a_number (const DBusString *str, - unsigned long *num) + unsigned long *num) { int end; - if (_dbus_string_parse_int (str, 0, num, &end) && + if (_dbus_string_parse_int (str, 0, (long *)num, &end) && end == _dbus_string_get_length (str)) return TRUE; else Index: test/name-test/test-threads-init.c =================================================================== RCS file: /cvs/dbus/dbus/test/name-test/test-threads-init.c,v retrieving revision 1.1 diff -u -r1.1 test-threads-init.c --- test/name-test/test-threads-init.c 16 Aug 2006 22:30:15 -0000 1.1 +++ test/name-test/test-threads-init.c 7 Sep 2006 22:44:41 -0000 @@ -8,6 +8,7 @@ #include #include +#include static void _run_iteration (DBusConnection *conn) @@ -107,9 +108,6 @@ int main (int argc, char *argv[]) { - long start_tv_sec, start_tv_usec; - long end_tv_sec, end_tv_usec; - int i; DBusMessage *method; DBusConnection *conn; DBusError error;