Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Turn on specific waring as errors
Qt 6.11 is out! See what's new in the release blog

Turn on specific waring as errors

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 3 Posters 664 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kaluss
    wrote on last edited by Kaluss
    #1

    Hi,
    I have turned on warning as error option in my pro file:
    QMAKE_CXXFLAGS += -Werror

    But in my QtCreator I still see some warnings like e.g.:
    Included header header.h is not used directly (fix available)
    Included header header.h is not used directly (fix available)

    How can I set that build will fail even with that?
    Currently build is succeeding.

    Christian EhrlicherC 1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
    • K Kaluss

      Hi,
      I have turned on warning as error option in my pro file:
      QMAKE_CXXFLAGS += -Werror

      But in my QtCreator I still see some warnings like e.g.:
      Included header header.h is not used directly (fix available)
      Included header header.h is not used directly (fix available)

      How can I set that build will fail even with that?
      Currently build is succeeding.

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      What you see are not comnpiler warnings but warnings from the clang analyzer. So you can't create an error for them.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      K 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        What you see are not comnpiler warnings but warnings from the clang analyzer. So you can't create an error for them.

        K Offline
        K Offline
        Kaluss
        wrote on last edited by
        #3

        @Christian-Ehrlicher ok, thank you, is there any option to list all of those warning or I need go file by file manually?

        JonBJ 1 Reply Last reply
        0
        • K Kaluss

          @Christian-Ehrlicher ok, thank you, is there any option to list all of those warning or I need go file by file manually?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Kaluss I think you can only see them interactively as intellisense.

          K 1 Reply Last reply
          0
          • JonBJ JonB

            @Kaluss I think you can only see them interactively as intellisense.

            K Offline
            K Offline
            Kaluss
            wrote on last edited by
            #5

            @JonB Thank you for support. I closing this topic.

            JonBJ 1 Reply Last reply
            0
            • K Kaluss has marked this topic as solved on
            • K Kaluss

              @JonB Thank you for support. I closing this topic.

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @Kaluss Actually, maybe you could run clang on your files to get those output somehow, but I don't know.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved