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

Warning M115 when using blocks for switch/case and 'let'

    XMLWordPrintable

Details

    • 845afb25fc7bc296f4bd0aeb12207cdfbbc99107 2447d1d69ca941947c0df5cf32c6798f4cce1306

    Description

      When creating a switch/case statement that uses blocks inside a case the warning

      Do not use stand-alone blocks. (M115)

      is showed.

      e.g.

              switch ( var )
              {
                  case 1:
                  {
                      break;
                  }
                  case 2:
                  {
                      break;
                  }
                  default:
                  {
                      break;
                  }
              }
      

      Many companies enforce using blocks inside cases as a coding standard.

      Attachments

        Issue Links

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

          Activity

            People

              cstenger Christian Stenger
              israelins85 Israel Lins Albuquerque
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes