I’ve been compiling nightlies for a while and my FC4box gives annoying information about referencing type punned pointer.
dispatch.c:964: warning: dereferencing type-punned pointer will break strict-aliasing rules
dispatch.c:893: warning: dereferencing type-punned pointer will break strict-alliasing rules
I just googled “type punning” and found some kind solution to fix it. I’m not a coder so this “patch” may break something ? Anyway I’m using it right now and as far as I know it works…
— src/dispatch.c 2006-03-07 09:04:33.000000000 +0200
+++ src/dispatch.c 2006-03-11 09:17:19.000000000 +0200
@@ -890,7 +890,7 @@
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));
@@ -961,7 +961,7 @@
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_delete_playlist_item(NULL,pqi->playlist_id,atoi(token));