VirtualBox

Ignore:
Timestamp:
Oct 5, 2017 2:20:22 PM (7 years ago)
Author:
vboxsync
Message:

Fix switch statement fall-through warnings with gcc 7.2.
bugref:8192: gcc warnings

gcc 7.1 and later add a switch statement fall-through warning level, which
-Wall sets to level 3. At this level, fall-throughs have to have at least
a comment following particular requirements (see gcc manual). This change
fixes a few places in the code to meet these requirements. Currently this
warning prevents building with kObjCache enabled, as the compiler checks
the comments in the source, which are stripped out by the object cache.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r68083 r68994  
    42024202            if (pContext->state.aRenderState[SVGA3D_RS_BLENDENABLE].uintValue != 0)
    42034203                continue;   /* ignore if blend is already enabled */
    4204             /* no break */
    4205         }
     4204        }  /* Fall through */
    42064205
    42074206        case SVGA3D_RS_BLENDENABLE:            /* SVGA3dBool */
     
    57975796    case SVGA3D_DECLTYPE_UBYTE4N:
    57985797        normalized = GL_TRUE;
    5799         /* no break */
     5798        /* Fall through */
    58005799    case SVGA3D_DECLTYPE_UBYTE4:
    58015800        size = 4;
     
    58055804    case SVGA3D_DECLTYPE_SHORT2N:
    58065805        normalized = GL_TRUE;
    5807         /* no break */
     5806        /* Fall through */
    58085807    case SVGA3D_DECLTYPE_SHORT2:
    58095808        size = 2;
     
    58135812    case SVGA3D_DECLTYPE_SHORT4N:
    58145813        normalized = GL_TRUE;
    5815         /* no break */
     5814        /* Fall through */
    58165815    case SVGA3D_DECLTYPE_SHORT4:
    58175816        size = 4;
     
    62086207            case SVGA3D_DECLUSAGE_POSITIONT:
    62096208                Log(("ShaderSetPositionTransformed: (%d,%d)\n", pContext->state.RectViewPort.w, pContext->state.RectViewPort.h));
     6209                /* Fall through */
    62106210            case SVGA3D_DECLUSAGE_POSITION:
    62116211                ShaderSetPositionTransformed(pContext->pShaderContext, pContext->state.RectViewPort.w,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette