mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
fix for type punning warning on gcc 4, thanks to pietu
This commit is contained in:
parent
4927155787
commit
ae22cba1ae
@ -897,7 +897,7 @@ void dispatch_addplaylistitems(WS_CONNINFO *pwsc, DBQUERYINFO *pqi) {
|
|||||||
tempstring=strdup(ws_getvar(pwsc,"dmap.itemid"));
|
tempstring=strdup(ws_getvar(pwsc,"dmap.itemid"));
|
||||||
current=(unsigned char*)tempstring;
|
current=(unsigned char*)tempstring;
|
||||||
|
|
||||||
while((token=strsep((char**)¤t,","))) {
|
while((token=strsep((char**)(char*)¤t,","))) {
|
||||||
if(token) {
|
if(token) {
|
||||||
/* FIXME: error handling */
|
/* FIXME: error handling */
|
||||||
db_add_playlist_item(NULL,pqi->playlist_id,atoi(token));
|
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"));
|
tempstring=strdup(ws_getvar(pwsc,"dmap.itemid"));
|
||||||
current=(unsigned char *)tempstring;
|
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) {
|
if(token) {
|
||||||
/* FIXME: Error handling */
|
/* FIXME: Error handling */
|
||||||
db_delete_playlist_item(NULL,pqi->playlist_id,atoi(token));
|
db_delete_playlist_item(NULL,pqi->playlist_id,atoi(token));
|
||||||
|
Loading…
Reference in New Issue
Block a user