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

64 Bit compile warning in qdebug.h

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 4.6.1
    • 4.5.0
    • Build tools: qmake
    • None
    • e6f6ba99253aaac496083b4cf122b095f21b43b3

    Description

      The

      /src/corelib/io/qdebug.h

      include file generates this warning when compiling for 64 Bit with Visual Studio 2008:

      ...\include\qtcore\../../src/corelib/io/qdebug.h(92) : warning C4800: 'const void *' : forcing value to bool 'true' or 'false' (performance warning)

      If you change line 92 in qdebug.h from

      inline QDebug &operator<<(QBool t)

      { stream->ts << (bool(t) ? "true" : "false"); return maybeSpace(); }

      to

      inline QDebug &operator<<(QBool t)

      { stream->ts << (bool(t != 0) ? "true" : "false"); return maybeSpace(); }

      the warning is no more.

      Attachments

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

        Activity

          People

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            xcm Martin Petersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes