After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 561599 - gst_bin_continue_func(...) takes wrong number of arguments
gst_bin_continue_func(...) takes wrong number of arguments
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-19 22:05 UTC by Andrew Feren
Modified: 2008-11-20 05:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add user_data argument to gst_bin_continue_func(...) (499 bytes, patch)
2008-11-19 22:08 UTC, Andrew Feren
none Details | Review

Description Andrew Feren 2008-11-19 22:05:50 UTC
in gstbin.c gst_bin_continue_func(...) takes a single argument, but is cast to a GFunc which expects two arguments.  Probably safer than expecting more arguments than get pushed, but why tempt fate.  ;-)
Comment 1 Andrew Feren 2008-11-19 22:08:10 UTC
Created attachment 123080 [details] [review]
add user_data argument to gst_bin_continue_func(...)

added G_GNUC_UNUSED to avoid warnings about the user_data variable that isn't currently being used.
Comment 2 Andrew Feren 2008-11-19 22:12:10 UTC
also just noticed unlink_pads(...) is also short an user_data argument.
Comment 3 David Schleef 2008-11-19 23:37:49 UTC
Calling a function that takes one argument by passing it more than one argument is guaranteed to work according to the C specification.  It's pretty commonly used with GFunc, too.  For example, people cast g_free() to GFunc quite frequently.
Comment 4 Andrew Feren 2008-11-20 05:49:28 UTC
Thanks for the clarification.  Been a while since I poked around in that corner of C.