A number of functions in the MachOper and MachNode class (in machnode.cpp) have implementations that just call ShouldNotReachHere() or ShouldNotCallThis().
Some of those functions return void, and the ShouldNotXXX call is the entire definition.
Some have a non-void return type, but still just call the ShouldNotXXX function, relying on [[noreturn]] handling to avoid warnings about not returning a value of the appropriate type.
And some (still) have dummy dead code following the ShouldNotXXX call to suppress no longer generated warnings about needing to return a value of the appropriate type. Some of these are returning literal 0 from a function returning a pointer type, triggering -Wzero-as-null-pointer-constant warnings when enabled.
Remove all the dead code after ShouldNotXXX calls in machnode.cpp, for consistency and to remove the -Wzero-as-null-pointer-constant warnings.
Some of those functions return void, and the ShouldNotXXX call is the entire definition.
Some have a non-void return type, but still just call the ShouldNotXXX function, relying on [[noreturn]] handling to avoid warnings about not returning a value of the appropriate type.
And some (still) have dummy dead code following the ShouldNotXXX call to suppress no longer generated warnings about needing to return a value of the appropriate type. Some of these are returning literal 0 from a function returning a pointer type, triggering -Wzero-as-null-pointer-constant warnings when enabled.
Remove all the dead code after ShouldNotXXX calls in machnode.cpp, for consistency and to remove the -Wzero-as-null-pointer-constant warnings.
- blocks
-
JDK-8332189 Enable -Wzero-as-null-pointer-constant
- Open
- links to
-
Commit(master) openjdk/jdk/8e682aca
-
Review(master) openjdk/jdk/20540