Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20963

qDebug() warning in release mode: code will be never executed (-Wunreachable-code)

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Incomplete
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • Qt Creator 4.7.0
    • C/C++/Obj-C++ Support
    • None
    • Windows

      Currently a warning appears in release mode for qDebug() or qDebug(YourLoggingClass)

      It states that the code will never be executed.

       

      While this is technically true, it bloats my QtCreator with warning marks that are not "fixable"

       

      However, would it be possible to highlight the line for qDebug cases in gray as is a macro #ifdef is not fulfilled and not list the actual warning?

      I think warnings should generally not be ignored, but if my left hand navivigation side is bloaded with yellow markers, then i do not get to the important warnings.

       

       

       Edit: Sorry this is not really a bug but rather a suggestion, but it is not possible to change it to suggestion in the web interface.

       

        1. image-2018-08-17-13-16-22-200.png
          15 kB
          Thomas Pollok
        2. image-2018-08-17-13-21-40-470.png
          6 kB
          Thomas Pollok
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kandeler Christian Kandeler
            tompollok Thomas Pollok
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes