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

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

      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);
               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes