mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 15:23:03 +01:00
Make return-type a compilation error (#8362)
This protects from undefined behavior cases that can be added to the code by mistake.
This commit is contained in:
parent
fa83e793d1
commit
566bebf2d5
@ -111,7 +111,7 @@ GLOB_OPTIONS:=
|
||||
#____________________________________________________________________________
|
||||
|
||||
# Global c++ flags: firebird needs no RTTI, choose build standard and c++ specific warnings level
|
||||
PLUSPLUS_FLAGS:= -fno-rtti -std=c++17 -Werror=delete-incomplete
|
||||
PLUSPLUS_FLAGS:= -fno-rtti -std=c++17 -Werror=delete-incomplete -Werror=return-type
|
||||
|
||||
# If this is defined then we use special rules useful for developers only
|
||||
IsDeveloper = @DEVEL_FLG@
|
||||
|
@ -28,6 +28,7 @@
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TreatSpecificWarningsAsErrors>4715</TreatSpecificWarningsAsErrors>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
|
@ -1124,6 +1124,7 @@ namespace
|
||||
return twelveHours == 12 ? twelveHours : 12 + twelveHours;
|
||||
|
||||
cb->err(Arg::Gds(isc_incorrect_hours_period) << string(period.data(), period.length()));
|
||||
return 0; // suppress compiler warning/error
|
||||
}
|
||||
|
||||
constexpr int roundYearPatternImplementation(int parsedRRValue, int currentYear)
|
||||
|
Loading…
Reference in New Issue
Block a user