You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Chris Richardson (JIRA)" <ji...@apache.org> on 2018/05/10 10:12:00 UTC
[jira] [Updated] (QPID-8187) Incompatible callback function pointer
casts fail to build on GCC 8
[ https://issues.apache.org/jira/browse/QPID-8187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Richardson updated QPID-8187:
-----------------------------------
Environment: Gentoo x64, GCC 8.1 (was: Gentoo x64)
Description:
{quote}[ 22%] Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/epoll/EpollPoller.cpp.o
/home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp: In constructor ‘qpid::CyrusSasl::CyrusSasl(const string&, const string&, const string&, const string&, int, int, bool)’:
/home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp:215:46: error: cast between incompatible function types from ‘int (*)(void*, int, const char**, unsigned int*)’ to ‘int (*)()’ [-Werror=cast-function-type]
callbacks[i].proc = (CallbackProc*) &getUserFromSettings;
^~~~~~~~~~~~~~~~~~~
/home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp:223:50: error: cast between incompatible function types from ‘int (*)(sasl_conn_t*, void*, int, sasl_secret_t**)’ {aka ‘int (*)(sasl_conn*, void*, int, sasl_secret**)’} to ‘int (*)()’ [-Werror=cast-function-type]
callbacks[i].proc = (CallbackProc*) &getPasswordFromSettings;
^~~~~~~~~~~~~~~~~~~~~~
{quote}
Given the constrains of the SASL library interface, the only obvious solution for this I can think of is to add "-Wno-error=cast-function-type" to the compiler settings.
was:
[ 22%] Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/epoll/EpollPoller.cpp.o
/home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp: In constructor ‘qpid::CyrusSasl::CyrusSasl(const string&, const string&, const string&, const string&, int, int, bool)’:
/home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp:215:46: error: cast between incompatible function types from ‘int (*)(void*, int, const char**, unsigned int*)’ to ‘int (*)()’ [-Werror=cast-function-type]
callbacks[i].proc = (CallbackProc*) &getUserFromSettings;
^~~~~~~~~~~~~~~~~~~
/home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp:223:50: error: cast between incompatible function types from ‘int (*)(sasl_conn_t*, void*, int, sasl_secret_t**)’ \{aka ‘int (*)(sasl_conn*, void*, int, sasl_secret**)’} to ‘int (*)()’ [-Werror=cast-function-type]
callbacks[i].proc = (CallbackProc*) &getPasswordFromSettings;
^~~~~~~~~~~~~~~~~~~~~~~
Given the constrains of the SASL library interface, the only obvious solution for this I can think of is to add "-Wno-error=cast-function-type" to the compiler settings.
> Incompatible callback function pointer casts fail to build on GCC 8
> -------------------------------------------------------------------
>
> Key: QPID-8187
> URL: https://issues.apache.org/jira/browse/QPID-8187
> Project: Qpid
> Issue Type: Bug
> Affects Versions: qpid-cpp-1.38.0
> Environment: Gentoo x64, GCC 8.1
> Reporter: Chris Richardson
> Priority: Major
> Fix For: qpid-cpp-1.39.0
>
>
> {quote}[ 22%] Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/epoll/EpollPoller.cpp.o
> /home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp: In constructor ‘qpid::CyrusSasl::CyrusSasl(const string&, const string&, const string&, const string&, int, int, bool)’:
> /home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp:215:46: error: cast between incompatible function types from ‘int (*)(void*, int, const char**, unsigned int*)’ to ‘int (*)()’ [-Werror=cast-function-type]
> callbacks[i].proc = (CallbackProc*) &getUserFromSettings;
> ^~~~~~~~~~~~~~~~~~~
> /home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/SaslFactory.cpp:223:50: error: cast between incompatible function types from ‘int (*)(sasl_conn_t*, void*, int, sasl_secret_t**)’ {aka ‘int (*)(sasl_conn*, void*, int, sasl_secret**)’} to ‘int (*)()’ [-Werror=cast-function-type]
> callbacks[i].proc = (CallbackProc*) &getPasswordFromSettings;
> ^~~~~~~~~~~~~~~~~~~~~~
> {quote}
> Given the constrains of the SASL library interface, the only obvious solution for this I can think of is to add "-Wno-error=cast-function-type" to the compiler settings.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org