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

Warning M115 when using blocks for switch/case

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 3.1.2
    • Quick / QML Support
    • None
    • Qt Creator 3.1.2 (opensource)
      Based on Qt 5.3.1 (GCC 4.6.1, 64 bit)
      Built on Jun 23 2014 at 04:09:33
      From revision a791e851a7

    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

              mabenell Marco Benelli
              ramontt Jose Ramon Garcia Alvarado
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes