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. How to remove a Warning ?
Forum Updated to NodeBB v4.3 + New Features

How to remove a Warning ?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
8 Posts 3 Posters 5.0k Views 2 Watching
  • 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.
  • RebelCoderRUR Offline
    RebelCoderRUR Offline
    RebelCoderRU
    wrote on last edited by RebelCoderRU
    #1

    Hello smart people.

    I have a quick question. I have this padding warning I can't seem to make to go away. How could I disable this type of warning (where do I have to add the flag)?

    alt text

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      and you did app option to .pro file ?
      Its a compiler warning ( as you most likely know :)
      something like

      QMAKE_CXXFLAGS += -Wno-padded
      or maybe via
      QMAKE_CXXFLAGS_WARN_OFF

      RebelCoderRUR 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        and you did app option to .pro file ?
        Its a compiler warning ( as you most likely know :)
        something like

        QMAKE_CXXFLAGS += -Wno-padded
        or maybe via
        QMAKE_CXXFLAGS_WARN_OFF

        RebelCoderRUR Offline
        RebelCoderRUR Offline
        RebelCoderRU
        wrote on last edited by
        #3

        @mrjj Thanks for a quick reply.

        I have tried few options, yes. But none of them work, including yours. And the problem is, I have a big project I am working on and it is full of these exact warning. I just want to disable this particular one as it is not critical.

        Here, I still have it:
        alt text

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Ok. just to be sure.
          You are not using the Clang Code Model and its actually that one that says it ?

          RebelCoderRUR 1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #5

            Hi
            Also
            QMAKE_CXXFLAGS_WARN_ON contains the flag -Wall.
            (overriding what to warn about )
            as far as i know so make sure what you try is AFTER
            ( you seem to use the OFF version so cant be that)
            This works for unused
            QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter,

            but
            QMAKE_CXXFLAGS_WARN_ON += -Wno-padded

            Had no effect ?

            Do you have a small sample that gives this warning ?
            I cant get it to say it :)

            1 Reply Last reply
            1
            • mrjjM mrjj

              Hi
              Ok. just to be sure.
              You are not using the Clang Code Model and its actually that one that says it ?

              RebelCoderRUR Offline
              RebelCoderRUR Offline
              RebelCoderRU
              wrote on last edited by
              #6

              @mrjj Yes, I am actually using Clang format and Clang Code Model.
              Is there a way to tell it to ignore this Warning ?

              1 Reply Last reply
              1
              • Chris KawaC Online
                Chris KawaC Online
                Chris Kawa
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Go to Tools->Options->C++->Code Model tab.
                In the Clang Code Model Warnings box copy current configuration and add -Wno-padded to the options.

                RebelCoderRUR 1 Reply Last reply
                5
                • Chris KawaC Chris Kawa

                  Go to Tools->Options->C++->Code Model tab.
                  In the Clang Code Model Warnings box copy current configuration and add -Wno-padded to the options.

                  RebelCoderRUR Offline
                  RebelCoderRUR Offline
                  RebelCoderRU
                  wrote on last edited by RebelCoderRU
                  #8

                  @Chris-Kawa Wow! that is exactly what I need. Just one more problem left.... field is not editable for some odd reason.

                  alt text

                  EDIT.
                  Sorry, my fault. I just had to copy pre-existing settings and I could edit them then. It is sorted. thanks so much guys for your time and help!

                  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