Skip to content

Commit e1dc6c2

Browse files
fix
1 parent 7d84ec5 commit e1dc6c2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • examples/cpp/example.cpp.cstring.dynload

examples/cpp/example.cpp.cstring.dynload/main.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,19 @@ static int main_(int /* argc */, char ** /*argv*/)
102102
CSTRING_RC (*_yield)(cstring_t* pcs, char** );
103103
CSTRING_RC (*_createEx)(cstring_t* , char const* , size_t , void* , size_t );
104104

105+
#if defined(__GNUC__)
106+
# pragma GCC diagnostic push
107+
# pragma GCC diagnostic ignored "-Wcast-function-type"
108+
#endif /* __GNUC__ */
109+
105110
(FARPROC&)(_create) = ::GetProcAddress(hinst, "cstring_create");
106111
(FARPROC&)(_createEx) = ::GetProcAddress(hinst, "cstring_createEx");
107112
(FARPROC&)(_yield) = ::GetProcAddress(hinst, "cstring_yield");
108113

114+
#if defined(__GNUC__)
115+
# pragma GCC diagnostic pop
116+
#endif /* __GNUC__ */
117+
109118
if (NULL != _create &&
110119
NULL != _yield)
111120
{

0 commit comments

Comments
 (0)