OSDN Git Service

gobex: Fix compilation error with GPOINTER_TO_UINT
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 18 Jul 2011 10:35:16 +0000 (13:35 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 4 Dec 2012 21:22:02 +0000 (22:22 +0100)
Fixes the following issue seen on debian unstable:

gobex/gobex.c: In function 'handle_request':
gobex/gobex.c:646:50: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

gobex/gobex.c

index 93be21f..2a64849 100644 (file)
@@ -509,7 +509,7 @@ void g_obex_set_disconnect_function(GObex *obex, GObexFunc func,
 static gint req_handler_cmpop(gconstpointer a, gconstpointer b)
 {
        const struct req_handler *handler = a;
-       guint8 opcode = GPOINTER_TO_UINT(b);
+       guint opcode = GPOINTER_TO_UINT(b);
 
        return (gint) handler->opcode - (gint) opcode;
 }
@@ -636,7 +636,7 @@ static void handle_response(GObex *obex, GError *err, GObexPacket *rsp)
 static void handle_request(GObex *obex, GObexPacket *req)
 {
        GSList *match;
-       guint8 op;
+       guint op;
 
        if (g_obex_packet_get_operation(req, NULL) == G_OBEX_OP_CONNECT)
                parse_connect_data(obex, req);