Merge pull request #21505 from georgthegreat:patch-1

pull/21512/head
Alexander Alekhin 3 years ago
commit e67593673f
  1. 13
      modules/core/include/opencv2/core/core_c.h

@ -48,16 +48,19 @@
#include "opencv2/core/types_c.h" #include "opencv2/core/types_c.h"
#ifdef __cplusplus #ifdef __cplusplus
# ifdef _MSC_VER /* disable MSVC warning C4190 / clang-cl -Wreturn-type-c-linkage:
/* disable warning C4190: 'function' has C-linkage specified, but returns UDT 'typename' 'function' has C-linkage specified, but returns UDT 'typename'
which is incompatible with C which is incompatible with C
It is OK to disable it because we only extend few plain structures with It is OK to disable it because we only extend few plain structures with
C++ constructors for simpler interoperability with C++ API of the library C++ constructors for simpler interoperability with C++ API of the library
*/ */
# pragma warning(disable:4190) # if defined(__clang__)
# elif defined __clang__ && __clang_major__ >= 3 // handle clang on Linux and clang-cl (i. e. clang on Windows) first
# pragma GCC diagnostic ignored "-Wreturn-type-c-linkage" # pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
# elif defined(_MSC_VER)
// then handle MSVC
# pragma warning(disable:4190)
# endif # endif
#endif #endif

Loading…
Cancel
Save