Skip to content

Compile error with GCC10.1 and -Werror from picojson #92

@markus456

Description

@markus456
/jwt-cpp/include/picojson/picojson.h: In member function ‘const T& picojson::value::get() const [with T = double]’:
/jwt-cpp/include/picojson/picojson.h:386:116: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  386 |     (type_ == int64_type && (const_cast<value *>(this)->type_ = number_type, const_cast<value *>(this)->u_.number_ = u_.int64_),
      |                                                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

OS and compiler:

Fedora release 32 (Thirty Two)
gcc (GCC) 10.1.1 20200507 (Red Hat 10.1.1-1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions