Created attachment 8387 Fix compiler warnings On FreeBSD (amd64) default compiler is clang, I get some warnings (bad cast, and duplicate declaration). For src/misc/parole-file.h I have a lot of warnings like this: >In file included from ../../src/parole-medialist.h:28: >../../src/misc/parole-file.h:78:1: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] >G_CONST_RETURN *parole_file_get_directory (const ParoleFile *file) G_GNUC_PURE; > ^ >/usr/local/include/glib-2.0/glib/gmacros.h:363:24: note: expanded from macro 'G_CONST_RETURN' >#define G_CONST_RETURN const > ^ In src/gst/parole-gst.c, I have >parole-gst.c:1504:41: warning: implicit conversion from enumeration type 'GstStateChangeReturn' to different enumeration type 'GstState' [-Wenum-conversion] > GST_STATE_RETURN(gst->priv->playbin), > ^~~~~~~~~~~~~~~~~~~~~~~~ >/usr/local/include/gstreamer-1.0/gst/gstelement.h:141:66: note: expanded from macro 'GST_STATE_RETURN' >#define GST_STATE_RETURN(elem) (GST_ELEMENT_CAST(elem)->last_return) > ~~~~~~~~~~~~~~~~~^~~~~~~ The documentation says GST_STATE_RETURN returns the last GstStateChangeReturn value. It is not GstState. In GstElement struct only ones GstState members are: - target_state - current_state - next_state I think new "state" be target_state member of GstElement.
Olivier Duchateau referenced this bugreport in commit 0947791e375342a2b5796c7a444204385fc6e8ba Fix compiler warnings (clang) (bug #15260)" https://git.xfce.org/apps/parole/commit?id=0947791e375342a2b5796c7a444204385fc6e8ba
Thanks for the patches! Applied above.