From: <enl...@li...> - 2005-06-10 02:41:45
|
Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore Dir : e17/libs/ecore/src/lib/ecore_dbus Modified Files: Ecore_DBus.h ecore_dbus.c Log Message: Compiler warnings. The use of unsigned char vs. char seems a bit messy. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_dbus/Ecore_DBus.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Ecore_DBus.h 29 Apr 2005 05:29:29 -0000 1.1 +++ Ecore_DBus.h 10 Jun 2005 02:41:37 -0000 1.2 @@ -92,7 +92,7 @@ struct _Ecore_DBus_Auth { - unsigned char *name; + char *name; unsigned int num_transactions; Ecore_DBus_Auth_Transaction transactions[5]; }; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_dbus/ecore_dbus.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- ecore_dbus.c 22 May 2005 03:01:59 -0000 1.2 +++ ecore_dbus.c 10 Jun 2005 02:41:37 -0000 1.3 @@ -280,7 +280,7 @@ _ecore_dbus_message_append_byte(*buf + *old_length, ECORE_DBUS_DATA_TYPE_OBJECT_PATH); // append the data type *old_length += 1; - str_len = strlen(str); + str_len = strlen((char *)str); _ecore_dbus_message_4byte_padding(buf, old_length); _ecore_dbus_message_increase_length(buf, *old_length + 4); f = _ecore_dbus_message_new_field(ECORE_DBUS_DATA_TYPE_OBJECT_PATH, @@ -305,7 +305,7 @@ _ecore_dbus_message_append_byte(*buf + *old_length, ECORE_DBUS_DATA_TYPE_STRING); // append the data type *old_length += 1; // old_length = new_length - str_len = strlen(str); + str_len = strlen((char *)str); _ecore_dbus_message_4byte_padding(buf, old_length); _ecore_dbus_message_increase_length(buf, *old_length + 4); f = _ecore_dbus_message_new_field(ECORE_DBUS_DATA_TYPE_STRING, *old_length); @@ -838,12 +838,12 @@ break; case ECORE_DBUS_DATA_TYPE_STRING: f = _ecore_dbus_message_marshal_string(&msg->body, &msg->bpos, - va_arg(ap, char *)); + (unsigned char *)va_arg(ap, char *)); msg->body_fields = _ecore_list_append(msg->body_fields, f); break; case ECORE_DBUS_DATA_TYPE_OBJECT_PATH: f = _ecore_dbus_message_marshal_path(&msg->body, &msg->bpos, - va_arg(ap, char *)); + (unsigned char *)va_arg(ap, char *)); msg->body_fields = _ecore_list_append(msg->body_fields, f); break; case ECORE_DBUS_DATA_TYPE_INVALID: @@ -869,9 +869,9 @@ * _ecore_dbus_message_print_raw(msg->header,msg->hlength); * _ecore_dbus_message_print_raw(msg->body,msg->blength); */ /* send message */ - ecore_dbus_server_send(svr, msg->header, msg->hlength); + ecore_dbus_server_send(svr, (char *)msg->header, msg->hlength); if (msg->body) - ecore_dbus_server_send(svr, msg->body, msg->blength); + ecore_dbus_server_send(svr, (char *)msg->body, msg->blength); /* free data TODO free the list of fields */ /*for(i=0; i<8; i++) * free(msg->header_fields[i]); @@ -939,18 +939,18 @@ return enc_str; } -unsigned char * +unsigned char * _ecore_dbus_auth_external(void *data) { - char *uid, *enc_uid, *msg; + char *uid, *enc_uid, *msg; uid = _ecore_dbus_getuid(); enc_uid = _ecore_dbus_hex_encode(uid); free(uid); - msg = (char *)malloc(strlen(enc_uid) + 17); + msg = malloc(strlen(enc_uid) + 17); sprintf(msg, "AUTH EXTERNAL %s\r\n", enc_uid); free(enc_uid); - return msg; + return (unsigned char *)msg; } /*****************************/ @@ -1202,7 +1202,7 @@ trans = auth->transactions[0]; printf("[ecore_dbus] auth type %s started\n", auth->name); msg = trans(NULL); - ecore_dbus_server_send(svr, msg, strlen(msg)); + ecore_dbus_server_send(svr, (char *)msg, strlen((char *)msg)); free(msg); } |