VirtualBox

Changeset 97361 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Nov 1, 2022 2:02:24 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154359
Message:

VMM/IEM: Removed a lot of now unnecessary return statements, while keeping unnecessary break statements for the look of the think. Also added missing IEM_NOT_REACHED_DEFAULT_CASE_RET uses to try make sure all cases in the switches will return and we can skip the function (typically) return statement. bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r97257 r97361  
    32413241/** Used to shut up GCC warnings about variables that 'may be used uninitialized'
    32423242 * due to GCC lacking knowledge about the value range of a switch. */
    3243 #define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: AssertFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE)
     3243#if RT_CPLUSPLUS_PREREQ(202000)
     3244# define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: [[unlikely]] AssertFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE)
     3245#else
     3246# define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: AssertFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE)
     3247#endif
    32443248
    32453249/** Variant of IEM_NOT_REACHED_DEFAULT_CASE_RET that returns a custom value. */
    3246 #define IEM_NOT_REACHED_DEFAULT_CASE_RET2(a_RetValue) default: AssertFailedReturn(a_RetValue)
     3250#if RT_CPLUSPLUS_PREREQ(202000)
     3251# define IEM_NOT_REACHED_DEFAULT_CASE_RET2(a_RetValue) default: [[unlikely]] AssertFailedReturn(a_RetValue)
     3252#else
     3253# define IEM_NOT_REACHED_DEFAULT_CASE_RET2(a_RetValue) default: AssertFailedReturn(a_RetValue)
     3254#endif
    32473255
    32483256/**
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