Skip to content

use microhttpd MHD_Result return type. fix: error: invalid conversion from int to MHD_Result#2

Open
milahu wants to merge 1 commit intomarcelscode:masterfrom
milahu:master
Open

use microhttpd MHD_Result return type. fix: error: invalid conversion from int to MHD_Result#2
milahu wants to merge 1 commit intomarcelscode:masterfrom
milahu:master

Conversation

@milahu
Copy link
Copy Markdown

@milahu milahu commented Nov 26, 2023

based on
cinemast/libjson-rpc-cpp#299

fix this build error

http_server.cc: In function 'MHD_Daemon* startupHttpDaemon(int)':
http_server.cc:722:31: error: invalid conversion from 'int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**)' {aka 'int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)'} to 'MHD_AccessHandlerCallback' {aka 'MHD_Result (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-fpermissive-fpermissive8;;]
  722 |                         NULL, &answerToConnection, NULL, MHD_OPTION_CONNECTION_TIMEOUT, 5, MHD_OPTION_END);
      |                               ^~~~~~~~~~~~~~~~~~~
      |                               |
      |                               int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**) {aka int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant