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

Live block computation #227

Open
amallia opened this issue Jul 19, 2019 · 3 comments
Open

Live block computation #227

amallia opened this issue Jul 19, 2019 · 3 comments
Labels
bug Something isn't working priority:low

Comments

@amallia
Copy link
Member

amallia commented Jul 19, 2019

Describe the bug

for (int i = 0; i < live_blocks.size(); ++i) {

Local variable i shadows outer variable.

@amallia amallia added the bug Something isn't working label Jul 19, 2019
@wanghenshui
Copy link

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-compare")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")

may helpful

@elshize
Copy link
Member

elshize commented Sep 19, 2019

@wanghenshui I'm all for extensive warnings, but do you have any idea if we can suppress warnings in the header-only libraries we depend on?

@wanghenshui
Copy link

suppress warnings in the header

https://stackoverflow.com/questions/1867065/how-to-suppress-gcc-warnings-from-library-headers

// save diagnostic state
#pragma GCC diagnostic push 

// turn off the specific warning. Can also use "-Wall"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"

#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/lexical_cast.hpp>

// turn the warnings back on
#pragma GCC diagnostic pop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:low
Projects
None yet
Development

No branches or pull requests

3 participants