json_spirit_writer_template.h:79:63: warning: comparison is always true #5381

issue ghost opened this issue on November 26, 2014
  1. ghost commented at 3:59 PM on November 26, 2014: none

    I'm running configure against 0.9.2 (--with-gui=no --with-qrencode=no --with-miniupnpc=no) and I got this rare warning (this is the first time I saw this). It's probably something wrong with my OS, but I thought to share this anyway because it hopefully can be relatively easily checked.

     CXX    rpcserver.o
    In file included from rpcprotocol.h:20:0,
                     from rpcserver.h:10,
                     from rpcserver.cpp:6:
    json/json_spirit_writer_template.h: In function 'String_type json_spirit::add_esc_chars(const String_type&) [with String_type = std::basic_string<char>]':
    json/json_spirit_writer_template.h:169:13:   instantiated from 'void json_spirit::Generator<Value_type, Ostream_type>::output(const String_type&) [with Value_type = json_spirit::Value_impl<json_spirit::Config_vector<std::basic_string<char> > >, Ostream_type = std::basic_ostringstream<char>, json_spirit::Generator<Value_type, Ostream_type>::String_type = std::basic_string<char>]'
    json/json_spirit_writer_template.h:125:34:   instantiated from 'void json_spirit::Generator<Value_type, Ostream_type>::output(const Value_type&) [with Value_type = json_spirit::Value_impl<json_spirit::Config_vector<std::basic_string<char> > >, Ostream_type = std::basic_ostringstream<char>]'
    json/json_spirit_writer_template.h:114:13:   instantiated from 'json_spirit::Generator<Value_type, Ostream_type>::Generator(const Value_type&, Ostream_type&, bool) [with Value_type = json_spirit::Value_impl<json_spirit::Config_vector<std::basic_string<char> > >, Ostream_type = std::basic_ostringstream<char>]'
    json/json_spirit_writer_template.h:233:9:   instantiated from 'void json_spirit::write_stream(const Value_type&, Ostream_type&, bool) [with Value_type = json_spirit::Value_impl<json_spirit::Config_vector<std::basic_string<char> > >, Ostream_type = std::basic_ostringstream<char>]'
    json/json_spirit_writer_template.h:243:9:   instantiated from 'typename Value_type::String_type json_spirit::write_string(const Value_type&, bool) [with Value_type = json_spirit::Value_impl<json_spirit::Config_vector<std::basic_string<char> > >, typename Value_type::String_type = std::basic_string<char>]'
    rpcserver.cpp:750:42:   instantiated from here
    json/json_spirit_writer_template.h:79:63: warning: comparison is always true due to limited range of data type [-Wtype-limits]
    
    
  2. ghost commented at 4:13 PM on November 26, 2014: none

    Ugh, dupe of #1144, closing

  3. unknown closed this on Nov 26, 2014

  4. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me