Skip to content

Strange warnings in Code::Blocks 17.12, GNU GCC #1192

Closed
@infdivzero

Description

I'm not sure exactly what's causing it to happen but when I compile my project I often get these warnings:

||=== Build: Debug in Stellar Winds (compiler: GNU GCC Compiler) ===|
C:\C++ Projects\Stellar Winds\include\nlohmann\json.hpp||In instantiation of 'std::__cxx11::string nlohmann::detail::lexer<BasicJsonType>::get_token_string() const [with BasicJsonType = nlohmann::basic_json<>; std::__cxx11::string = std::__cxx11::basic_string<char>]':|
C:\C++ Projects\Stellar Winds\include\nlohmann\json.hpp|4309|required from 'void nlohmann::detail::parser<BasicJsonType>::parse(bool, BasicJsonType&) [with BasicJsonType = nlohmann::basic_json<>]'|
C:\C++ Projects\Stellar Winds\include\nlohmann\json.hpp|16931|required from 'static nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::parse(IteratorType, IteratorType, nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JS|
C:\C++ Projects\Stellar Winds\include\nlohmann\json.hpp|18544|required from here|
C:\C++ Projects\Stellar Winds\include\nlohmann\json.hpp|3366|warning: unknown conversion type character 'h' in format [-Wformat=]|
C:\C++ Projects\Stellar Winds\include\nlohmann\json.hpp|3366|warning: too many arguments for format [-Wformat-extra-args]|
||=== Build finished: 0 error(s), 6 warning(s) (0 minute(s), 3 second(s)) ===|

I'm using the single header version with sfml version 2.5.0, everything else is vanilla C++.

I was able to "fix" this a few times before by removing extra includes in my classes but now it remains more constant. My project compiles and runs fine with the warnings but they're annoying and I'm not sure if they're too important. Is this normal and/or can it be fixed?

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions