Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a type error that would not compile on OSX. #8513

Merged
merged 1 commit into from Aug 17, 2016

Conversation

JeremyRubin
Copy link
Contributor

I was unable to compile on OSX without having the proper type here.

@paveljanik
Copy link
Contributor

@JeremyRubin can you please paste exact error message?

@JeremyRubin
Copy link
Contributor Author

httprpc.cpp:234:5: error: no matching function for call to 'RegisterHTTPHandler'
    RegisterHTTPHandler("/", true, HTTPReq_JSONRPC);
    ^~~~~~~~~~~~~~~~~~~
./httpserver.h:41:6: note: candidate function not viable: no known conversion from 'bool (HTTPRequest *, const std::string &)' to 'const HTTPRequestHandler'
      (aka 'const function<void (HTTPRequest *, const std::string &)>') for 3rd argument
void RegisterHTTPHandler(const std::string &prefix, bool exactMatch, const HTTPRequestHandler &handler);
     ^
1 error generated.
make[1]: *** [libbitcoin_server_a-httprpc.o] Error 1
make: *** [all-recursive] Error 1

@paveljanik
Copy link
Contributor

Interesting. Can't reproduce here, but the change is obviously correct.

ACK 8194a6e

@JeremyRubin
Copy link
Contributor Author

@paveljanik

you have:

Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

on master?

@paveljanik
Copy link
Contributor

My clang is:

Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

@jonasschnelli
Copy link
Contributor

Can't reproduce either, but utACK.

Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@laanwj
Copy link
Member

laanwj commented Aug 17, 2016

This is safe: all functions that are registered with RegisterHTTPHandler return a bool.
ACK 8194a6e

@laanwj laanwj merged commit 8194a6e into bitcoin:master Aug 17, 2016
laanwj added a commit that referenced this pull request Aug 17, 2016
8194a6e Fix a type error that would not compile on Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) (Jeremy Rubin)
luke-jr pushed a commit to luke-jr/bitcoin that referenced this pull request Sep 21, 2016
…clang-602.0.53) (based on LLVM 3.6.0svn)

Github-Pull: bitcoin#8513
Rebased-From: 8194a6e
codablock pushed a commit to codablock/dash that referenced this pull request Jan 8, 2018
8194a6e Fix a type error that would not compile on Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) (Jeremy Rubin)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
8194a6e Fix a type error that would not compile on Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) (Jeremy Rubin)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants