Fix control reaches end of non-void function warnings#117
Merged
DanielaOrtner merged 1 commit intoJan 26, 2025
Conversation
DanielaOrtner
approved these changes
Jan 26, 2025
Contributor
DanielaOrtner
left a comment
There was a problem hiding this comment.
Thanks for the good work :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
mingw-w64compiler, raises warnings thatcontrol reaches end of non-void function [-Wreturn-type]in:core/io/resource_loader.cppline 388, in static member functionstatic RES ResourceLoader::_load(const String&, const String&, const String&, bool, Error*)core/io/resource_loader.cppline 656, in static member functionstatic Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String&, const String&, bool, Error*)core/os/os.cppline 791, in member functionvirtual PoolStringArray OS::get_connected_midi_inputs()core/packed_data_container.cppline 82, in member functionVariant PackedDataContainer::_iter_get_ofs(const Variant&, uint32_t)core/project_settings.cppline 1087, in member functionError ProjectSettings::save_custom(const String&, const CustomMap&, const Vector<String>&, bool)-
platform/windows/windows_dir_access.cppline 336, in member functionvirtual String WindowsDirAccess::get_filesystem_type() constIt appears that the compiler doesn't recognise that the
ERR_FAIL_VandERR_FAIL_V_MSGmacrosif (true)condition implies that theelsebranch will never be reached:RebelEngine/core/error_macros.h
Lines 701 to 712 in 5afd8c9
RebelEngine/core/error_macros.h
Lines 718 to 728 in 5afd8c9
To avoid these warnings, this PR adds additional returns that mirror the
if (true)returns.