Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128574

FTBFS with GCC 14: tReq may be used uninitialized [-Werror=maybe-uninitialized]

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.9.0 FF, 6.9
    • 6.9
    • Qt Language Server
    • None
    • 80826f72b (dev)

    Description

      In member function ‘QList<QLspSpecification::MessageActionItem>::size() const’,
          inlined from ‘QTypedJson::doWalk<QTypedJson::Reader, QList<QLspSpecification::MessageActionItem> >(QTypedJson::Reader&, QList<QLspSpecification::MessageActionItem>&)void’ at /home/tjmaciei/src/qt/qt6/qtlanguageserver/src/jsonrpc/qtypedjson_p.h:422:31,
          inlined from ‘QTypedJson::doWalk<QTypedJson::Reader, std::optional<QList<QLspSpecification::MessageActionItem> > >(QTypedJson::Reader&, std::optional<QList<QLspSpecification::MessageActionItem> >&)void’ at /home/tjmaciei/src/qt/qt6/qtlanguageserver/src/jsonrpc/qtypedjson_p.h:420:23,
          inlined from ‘QTypedJson::field<QTypedJson::Reader, char [8], std::optional<QList<QLspSpecification::MessageActionItem> > >(QTypedJson::Reader&, char const (&) [8], std::optional<QList<QLspSpecification::MessageActionItem> >&)void’ at /home/tjmaciei/src/qt/qt6/qtlanguageserver/src/jsonrpc/qtypedjson_p.h:382:15,
          inlined from ‘QLspSpecification::ShowMessageRequestParams::walk<QTypedJson::Reader>(QTypedJson::Reader&)void’ at /home/tjmaciei/src/qt/qt6/qtlanguageserver/src/languageserver/qlanguageserverspectypes_p.h:2209:14,
          inlined from ‘QTypedJson::doWalk<QTypedJson::Reader, QLspSpecification::ShowMessageRequestParams>(QTypedJson::Reader&, QLspSpecification::ShowMessageRequestParams&)void’ at /home/tjmaciei/src/qt/qt6/qtlanguageserver/src/jsonrpc/qtypedjson_p.h:400:20,
          inlined from ‘QJsonRpc::TypedRpc::registerRequestHandler<QLspSpecification::ShowMessageRequestParams, QLspSpecification::LSPResponse<std::variant<QLspSpecification::MessageActionItem, decltype(nullptr)> > >(QByteArray const&, std::function<void (QByteArray const&, QLspSpecification::ShowMessageRequestParams const&, QLspSpecification::LSPResponse<std::variant<QLspSpecification::MessageActionItem, decltype(nullptr)> >&&)> const&)::{lambda(QJsonRpcProtocol::Request const&, std::function<void (QJsonRpcProtocol::Response const&)> const&)#1}::operator()(QJsonRpcProtocol::Request const&, std::function<void (QJsonRpcProtocol::Response const&)> const&) const’ at /home/tjmaciei/src/qt/qt6/qtlanguageserver/src/jsonrpc/qjsontypedrpc_p.h:241:47:
      qlist.h:399:49: error: ‘MEM[(const struct DataOps *)&tReq + 32B].D.927856.D.927852.D.927830.size’ may be used uninitialized [-Werror=maybe-uninitialized]
        399 |     qsizetype size() const noexcept { return d->size; }
            |                                                 ^~~~
      

      We've seen problems with std::optional and maybe-uninitialised warnings before.

      Please either:
      a) fix the warning
      b) prove it's a false-positive detection and turn the error down back down to warning

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sami.shalayel Sami Shalayel
            thiago Thiago Macieira
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes