mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-03 05:05:52 +00:00
info: fix compiler warning with -Wpedantic and gcc 5
Gstreamer compiled with gcc 5.2 and -Wpedantic produces the following warning: 'ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic] const char *s = __FUNCTION__;' Since gcc 5 enables C99 by default, use __func__ if it's available instead of the non-standard __FUNCTION__ (as suggested in [2]). [1]: https://gcc.gnu.org/gcc-5/changes.html [2]: https://gcc.gnu.org/gcc-5/porting_to.html https://bugzilla.gnome.org/show_bug.cgi?id=758541
This commit is contained in:
parent
8249c6db0e
commit
7e2aae7942
|
@ -250,10 +250,10 @@ struct _GstDebugCategory {
|
||||||
* function signature in C++ code.
|
* function signature in C++ code.
|
||||||
*/
|
*/
|
||||||
#ifndef GST_FUNCTION
|
#ifndef GST_FUNCTION
|
||||||
#if defined (__GNUC__) || (defined (_MSC_VER) && _MSC_VER >= 1300)
|
#if defined (__STDC__) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
# define GST_FUNCTION ((const char*) (__FUNCTION__))
|
|
||||||
#elif defined (__STDC__) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
||||||
# define GST_FUNCTION ((const char*) (__func__))
|
# define GST_FUNCTION ((const char*) (__func__))
|
||||||
|
#elif defined (__GNUC__) || (defined (_MSC_VER) && _MSC_VER >= 1300)
|
||||||
|
# define GST_FUNCTION ((const char*) (__FUNCTION__))
|
||||||
#else
|
#else
|
||||||
# define GST_FUNCTION ((const char*) ("???"))
|
# define GST_FUNCTION ((const char*) ("???"))
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue