diff options
author | Daniel Black <daniel@linux.ibm.com> | 2020-06-09 21:54:42 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 14:54:42 +0300 |
commit | 902742789ef284a37cbf19b524213eae0f7fc2dc (patch) | |
tree | 379120eca3b7911d6d718f31184e5148c05d3a37 | |
parent | f458b40f66f33521ad3e4f0d4ebcbbcc501c89ed (diff) | |
download | mariadb-git-902742789ef284a37cbf19b524213eae0f7fc2dc.tar.gz |
innodb: dict_mem_table_add_col - compile warning fix argument 1 null where non-null expected (#1584)
cd /build-mariadb-server-10.5-mysql_release/storage/innobase && /usr/bin/powerpc64le-linux-gnu-g++ -DBTR_CUR_ADAPT -DBTR_CUR_HASH_ADAPT -DCOMPILER_HINTS -DDBUG_TRACE -DEMBEDDED_LIBRARY -DHAVE_BZIP2=1 -DHAVE_C99_INITIALIZERS -DHAVE_CONFIG_H -DHAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE=1 -DHAVE_IB_LINUX_FUTEX=1 -DHAVE_LZ4=1 -DHAVE_LZ4_COMPRESS_DEFAULT=1 -DHAVE_LZMA=1 -DHAVE_NANOSLEEP=1 -DHAVE_OPENSSL -DHAVE_SCHED_GETCPU=1 -DLINUX_NATIVE_AIO=1 -DMUTEX_EVENT -DWITH_INNODB_DISALLOW_WRITES -D_FILE_OFFSET_BITS=64 -Iwsrep-lib/include -Iwsrep-lib/wsrep-API/v26 -I/home/dan/build-mariadb-server-10.5-mysql_release/include -Istorage/innobase/include -Istorage/innobase/handler -Ilibbinlogevents/include -Itpool -Iinclude -Isql -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -Wconversion -Wno-sign-conversion -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wextra -Wformat-security -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -DUNIV_LINUX -D_GNU_SOURCE=1 -fPIC -fvisibility=hidden -std=gnu++11 -o CMakeFiles/innobase_embedded.dir/dict/dict0load.cc.o -c storage/innobase/dict/dict0load.cc
storage/innobase/dict/dict0load.cc: In function ‘const char* dict_process_sys_columns_rec(mem_heap_t*, const rec_t*, dict_col_t*, table_id_t*, const char**, ulint*)’:
storage/innobase/dict/dict0load.cc:1653:26: warning: argument 1 null where non-null expected [-Wnonnull]
dict_mem_table_add_col(table, heap, name, mtype,
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
prtype, col_len);
~~~~~~~~~~~~~~~~
In file included from storage/innobase/include/dict0dict.h:32:0,
from storage/innobase/include/btr0pcur.h:30,
from storage/innobase/dict/dict0load.cc:31:
storage/innobase/include/dict0mem.h:323:1: note: in a call to function ‘void dict_mem_table_add_col(dict_table_t*, mem_heap_t*, const char*, ulint, ulint, ulint)’ declared here
dict_mem_table_add_col(
^~~~~~~~~~~~~~~~~~~~~~
-rw-r--r-- | storage/innobase/dict/dict0load.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index 63ccf6bbb96..4014d28c2fb 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -1571,7 +1571,7 @@ dict_load_column_low( ulint pos; ulint num_base; - ut_ad(table || column); + ut_ad(!table == !!column); if (rec_get_deleted_flag(rec, 0)) { return(dict_load_column_del); @@ -1678,7 +1678,7 @@ err_len: } num_base = mach_read_from_4(field); - if (column == NULL) { + if (table) { if (prtype & DATA_VIRTUAL) { #ifdef UNIV_DEBUG dict_v_col_t* vcol = |