element: fix GST_ELEMENT_ERROR() error code expansion
authorTim-Philipp Müller <tim@centricular.com>
Sun, 24 Jul 2016 00:35:41 +0000 (01:35 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 24 Jul 2016 00:35:41 +0000 (01:35 +0100)
commitd052ae63d8632b78e933a8447e5f2c8aa25a6c17
tree4c8ef5f8b5670a3d652bbb6345e70a502aa0aff6
parent12a10980b333bffb324ed1d8b3c8aae442a86056
element: fix GST_ELEMENT_ERROR() error code expansion

In some corner cases, the error 'code' part passed to
GST_ELEMENT_ERROR() is a valid define as well, in which
case it won't survive two levels of macro expansion, but
only one. Fixes:

oss4-sink.c: In function ‘gst_oss4_sink_open’:
error: ‘GST_RESOURCE_ERROR_0x00000002’ undeclared (first use in this function)
GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,

which is from GST_ELEMENT_ERROR(el,RESOURCE,OPEN_WRITE,..)
and OPEN_WRITE happens to be defined to 2 here.

https://bugzilla.gnome.org/show_bug.cgi?id=756806
https://bugzilla.gnome.org/show_bug.cgi?id=769117
gst/gstelement.h