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

qrandom.cpp: error: ignoring return value of ‘int getentropy(void*, size_t)’, declared with attribute warn_unused_result

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.2
    • 5.10.0 Alpha
    • Core: Other
    • None
    • Archlinux, GCC 7.1.1, glibc 2.25

    Description

      When trying to compile the current dev branch, I get:

      global/qrandom.cpp: In static member function ‘static qssize_t {anonymous}::SystemRandom::fillBuffer(void*, qssize_t)’:
      global/qrandom.cpp:132:19: error: ignoring return value of ‘int getentropy(void*, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result]
               getentropy(reinterpret_cast<uchar *>(buffer) + read, count - read);
               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes