diff --git a/modules/videoio/src/cap_gstreamer.cpp b/modules/videoio/src/cap_gstreamer.cpp index af947a8e16..e24758d326 100644 --- a/modules/videoio/src/cap_gstreamer.cpp +++ b/modules/videoio/src/cap_gstreamer.cpp @@ -97,6 +97,11 @@ static void handleMessage(GstElement * pipeline); namespace { +#if defined __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunused-function" +#endif + template static inline void GSafePtr_addref(T* ptr) { if (ptr) @@ -125,6 +130,10 @@ template<> inline void GSafePtr_release(GstEncoding template<> inline void GSafePtr_addref(char* pPtr); // declaration only. not defined. should not be used template<> inline void GSafePtr_release(char** pPtr) { if (pPtr) { g_free(*pPtr); *pPtr = NULL; } } +#if defined __clang__ +# pragma clang diagnostic pop +#endif + template class GSafePtr {