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

Some return values are ignored, causing warnings

    XMLWordPrintable

Details

    • webOS
    • 6f1bacdd10 (qt/qtwayland/dev) 13a6e935d5 (qt/qtwayland/6.3) 13a6e935d5 (qt/tqtc-qtwayland/6.3) 6f1bacdd10 (qt/tqtc-qtwayland/dev) 13a6e935d5 (qt/qtwayland/6.3.1) 13a6e935d5 (qt/tqtc-qtwayland/6.3.1) ba3f8c48bf (qt/tqtc-qtwayland/6.2)

    Description

      A developer-build of Qt in webOS environment revealed these two warnings which were treated as errors. 

      | /home/janne/workdir/webOS/build-webos/BUILD/work/qemux86_64-webos-linux/qtwayland/6.3.1-r0/git/src/client/qwaylanddatasource.cpp:96:14: error: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Werror=unused-result]
      | 96 | write(fd, content.constData(), content.size());
      | | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | cc1plus: all warnings being treated as errors
      
      | /home/janne/workdir/webOS/build-webos/BUILD/work/qemux86_64-webos-linux/qtwayland/6.3.1-r0/git/src/client/qwaylandprimaryselectionv1.cpp: In member function 'virtual void QtWaylandClient::QWaylandPrimarySelectionSourceV1::zwp_primary_selection_source_v1_send(const QString&, int32_t)':
      | /home/janne/workdir/webOS/build-webos/BUILD/work/qemux86_64-webos-linux/qtwayland/6.3.1-r0/git/src/client/qwaylandprimaryselectionv1.cpp:163:14: error: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Werror=unused-result]
      | 163 | write(fd, content.constData(), size_t(content.size()));
      | | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | cc1plus: all warnings being treated as errors

       

      Attachments

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

        Activity

          People

            jannej Janne Juntunen
            jannej Janne Juntunen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews