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

Compile error #151

Open
paulshapiro opened this issue Nov 22, 2024 · 1 comment
Open

Compile error #151

paulshapiro opened this issue Nov 22, 2024 · 1 comment

Comments

@paulshapiro
Copy link

Hey there,

Thought I'd mention that develop has a compile error that seems to be unintentional - where const memory of epee::byte_slice::data() is being asked to be used to initialize a mutable (non-const) object

#15 3.653 /monero-lws/src/rpc/scanner/connection.cpp: In member function 'boost::asio::mutable_buffer lws::rpc::scanner::connection::read_buffer(std::size_t)':
#15 3.653 /monero-lws/src/rpc/scanner/connection.cpp:58:54: warning: invalid conversion from 'const void*' to 'void*' [-fpermissive]
#15 3.653    58 |     return boost::asio::mutable_buffer(read_buf_.data(), size);
#15 3.653       |                                        ~~~~~~~~~~~~~~^~
#15 3.653       |                                                      |
#15 3.653       |                                                      const void*
#15 3.653 In file included from /monero-lws/src/rpc/scanner/connection.h:30,
#15 3.653                  from /monero-lws/src/rpc/scanner/connection.cpp:28:
#15 3.653 /usr/include/boost/asio/buffer.hpp:102:24: note:   initializing argument 1 of 'boost::asio::mutable_buffer::mutable_buffer(void*, std::size_t)'
#15 3.653   102 |   mutable_buffer(void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
#15 3.653       |                  ~~~~~~^~~~

return boost::asio::mutable_buffer(read_buf_.data(), size);

@vtnerd
Copy link
Owner

vtnerd commented Nov 22, 2024

This currently occurs if building develop LWS with release-v0.18 Monero. Switching to master Monero branch will compile. A PR for the release-v0.18 branch has been approved and is waiting a merge.

Typically LWS master and develop branches target the master branch of Monero - although some attempts are made to get those branches working against Monero release-* branches.

The release branches of LWS always target some release branch of Monero.

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

No branches or pull requests

2 participants