2011-07-18 11:29:06

by Slawomir Bochenski

[permalink] [raw]
Subject: [PATCH obexd] Fix compiler warning

---
gobex/gobex.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gobex/gobex.c b/gobex/gobex.c
index 93be21f..173912f 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -643,8 +643,8 @@ static void handle_request(GObex *obex, GObexPacket *req)

op = g_obex_packet_get_operation(req, NULL);

- match = g_slist_find_custom(obex->req_handlers, GUINT_TO_POINTER(op),
- req_handler_cmpop);
+ match = g_slist_find_custom(obex->req_handlers,
+ GUINT_TO_POINTER((guint)op), req_handler_cmpop);
if (match) {
struct req_handler *handler = match->data;
handler->func(obex, req, handler->user_data);
--
1.7.4.1



2011-07-18 13:09:43

by Slawomir Bochenski

[permalink] [raw]
Subject: Re: [PATCH obexd] Fix compiler warning

On Mon, Jul 18, 2011 at 2:54 PM, Marcel Holtmann <[email protected]> wrote:
> what compiler warning does this fix. Lets fix this properly and not
> introduce more magic casting.
>
> Regards
>
> Marcel

Still - no longer valid. As I mentioned, Johan pushed his own fix for
this few minutes after I've sent patch.

--
Slawomir Bochenski

2011-07-18 12:54:09

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH obexd] Fix compiler warning

Hi Slawomir,

> gobex/gobex.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gobex/gobex.c b/gobex/gobex.c
> index 93be21f..173912f 100644
> --- a/gobex/gobex.c
> +++ b/gobex/gobex.c
> @@ -643,8 +643,8 @@ static void handle_request(GObex *obex, GObexPacket *req)
>
> op = g_obex_packet_get_operation(req, NULL);
>
> - match = g_slist_find_custom(obex->req_handlers, GUINT_TO_POINTER(op),
> - req_handler_cmpop);
> + match = g_slist_find_custom(obex->req_handlers,
> + GUINT_TO_POINTER((guint)op), req_handler_cmpop);

what compiler warning does this fix. Lets fix this properly and not
introduce more magic casting.

Regards

Marcel



2011-07-18 12:12:35

by Slawomir Bochenski

[permalink] [raw]
Subject: Re: [PATCH obexd] Fix compiler warning

Deprecated. I see that Johan committed similar fix few minutes after
I've sent that.

--
Slawomir Bochenski