On the left-hand side of your assignment you have widget->track_data_widget
, a member of TrackBoxWidget
(aka struct _track_box_widget
), of type TrackDataWidget*
.
On the right-hand side of your assignment you have track_data_widget
, the parameter of the track_box_widget_new
function, of type GtkWidget*
. Since the two pointers are of different types, a direct assignment between them is not allowed without a cast.