VirtualBox

Changeset 68994 in vbox


Ignore:
Timestamp:
Oct 5, 2017 2:20:22 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118263
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.

Location:
trunk/src/VBox/Devices/Graphics
Files:
4 edited

Legend:

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

    r65381 r68994  
    12701270                    break;
    12711271                default:
    1272                     AssertFailed();
     1272                    AssertFailed();  /* Fall through */
    12731273                case 'b': //SVGA3dBlendOp
    12741274                case 'e': //SVGA3dBlendEquation
  • 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,
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-savedstate.cpp

    r65381 r68994  
    756756                        default:
    757757                            AssertFailed();
    758                             /* no break */
     758                            /* Fall through */
    759759                        case SVGA3D_SURFACE_HINT_DEPTHSTENCIL:
    760760                        case SVGA3D_SURFACE_HINT_DEPTHSTENCIL | SVGA3D_SURFACE_HINT_TEXTURE:
  • trunk/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c

    r62948 r68994  
    519519                    break;
    520520                }
    521             }
     521            }  /* Fall through */
    522522
    523523            case HEAP_NODE_TRAVERSE_RIGHT:
     
    535535                    break;
    536536                }
    537             }
     537            }  /* Fall through */
    538538
    539539            case HEAP_NODE_POP:
     
    595595                    break;
    596596                }
    597             }
     597            }  /* Fall through */
    598598
    599599            case HEAP_NODE_TRAVERSE_RIGHT:
     
    610610                    break;
    611611                }
    612             }
     612            }  /* Fall through */
    613613
    614614            case HEAP_NODE_POP:
Note: See TracChangeset for help on using the changeset viewer.

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