diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-13 08:37:22 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-27 09:40:34 +0300 |
commit | 758fbec6e3dd5f640c6e2eb1a78675e369540adc (patch) | |
tree | 535f2091d4fe49751c2f83d133e9634694b0ebea /storage | |
parent | 6a3fc1101cd8cfc8ae755f81a22d16cd98c03210 (diff) | |
download | mariadb-git-758fbec6e3dd5f640c6e2eb1a78675e369540adc.tar.gz |
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.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/maria/ma_page.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/maria/ma_page.c b/storage/maria/ma_page.c index 7067421b51a..e1d41d1a1d8 100644 --- a/storage/maria/ma_page.c +++ b/storage/maria/ma_page.c @@ -1,4 +1,5 @@ /* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB + Copyright (c) 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 @@ -112,7 +113,7 @@ my_bool _ma_fetch_keypage(MARIA_PAGE *page, MARIA_HA *info, if (lock != PAGECACHE_LOCK_LEFT_UNLOCKED) { - DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || PAGECACHE_LOCK_READ); + DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_READ); page_link.unlock= (lock == PAGECACHE_LOCK_WRITE ? PAGECACHE_LOCK_WRITE_UNLOCK : PAGECACHE_LOCK_READ_UNLOCK); |