mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix clang 10 warnings
_ma_fetch_keypage(): Correct an assertion that used to always hold. Thanks to clang -Wint-in-bool-context for flagging this. double_to_datetime_with_warn(): Suppress -Wimplicit-int-float-conversion by adding a cast. LONGLONG_MAX converted to double will actually be LONGLONG_MAX+1.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013 Monty Program Ab.
|
||||
Copyright (c) 2009, 2020, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -403,7 +403,7 @@ bool double_to_datetime_with_warn(double value, MYSQL_TIME *ltime,
|
||||
if (neg)
|
||||
value= -value;
|
||||
|
||||
if (value > LONGLONG_MAX)
|
||||
if (value > static_cast<double>(LONGLONG_MAX))
|
||||
value= static_cast<double>(LONGLONG_MAX);
|
||||
|
||||
longlong nr= static_cast<ulonglong>(floor(value));
|
||||
|
Reference in New Issue
Block a user