jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.78k forks source link

Compiling Warning messages from YAML-CPP #1208

Closed ju-liu closed 11 months ago

ju-liu commented 11 months ago

Hi:

When compiling the yaml-cpp code on mac, several warning messages are noted by the compiler.

  1. In file included from /Users/juliu/lib/yaml-shared/include/yaml-cpp/yaml.h:12: /Users/juliu/lib/yaml-shared/include/yaml-cpp/emitterstyle.h:12:25: warning: declaration shadows a variable in namespace 'YAML' [-Wshadow] enum value { Default, Block, Flow }; ^ /Users/juliu/lib/yaml-shared/include/yaml-cpp/emittermanip.h:59:3: note: previous declaration is here Block,

  2. In file included from /Users/juliu/lib/yaml-shared/include/yaml-cpp/yaml.h:12: /Users/juliu/lib/yaml-shared/include/yaml-cpp/emitterstyle.h:12:32: warning: declaration shadows a variable in namespace 'YAML' [-Wshadow] enum value { Default, Block, Flow }; ^ /Users/juliu/lib/yaml-shared/include/yaml-cpp/emittermanip.h:58:3: note: previous declaration is here Flow,

  3. In file included from /Users/juliu/lib/yaml-shared/include/yaml-cpp/yaml.h:16: In file included from /Users/juliu/lib/yaml-shared/include/yaml-cpp/node/node.h:18: /Users/juliu/lib/yaml-shared/include/yaml-cpp/node/type.h:12:27: warning: declaration shadows a variable in namespace 'YAML' [-Wshadow] enum value { Undefined, Null, Scalar, Sequence, Map }; ^ /Users/juliu/lib/yaml-shared/include/yaml-cpp/null.h:23:27: note: previous declaration is here extern YAML_CPP_API _Null Null;

jbeder commented 11 months ago

Thanks! I'm not too worried about warnings.