HomeFreeBSD

databases/dbtool: Unbreak with Clang 6

Description

databases/dbtool: Unbreak with Clang 6

engine.cc:539:46: error: non-constant-expression cannot be narrowed from type

    'std::__1::basic_string<char, std::__1::char_traits<char>,
    std::__1::allocator<char> >::size_type' (aka 'unsigned long') to 'int' in
    initializer list [-Wc++11-narrowing]
datum key   = {(char *)config.key.c_str(), config.key.length()};
                                           ^~~~~~~~~~~~~~~~~~~

engine.cc:539:46: note: insert an explicit cast to silence this issue

datum key   = {(char *)config.key.c_str(), config.key.length()};
                                           ^~~~~~~~~~~~~~~~~~~
                                           static_cast<int>(  )

http://beefy12.nyi.freebsd.org/data/head-amd64-default/p472224_s334983/logs/dbtool-1.9.1.log

Details

Provenance
tobikAuthored on
Parents
rP472626: audio/sidplay2: Unbreak on FreeBSD 12.0
Branches
Unknown
Tags
Unknown