mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 12:13:33 +00:00
MDEV-36882: Inconsistent DBUG_ASSERT trips GCC -Og
my_time_fraction_remainder(): Remove a DBUG_ASSERT, because there is none in sec_part_shift() or sec_part_unshift() either. A buffer overflow should be caught by cmake -DWITH_ASAN=ON in all three. This fixes a build with GCC 14.2 and cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-Og. Reviewed by: Daniel Black
This commit is contained in:
@ -230,7 +230,6 @@ static inline longlong sec_part_unshift(longlong second_part, uint digits)
|
||||
/* Date/time rounding and truncation functions */
|
||||
static inline long my_time_fraction_remainder(long nr, uint decimals)
|
||||
{
|
||||
DBUG_ASSERT(decimals <= TIME_SECOND_PART_DIGITS);
|
||||
return nr % (long) log_10_int[TIME_SECOND_PART_DIGITS - decimals];
|
||||
}
|
||||
static inline void my_datetime_trunc(MYSQL_TIME *ltime, uint decimals)
|
||||
|
Reference in New Issue
Block a user