In file included from include/yaml-cpp/node/detail/node.h:14:0,
from src/node_data.cpp:7:
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_mark(const YAML::Mark&)’:
include/yaml-cpp/node/detail/node_ref.h:33:35: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow]
void set_mark(const Mark& mark) { m_pData->set_mark(mark); }
^
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_type(YAML::NodeType::value)’:
include/yaml-cpp/node/detail/node_ref.h:34:39: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow]
void set_type(NodeType::value type) { m_pData->set_type(type); }
^
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_tag(const string&)’:
include/yaml-cpp/node/detail/node_ref.h:35:40: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow]
void set_tag(const std::string& tag) { m_pData->set_tag(tag); }
^
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_scalar(const string&)’:
include/yaml-cpp/node/detail/node_ref.h:37:46: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow]
void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); }
^
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_style(YAML::EmitterStyle::value)’:
include/yaml-cpp/node/detail/node_ref.h:38:45: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow]
void set_style(EmitterStyle::value style) { m_pData->set_style(style); }
^
In file included from src/node_data.cpp:7:0:
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_mark(const YAML::Mark&)’:
include/yaml-cpp/node/detail/node.h:69:35: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow]
void set_mark(const Mark& mark) { m_pRef->set_mark(mark); }
^
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_type(YAML::NodeType::value)’:
include/yaml-cpp/node/detail/node.h:71:39: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow]
void set_type(NodeType::value type) {
^
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_scalar(const string&)’:
include/yaml-cpp/node/detail/node.h:80:46: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow]
void set_scalar(const std::string& scalar) {
^
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_tag(const string&)’:
include/yaml-cpp/node/detail/node.h:84:40: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow]
void set_tag(const std::string& tag) {
^
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_style(YAML::EmitterStyle::value)’:
include/yaml-cpp/node/detail/node.h:90:45: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow]
void set_style(EmitterStyle::value style) {
^
src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_mark(const YAML::Mark&)’:
src/node_data.cpp:31:42: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow]
void node_data::set_mark(const Mark& mark) { m_mark = mark; }
^
src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_type(YAML::NodeType::value)’:
src/node_data.cpp:33:46: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow]
void node_data::set_type(NodeType::value type) {
^
src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_tag(const string&)’:
src/node_data.cpp:64:47: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow]
void node_data::set_tag(const std::string& tag) { m_tag = tag; }
^
src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_style(YAML::EmitterStyle::value)’:
src/node_data.cpp:66:52: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow]
void node_data::set_style(EmitterStyle::value style) { m_style = style; }
^
src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_scalar(const string&)’:
src/node_data.cpp:73:53: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow]
void node_data::set_scalar(const std::string& scalar) {
^
CXX src/nodebuilder.cpp
In file included from include/yaml-cpp/node/detail/node.h:14:0,
from src/nodebuilder.cpp:5:
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_mark(const YAML::Mark&)’:
include/yaml-cpp/node/detail/node_ref.h:33:35: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow]
void set_mark(const Mark& mark) { m_pData->set_mark(mark); }
^
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_type(YAML::NodeType::value)’:
include/yaml-cpp/node/detail/node_ref.h:34:39: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow]
void set_type(NodeType::value type) { m_pData->set_type(type); }
^
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_tag(const string&)’:
include/yaml-cpp/node/detail/node_ref.h:35:40: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow]
void set_tag(const std::string& tag) { m_pData->set_tag(tag); }
^
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_scalar(const string&)’:
include/yaml-cpp/node/detail/node_ref.h:37:46: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow]
void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); }
^
include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_style(YAML::EmitterStyle::value)’:
include/yaml-cpp/node/detail/node_ref.h:38:45: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow]
void set_style(EmitterStyle::value style) { m_pData->set_style(style); }
^
In file included from src/nodebuilder.cpp:5:0:
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_mark(const YAML::Mark&)’:
include/yaml-cpp/node/detail/node.h:69:35: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow]
void set_mark(const Mark& mark) { m_pRef->set_mark(mark); }
^
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_type(YAML::NodeType::value)’:
include/yaml-cpp/node/detail/node.h:71:39: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow]
void set_type(NodeType::value type) {
^
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_scalar(const string&)’:
include/yaml-cpp/node/detail/node.h:80:46: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow]
void set_scalar(const std::string& scalar) {
^
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_tag(const string&)’:
include/yaml-cpp/node/detail/node.h:84:40: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow]
void set_tag(const std::string& tag) {
^
include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_style(YAML::EmitterStyle::value)’:
include/yaml-cpp/node/detail/node.h:90:45: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow]
void set_style(EmitterStyle::value style) {
^
CXX src/exp.cpp
Question
LearningRO
i got warning when compile server
In file included from include/yaml-cpp/node/detail/node.h:14:0, from src/node_data.cpp:7: include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_mark(const YAML::Mark&)’: include/yaml-cpp/node/detail/node_ref.h:33:35: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow] void set_mark(const Mark& mark) { m_pData->set_mark(mark); } ^ include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_type(YAML::NodeType::value)’: include/yaml-cpp/node/detail/node_ref.h:34:39: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow] void set_type(NodeType::value type) { m_pData->set_type(type); } ^ include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_tag(const string&)’: include/yaml-cpp/node/detail/node_ref.h:35:40: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow] void set_tag(const std::string& tag) { m_pData->set_tag(tag); } ^ include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_scalar(const string&)’: include/yaml-cpp/node/detail/node_ref.h:37:46: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow] void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); } ^ include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_style(YAML::EmitterStyle::value)’: include/yaml-cpp/node/detail/node_ref.h:38:45: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow] void set_style(EmitterStyle::value style) { m_pData->set_style(style); } ^ In file included from src/node_data.cpp:7:0: include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_mark(const YAML::Mark&)’: include/yaml-cpp/node/detail/node.h:69:35: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow] void set_mark(const Mark& mark) { m_pRef->set_mark(mark); } ^ include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_type(YAML::NodeType::value)’: include/yaml-cpp/node/detail/node.h:71:39: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow] void set_type(NodeType::value type) { ^ include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_scalar(const string&)’: include/yaml-cpp/node/detail/node.h:80:46: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow] void set_scalar(const std::string& scalar) { ^ include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_tag(const string&)’: include/yaml-cpp/node/detail/node.h:84:40: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow] void set_tag(const std::string& tag) { ^ include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_style(YAML::EmitterStyle::value)’: include/yaml-cpp/node/detail/node.h:90:45: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow] void set_style(EmitterStyle::value style) { ^ src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_mark(const YAML::Mark&)’: src/node_data.cpp:31:42: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow] void node_data::set_mark(const Mark& mark) { m_mark = mark; } ^ src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_type(YAML::NodeType::value)’: src/node_data.cpp:33:46: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow] void node_data::set_type(NodeType::value type) { ^ src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_tag(const string&)’: src/node_data.cpp:64:47: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow] void node_data::set_tag(const std::string& tag) { m_tag = tag; } ^ src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_style(YAML::EmitterStyle::value)’: src/node_data.cpp:66:52: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow] void node_data::set_style(EmitterStyle::value style) { m_style = style; } ^ src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_scalar(const string&)’: src/node_data.cpp:73:53: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow] void node_data::set_scalar(const std::string& scalar) { ^ CXX src/nodebuilder.cpp In file included from include/yaml-cpp/node/detail/node.h:14:0, from src/nodebuilder.cpp:5: include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_mark(const YAML::Mark&)’: include/yaml-cpp/node/detail/node_ref.h:33:35: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow] void set_mark(const Mark& mark) { m_pData->set_mark(mark); } ^ include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_type(YAML::NodeType::value)’: include/yaml-cpp/node/detail/node_ref.h:34:39: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow] void set_type(NodeType::value type) { m_pData->set_type(type); } ^ include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_tag(const string&)’: include/yaml-cpp/node/detail/node_ref.h:35:40: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow] void set_tag(const std::string& tag) { m_pData->set_tag(tag); } ^ include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_scalar(const string&)’: include/yaml-cpp/node/detail/node_ref.h:37:46: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow] void set_scalar(const std::string& scalar) { m_pData->set_scalar(scalar); } ^ include/yaml-cpp/node/detail/node_ref.h: In member function ‘void YAML::detail::node_ref::set_style(YAML::EmitterStyle::value)’: include/yaml-cpp/node/detail/node_ref.h:38:45: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow] void set_style(EmitterStyle::value style) { m_pData->set_style(style); } ^ In file included from src/nodebuilder.cpp:5:0: include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_mark(const YAML::Mark&)’: include/yaml-cpp/node/detail/node.h:69:35: warning: declaration of ‘mark’ shadows a member of 'this' [-Wshadow] void set_mark(const Mark& mark) { m_pRef->set_mark(mark); } ^ include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_type(YAML::NodeType::value)’: include/yaml-cpp/node/detail/node.h:71:39: warning: declaration of ‘type’ shadows a member of 'this' [-Wshadow] void set_type(NodeType::value type) { ^ include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_scalar(const string&)’: include/yaml-cpp/node/detail/node.h:80:46: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow] void set_scalar(const std::string& scalar) { ^ include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_tag(const string&)’: include/yaml-cpp/node/detail/node.h:84:40: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow] void set_tag(const std::string& tag) { ^ include/yaml-cpp/node/detail/node.h: In member function ‘void YAML::detail::node::set_style(YAML::EmitterStyle::value)’: include/yaml-cpp/node/detail/node.h:90:45: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow] void set_style(EmitterStyle::value style) { ^ CXX src/exp.cpp
i use gcc/g++ 4.9
how to fix that??
Link to comment
Share on other sites
15 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.