From ae22cba1ae6c800c9cdade455eb13dd523f8b75c Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Sun, 12 Mar 2006 00:39:26 +0000 Subject: [PATCH] fix for type punning warning on gcc 4, thanks to pietu --- src/dispatch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dispatch.c b/src/dispatch.c index 45af0bce..55deb584 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -897,7 +897,7 @@ void dispatch_addplaylistitems(WS_CONNINFO *pwsc, DBQUERYINFO *pqi) { tempstring=strdup(ws_getvar(pwsc,"dmap.itemid")); current=(unsigned char*)tempstring; - while((token=strsep((char**)¤t,","))) { + while((token=strsep((char**)(char*)¤t,","))) { if(token) { /* FIXME: error handling */ db_add_playlist_item(NULL,pqi->playlist_id,atoi(token)); @@ -968,7 +968,8 @@ void dispatch_deleteplaylistitems(WS_CONNINFO *pwsc, DBQUERYINFO *pqi) { tempstring=strdup(ws_getvar(pwsc,"dmap.itemid")); current=(unsigned char *)tempstring; - while((token=strsep((char**)¤t,","))) { + /* this looks strange, but gets rid of gcc 4 warnings */ + while((token=strsep((char**)(char*)¤t,","))) { if(token) { /* FIXME: Error handling */ db_delete_playlist_item(NULL,pqi->playlist_id,atoi(token));