#0 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:29558: error: Dead Store The value written to `&yymsg` is never used. 29556. YY_USE (thd); 29557. if (!yymsg) 29558. yymsg = "Deleting"; ^ 29559. YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); 29560. #1 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:29813: error: Dead Store The value written to `&yytoken` is never used. 29811. loop in error recovery. */ 29812. yychar = YYUNDEF; 29813. yytoken = YYSYMBOL_YYerror; ^ 29814. goto yyerrlab1; 29815. } #2 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:52343: error: Dead Store The value written to `&MYSQLnerrs` is never used. 52341. if (!yyerrstatus) 52342. { 52343. ++yynerrs; ^ 52344. yyerror (thd, YY_("syntax error")); 52345. } #3 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:52379: error: Dead Store The value written to `&MYSQLnerrs` is never used. 52377. if (0) 52378. YYERROR; 52379. ++yynerrs; ^ 52380. 52381. /* Do not reclaim the symbols of the rule whose action triggered #4 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:52394: error: Dead Store The value written to `&yyerrstatus` is never used. 52392. `-------------------------------------------------------------*/ 52393. yyerrlab1: 52394. yyerrstatus = 3; /* Each real token shifted decrements this. */ ^ 52395. 52396. /* Pop stack until we find a state that shifts the error token. */ #5 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:28775: error: Dead Store The value written to `&yymsg` is never used. 28773. YY_USE (thd); 28774. if (!yymsg) 28775. yymsg = "Deleting"; ^ 28776. YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); 28777. #6 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:29030: error: Dead Store The value written to `&yytoken` is never used. 29028. loop in error recovery. */ 29029. yychar = YYUNDEF; 29030. yytoken = YYSYMBOL_YYerror; ^ 29031. goto yyerrlab1; 29032. } #7 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:52430: error: Dead Store The value written to `&ORAnerrs` is never used. 52428. if (!yyerrstatus) 52429. { 52430. ++yynerrs; ^ 52431. yyerror (thd, YY_("syntax error")); 52432. } #8 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:52466: error: Dead Store The value written to `&ORAnerrs` is never used. 52464. if (0) 52465. YYERROR; 52466. ++yynerrs; ^ 52467. 52468. /* Do not reclaim the symbols of the rule whose action triggered #9 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:52481: error: Dead Store The value written to `&yyerrstatus` is never used. 52479. `-------------------------------------------------------------*/ 52480. yyerrlab1: 52481. yyerrstatus = 3; /* Each real token shifted decrements this. */ ^ 52482. 52483. /* Pop stack until we find a state that shifts the error token. */ #10 /usr/include/c++/14/bits/stl_iterator.h:190: error: Unnecessary Copy Intermediate `__x` is copied into field `current` but is not modified afterwards. Rather than copying into the field, move into it instead. 188. reverse_iterator(iterator_type __x) 189. _GLIBCXX_NOEXCEPT_IF(noexcept(_Iterator(__x))) 190. : current(__x) ^ 191. { } 192. #11 /usr/include/c++/14/bits/stl_pair.h:882: error: Unnecessary Copy Intermediate `std::forward()` is copied into field `first` but is not modified afterwards. Rather than copying into the field, move into it instead. 880. bool>::type=true> 881. constexpr pair(_U1&& __x, _U2&& __y) 882. : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) ^ 883. { __glibcxx_no_dangling_refs(_U1&&, _U2&&); } 884. #12 /usr/include/c++/14/bits/stl_pair.h:882: error: Unnecessary Copy Intermediate `std::forward()` is copied into field `second` but is not modified afterwards. Rather than copying into the field, move into it instead. 880. bool>::type=true> 881. constexpr pair(_U1&& __x, _U2&& __y) 882. : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) ^ 883. { __glibcxx_no_dangling_refs(_U1&&, _U2&&); } 884. #13 /usr/include/c++/14/tuple:283: error: Use After Delete call to `std::_Tuple_impl::__infer_inner_destructor_~_Tuple_impl()` eventually accesses `this->_M_head_impl.__infer_model_backing_string` that was invalidated by `delete` during the call to `std::_Head_base::__infer_inner_destructor_~_Head_base()` on line 283. 281. */ 282. template 283. struct _Tuple_impl<_Idx, _Head, _Tail...> ^ 284. : public _Tuple_impl<_Idx + 1, _Tail...>, 285. private _Head_base<_Idx, _Head> #14 client/async_example.c:134: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `mysql_options()`. 132. 133. mysql_init(&mysql); 134. mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); ^ 135. mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "myapp"); 136. #15 client/async_example.c:146: error: Uninitialized Value `ret` is read without initialization. 144. } 145. 146. if (!ret) ^ 147. fatal(&mysql, "Failed to mysql_real_connect()"); 148. #16 client/async_example.c:155: error: Uninitialized Value `err` is read without initialization. 153. status= mysql_real_query_cont(&err, &mysql, status); 154. } 155. if (err) ^ 156. fatal(&mysql, "mysql_real_query() returns error"); 157. #17 client/async_example.c:171: error: Uninitialized Value `row` is read without initialization. 169. status= mysql_fetch_row_cont(&row, res, status); 170. } 171. if (!row) ^ 172. break; 173. printf("%s: %s\n", row[0], row[1]); #18 client/mysql.cc:2684: error: Dead Store The value written to `&out` is never used. 2682. SELECT '\ndelimiter\n';\n) 2683. */ 2684. *out++='\n'; ^ 2685. length++; 2686. } #19 client/mysql.cc:3227: error: Uninitialized Value `num_name` is read without initialization. 3225. char last_char= 0; 3226. 3227. int UNINIT_VAR(num_name), UNINIT_VAR(num_cat); ^ 3228. 3229. if (num_fields == 2) #20 client/mysql.cc:3227: error: Uninitialized Value `num_cat` is read without initialization. 3225. char last_char= 0; 3226. 3227. int UNINIT_VAR(num_name), UNINIT_VAR(num_cat); ^ 3228. 3229. if (num_fields == 2) #21 client/mysql.cc:4486: error: Dead Store The value written to `&tmp` is never used. 4484. get_arg to find end of string the second time it's called. 4485. */ 4486. tmp= strmake(buff, line, sizeof(buff)-2); ^ 4487. #ifdef EXTRA_DEBUG 4488. tmp[1]= 0; #22 client/mysql.cc:4964: error: Uninitialized Value `result` is read without initialization. 4962. char buff[40]; 4963. ulonglong id; 4964. MYSQL_RES *UNINIT_VAR(result); ^ 4965. 4966. if (mysql_real_query_for_lazy( #23 client/mysql.cc:5548: error: Dead Store The value written to `&result` is never used. 5546. my_free(part_username); 5547. 5548. MYSQL_RES *UNINIT_VAR(result); ^ 5549. if (!mysql_query(&mysql,"select USER()") && 5550. (result=mysql_use_result(&mysql))) #24 client/mysql.cc:5548: error: Uninitialized Value `result` is read without initialization. 5546. my_free(part_username); 5547. 5548. MYSQL_RES *UNINIT_VAR(result); ^ 5549. if (!mysql_query(&mysql,"select USER()") && 5550. (result=mysql_use_result(&mysql))) #25 client/mysqlbinlog.cc:2328: error: Uninitialized Value `error_msg` is read without initialization. 2326. &error_msg))) 2327. { 2328. error("Could not construct annotate event object: %s", error_msg); ^ 2329. DBUG_RETURN(ERROR_STOP); 2330. } #26 client/mysqlcheck.c:609: error: Dead Store The value written to `&end` is never used. 607. *end++= ','; 608. } 609. *--end = 0; ^ 610. handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1, 611. opt_do_views != 0, opt_all_in_1); #27 client/mysqlcheck.c:664: error: Dead Store The value written to `&res` is never used. 662. static int process_all_tables_in_db(char *database) 663. { 664. MYSQL_RES *UNINIT_VAR(res); ^ 665. MYSQL_ROW row; 666. uint num_columns; #28 client/mysqlcheck.c:664: error: Uninitialized Value `res` is read without initialization. 662. static int process_all_tables_in_db(char *database) 663. { 664. MYSQL_RES *UNINIT_VAR(res); ^ 665. MYSQL_ROW row; 666. uint num_columns; #29 client/mysqlcheck.c:740: error: Dead Store The value written to `&end` is never used. 738. } 739. } 740. *--end = 0; ^ 741. *--views_end = 0; 742. if (tot_length) #30 client/mysqlcheck.c:741: error: Dead Store The value written to `&views_end` is never used. 739. } 740. *--end = 0; 741. *--views_end = 0; ^ 742. if (tot_length) 743. handle_request_for_tables(tables + 1, tot_length - 1, FALSE, opt_all_in_1); #31 client/mysqlcheck.c:929: error: Dead Store The value written to `&end` is never used. 927. if (opt_check_only_changed) end = strmov(end, " CHANGED"); 928. } 929. if (opt_upgrade) end = strmov(end, " FOR UPGRADE"); ^ 930. break; 931. case DO_REPAIR: #32 client/mysqlcheck.c:936: error: Dead Store The value written to `&end` is never used. 934. { 935. if (opt_do_views == DO_VIEWS_FROM_MYSQL) 936. end = strmov(end, " FROM MYSQL"); ^ 937. else if (opt_do_views == DO_UPGRADE) 938. end = strmov(end, " FOR UPGRADE"); #33 client/mysqlcheck.c:938: error: Dead Store The value written to `&end` is never used. 936. end = strmov(end, " FROM MYSQL"); 937. else if (opt_do_views == DO_UPGRADE) 938. end = strmov(end, " FOR UPGRADE"); ^ 939. } 940. else #34 client/mysqlcheck.c:944: error: Dead Store The value written to `&end` is never used. 942. if (opt_quick) end = strmov(end, " QUICK"); 943. if (opt_extended) end = strmov(end, " EXTENDED"); 944. if (opt_frm) end = strmov(end, " USE_FRM"); ^ 945. } 946. break; #35 client/mysqlcheck.c:955: error: Dead Store The value written to `&end` is never used. 953. DBUG_ASSERT(!view); 954. op= (opt_write_binlog) ? "ANALYZE" : "ANALYZE NO_WRITE_TO_BINLOG"; 955. if (opt_persistent_all) end = strmov(end, " PERSISTENT FOR ALL"); ^ 956. break; 957. case DO_OPTIMIZE: #36 client/mysqldump.c:1028: error: Dead Store The value written to `&mode` is never used. 1026. } 1027. #endif 1028. mode= opt_compatible_mode; ^ 1029. for (i= 0, mode= opt_compatible_mode; mode; mode>>= 1, i++) 1030. { #37 client/mysqldump.c:1835: error: Dead Store The value written to `&query_ptr` is never used. 1833. query_ptr= strnmov(query_ptr, C_STRING_WITH_LEN("*/ /*!")); 1834. query_ptr= strnmov(query_ptr, stmt_version_str, stmt_version_length); 1835. query_ptr= strxmov(query_ptr, definer_end, NullS); ^ 1836. 1837. return query_str; #38 client/mysqldump.c:6031: error: Uninitialized Value `master` is read without initialization. 6029. { 6030. MYSQL_ROW row; 6031. MYSQL_RES *UNINIT_VAR(master); ^ 6032. char binlog_pos_file[FN_REFLEN]; 6033. char binlog_pos_offset[LONGLONG_LEN+1]; #39 client/mysqldump.c:6196: error: Uninitialized Value `slave` is read without initialization. 6194. int use_gtid, char* set_gtid_pos) 6195. { 6196. MYSQL_RES *UNINIT_VAR(slave); ^ 6197. MYSQL_ROW row; 6198. const char *comment_prefix= #40 client/mysqldump.c:6853: error: Uninitialized Value `ds_str.length` is read without initialization during the call to `replace()`. 6851. replace_len=(ulong)(strxmov(ptr, "*/\n/*!50002 WITH ", row[0], 6852. " CHECK OPTION", NullS) - ptr); 6853. replace(&ds_view, search_buf, search_len, replace_buf, replace_len); ^ 6854. } 6855. #41 client/mysqldump.c:6886: error: Uninitialized Value `ds_str.length` is read without initialization during the call to `replace()`. 6884. " SQL SECURITY ", row[2], 6885. " */\n/*!50001", NullS) - ptr); 6886. replace(&ds_view, search_buf, search_len, replace_buf, replace_len); ^ 6887. } 6888. #42 client/mysqlimport.c:437: error: Uninitialized Value `_.length` is read without initialization. 435. dynstr_append(&query, " WRITE,"); 436. } 437. if (mysql_real_query(mysql, query.str, (ulong)query.length-1)) ^ 438. db_error(mysql); /* We shall continue here, if --force was given */ 439. } #43 client/mysqlshow.c:727: error: Uninitialized Value `rows` is read without initialization. 725. MYSQL_RES *result; 726. MYSQL_ROW row; 727. ulong UNINIT_VAR(rows); ^ 728. 729. if (mysql_select_db(mysql,db)) #44 client/mysqlshow.c:810: error: Dead Store The value written to `&field` is never used. 808. va_start(args,head_length); 809. putchar('+'); 810. field=header; length=head_length; ^ 811. for (;;) 812. { #45 client/mysqlshow.c:849: error: Dead Store The value written to `&field` is never used. 847. va_start(args,head_length); 848. putchar('+'); 849. field=header; length=head_length; ^ 850. for (;;) 851. { #46 client/mysqlslap.c:2193: error: Dead Store The value written to `&x` is never used. 2191. ptr+= retstr - ptr + 1; 2192. } 2193. nptr[x++]= atoi(ptr); ^ 2194. 2195. return count; #47 client/mysqltest.cc:1619: error: Dead Store The value written to `&s` is never used. 1617. 1618. s+= my_vsnprintf(s, end - s, fmt, args); 1619. s+= my_snprintf(s, end -s, "\n"); ^ 1620. } 1621. #48 client/mysqltest.cc:2706: error: Dead Store The value written to `&res` is never used. 2704. char *end = (char*)((query_end && *query_end) ? 2705. *query_end : query + strlen(query)); 2706. MYSQL_RES *UNINIT_VAR(res); ^ 2707. MYSQL_ROW row; 2708. MYSQL* mysql = cur_con->mysql; #49 client/mysqltest.cc:2706: error: Uninitialized Value `res` is read without initialization. 2704. char *end = (char*)((query_end && *query_end) ? 2705. *query_end : query + strlen(query)); 2706. MYSQL_RES *UNINIT_VAR(res); ^ 2707. MYSQL_ROW row; 2708. MYSQL* mysql = cur_con->mysql; #50 client/mysqltest.cc:2740: error: Uninitialized Value `query_eval.length` is read without initialization during the call to `do_eval()`. 2738. /* Eval the query, thus replacing all environment variables */ 2739. init_dynamic_string(&ds_query, 0, (end - query) + 32, 256); 2740. do_eval(&ds_query, query, end, FALSE); ^ 2741. 2742. if (mysql_real_query(mysql, ds_query.str, (ulong)ds_query.length) || #51 client/mysqltest.cc:2742: error: Uninitialized Value `_.length` is read without initialization. 2740. do_eval(&ds_query, query, end, FALSE); 2741. 2742. if (mysql_real_query(mysql, ds_query.str, (ulong)ds_query.length) || ^ 2743. !(res= mysql_store_result(mysql))) 2744. { #52 client/mysqltest.cc:2792: error: Uninitialized Value `_.length` is read without initialization. 2790. dynstr_append_mem(&result, "\t", 1); 2791. } 2792. end= result.str + result.length-1; ^ 2793. /* Evaluation should not recurse via backtick */ 2794. eval_expr(var, result.str, (const char**) &end, false, false); #53 client/mysqltest.cc:2884: error: Dead Store The value written to `&res` is never used. 2882. long row_no; 2883. int col_no= -1; 2884. MYSQL_RES* UNINIT_VAR(res); ^ 2885. MYSQL* mysql= cur_con->mysql; 2886. #54 client/mysqltest.cc:2884: error: Uninitialized Value `res` is read without initialization. 2882. long row_no; 2883. int col_no= -1; 2884. MYSQL_RES* UNINIT_VAR(res); ^ 2885. MYSQL* mysql= cur_con->mysql; 2886. #55 client/mysqltest.cc:3385: error: Uninitialized Value `query_eval.length` is read without initialization during the call to `do_eval()`. 3383. init_dynamic_string(&ds_cmd, 0, command->query_len+256, 256); 3384. /* Eval the command, thus replacing all environment variables */ 3385. do_eval(&ds_cmd, cmd, command->end, !is_windows); ^ 3386. 3387. /* Check if echo should be replaced with "builtin" echo */ #56 client/mysqltest.cc:3391: error: Uninitialized Value `ds_str.length` is read without initialization during the call to `replace()`. 3389. { 3390. /* Replace echo with our "builtin" echo */ 3391. replace(&ds_cmd, "echo", 4, builtin_echo, strlen(builtin_echo)); ^ 3392. } 3393. #57 client/mysqltest.cc:3590: error: Uninitialized Value `query_eval.length` is read without initialization during the call to `do_eval()`. 3588. 3589. /* Eval the system command, thus replacing all environment variables */ 3590. do_eval(&ds_cmd, command->first_argument, command->end, !is_windows); ^ 3591. 3592. #ifdef _WIN32 #58 client/mysqltest.cc:4360: error: Uninitialized Value `_.str` is read without initialization. 4358. ' '); 4359. 4360. if (bad_path(ds_filename.str)) ^ 4361. DBUG_VOID_RETURN; 4362. dynstr_append_mem(&ds_line, "\n", 1); #59 client/mysqltest.cc:4760: error: Uninitialized Value `query_eval.length` is read without initialization during the call to `do_eval()`. 4758. 4759. init_dynamic_string(&ds_echo, "", command->query_len, 256); 4760. do_eval(&ds_echo, command->first_argument, command->end, FALSE); ^ 4761. dynstr_append_mem(&ds_res, ds_echo.str, ds_echo.length); 4762. dynstr_append_mem(&ds_res, "\n", 1); #60 client/mysqltest.cc:4761: error: Uninitialized Value `_.length` is read without initialization. 4759. init_dynamic_string(&ds_echo, "", command->query_len, 256); 4760. do_eval(&ds_echo, command->first_argument, command->end, FALSE); 4761. dynstr_append_mem(&ds_res, ds_echo.str, ds_echo.length); ^ 4762. dynstr_append_mem(&ds_res, "\n", 1); 4763. dynstr_free(&ds_echo); #61 client/mysqltest.cc:4775: error: Dead Store The value written to `&res` is never used. 4773. for (;;) 4774. { 4775. MYSQL_RES *UNINIT_VAR(res); ^ 4776. MYSQL_ROW row; 4777. int done; #62 client/mysqltest.cc:4775: error: Uninitialized Value `res` is read without initialization. 4773. for (;;) 4774. { 4775. MYSQL_RES *UNINIT_VAR(res); ^ 4776. MYSQL_ROW row; 4777. int done; #63 client/mysqltest.cc:4970: error: Uninitialized Value `query_eval.length` is read without initialization during the call to `do_eval()`. 4968. p++; 4969. 4970. do_eval(&let_rhs_expr, p, command->end, FALSE); ^ 4971. 4972. command->last_argument= command->end; #64 client/mysqltest.cc:4975: error: Uninitialized Value `_.length` is read without initialization. 4973. /* Assign var_val to var_name */ 4974. var_set(var_name, var_name_end, let_rhs_expr.str, 4975. (let_rhs_expr.str + let_rhs_expr.length)); ^ 4976. dynstr_free(&let_rhs_expr); 4977. revert_properties(); #65 client/mysqltest.cc:5420: error: Uninitialized Value `query_eval.length` is read without initialization during the call to `do_eval()`. 5418. DYNAMIC_STRING ds; 5419. init_dynamic_string(&ds, 0, command->query_len + 64, 256); 5420. do_eval(&ds, command->first_argument, command->end, !is_windows); ^ 5421. char *p= ds.str; 5422. #66 client/mysqltest.cc:8154: error: Dead Store The value written to `&flags` is never used. 8152. case Q_PS_PREPARE: 8153. run_prepare_stmt(cn, command, query, query_len, ds, ds_warnings); 8154. flags &= ~QUERY_SEND_FLAG; ^ 8155. goto end; 8156. break; #67 client/mysqltest.cc:8159: error: Dead Store The value written to `&flags` is never used. 8157. case Q_PS_BIND: 8158. run_bind_stmt(cn, command, query, query_len, ds, ds_warnings); 8159. flags &= ~QUERY_SEND_FLAG; ^ 8160. goto end; 8161. break; #68 client/mysqltest.cc:8164: error: Dead Store The value written to `&flags` is never used. 8162. case Q_PS_EXECUTE: 8163. run_execute_stmt(cn, command, query, query_len, ds, ds_warnings); 8164. flags &= ~QUERY_SEND_FLAG; ^ 8165. goto end; 8166. break; #69 client/mysqltest.cc:8169: error: Dead Store The value written to `&flags` is never used. 8167. case Q_PS_CLOSE: 8168. run_close_stmt(cn, command, query, query_len, ds, ds_warnings); 8169. flags &= ~QUERY_SEND_FLAG; ^ 8170. goto end; 8171. break; #70 client/mysqltest.cc:9503: error: Uninitialized Value `str.max_length` is read without initialization during the call to `dynstr_set()`. 9501. query_len+64, 256); 9502. util_query(mysql, query_str.str); 9503. dynstr_set(&query_str, "CREATE PROCEDURE mysqltest_tmp_sp()\n"); ^ 9504. dynstr_append_mem(&query_str, query, query_len); 9505. if (util_query(mysql, query_str.str)) #71 client/mysqltest.cc:9576: error: Uninitialized Value `ds.length` is read without initialization during the call to `check_require()`. 9574. existing file which has been specified using --require or --result 9575. */ 9576. check_require(rs_output, command->require_file); ^ 9577. } 9578. #72 client/mysqltest.cc:10896: error: Dead Store The value written to `&to` is never used. 10894. while (*from) 10895. { 10896. char *to= buff; ^ 10897. to= get_string(&buff, &from, command); 10898. if (!*from) #73 client/mysqltest.cc:11057: error: Null Dereference `res` could be null (from the call to `my_malloc()` on line 11055) and is dereferenced. 11055. res=(struct st_replace_regex*)my_malloc(PSI_NOT_INSTRUMENTED, 11056. sizeof(*res)+8192 ,MYF(MY_FAE+MY_WME)); 11057. my_init_dynamic_array(PSI_NOT_INSTRUMENTED, &res->regex_arr, sizeof(struct st_regex), 128, 128, MYF(0)); ^ 11058. 11059. expr_end= expr + expr_len; #74 client/mysqltest.cc:11057: error: Null Dereference `res` could be null (null value originating from line 11055) and is dereferenced. 11055. res=(struct st_replace_regex*)my_malloc(PSI_NOT_INSTRUMENTED, 11056. sizeof(*res)+8192 ,MYF(MY_FAE+MY_WME)); 11057. my_init_dynamic_array(PSI_NOT_INSTRUMENTED, &res->regex_arr, sizeof(struct st_regex), 128, 128, MYF(0)); ^ 11058. 11059. expr_end= expr + expr_len; #75 client/mysqltest.cc:12196: error: Dead Store The value written to `&s` is never used. 12194. char *buf, int buf_len) 12195. { 12196. char *s=buf; ^ 12197. 12198. fputs(prompt, stdout); #76 client/readline.cc:61: error: Uninitialized Value `out_length` is read without initialization. 59. { 60. char *pos; 61. ulong UNINIT_VAR(out_length); ^ 62. 63. if (!(pos=intern_read_line(line_buff, &out_length))) #77 extra/innochecksum.cc:893: error: Dead Store The value written to `&undo_page_type` is never used. 891. case FIL_PAGE_UNDO_LOG: 892. page_type.n_fil_page_undo_log++; 893. undo_page_type = mach_read_from_2(page + ^ 894. TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE); 895. if (file) { #78 extra/mariabackup/backup_copy.cc:1695: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `datadir_iter_new()` on line 1646 is not freed after the last access at line 1695, column 5. 1693. if (directory_exists(ROCKSDB_BACKUP_DIR, false)) { 1694. if (my_rmtree(ROCKSDB_BACKUP_DIR, MYF(0))) { 1695. die("Can't remove " ROCKSDB_BACKUP_DIR); ^ 1696. } 1697. } #79 extra/mariabackup/backup_copy.cc:1701: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `datadir_iter_new()` on line 1646 is not freed after the last access at line 1701, column 5. 1699. if (directory_exists(path, false)) { 1700. if (my_mkdir(ROCKSDB_BACKUP_DIR, 0777, MYF(0))) { 1701. die("my_mkdir failed for " ROCKSDB_BACKUP_DIR); ^ 1702. } 1703. ds_data->copy_or_move_dir(path, ROCKSDB_BACKUP_DIR, true, true); #80 extra/mariabackup/backup_copy.cc:2187: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `datadir_iter_new()` on line 2185 is not freed after the last access at line 2187, column 2. 2185. it = datadir_iter_new(".", false); 2186. 2187. ut_a(xtrabackup_parallel >= 0); ^ 2188. 2189. ret = run_data_threads(it, decrypt_decompress_thread_func, #81 extra/mariabackup/backup_mysql.cc:424: error: Dead Store The value written to `&ret` is never used. 422. unsigned long server_version= mysql_get_server_version(connection); 423. 424. bool ret= true; ^ 425. 426. mysql_variable mysql_vars[]= { #82 extra/mariabackup/backup_mysql.cc:2035: error: Unnecessary Copy copied variable `full_table_name` is not modified after it is copied from `std::map::operator[]()` on line 2035. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 2033. return; 2034. 2035. std::string full_table_name = spaceid_to_tablename[space_id]; ^ 2036. 2037. DBUG_EXECUTE_IF("rename_during_mdl_lock_table", #83 extra/mariabackup/ds_stdout.cc:55: error: Null Dereference `ctxt` could be null (from the call to `my_malloc()` on line 53) and is dereferenced. 53. ctxt = (ds_ctxt_t *)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(ds_ctxt_t), MYF(MY_FAE)); 54. 55. ctxt->root = my_strdup(PSI_NOT_INSTRUMENTED, root, MYF(MY_FAE)); ^ 56. 57. return ctxt; #84 extra/mariabackup/quicklz/quicklz.c:81: error: Uninitialized Value `i` is read without initialization. 79. int i; 80. (void)state; 81. (void)i; ^ 82. #if QLZ_COMPRESSION_LEVEL == 2 83. for(i = 0; i < QLZ_HASH_VALUES; i++) #85 extra/mariabackup/xbstream_read.cc:50: error: Null Dereference `stream` could be null (from the call to `my_malloc()` on line 44) and is dereferenced. 48. #endif 49. 50. stream->fd = my_fileno(stdin); ^ 51. stream->offset = 0; 52. #86 extra/mariabackup/xbstream_write.cc:68: error: Null Dereference `stream` could be null (from the call to `my_malloc()` on line 67) and is dereferenced. 66. 67. stream = (xb_wstream_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(xb_wstream_t), MYF(MY_FAE)); 68. pthread_mutex_init(&stream->mutex, NULL); ^ 69. 70. return stream;; #87 extra/mariabackup/xtrabackup.cc:442: error: Const Refable Parameter Function parameter `name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 440. 441. /** Insert the deferred tablespace id with the name */ 442. void insert_defer_id(space_id_t space_id, std::string name) ^ 443. { 444. auto it= defer_space_names.find(name); #88 extra/mariabackup/xtrabackup.cc:453: error: Const Refable Parameter Function parameter `new_name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 451. 452. /** Rename the deferred tablespace with new name */ 453. void rename_defer(space_id_t space_id, std::string old_name, ^ 454. std::string new_name) 455. { #89 extra/mariabackup/xtrabackup.cc:453: error: Const Refable Parameter Function parameter `old_name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 451. 452. /** Rename the deferred tablespace with new name */ 453. void rename_defer(space_id_t space_id, std::string old_name, ^ 454. std::string new_name) 455. { #90 extra/mariabackup/xtrabackup.cc:471: error: Const Refable Parameter Function parameter `name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 469. 470. /** Delete the deferred tablespace */ 471. void delete_defer(space_id_t space_id, std::string name) ^ 472. { 473. deferred_tables.erase(space_id); #91 extra/mariabackup/xtrabackup.cc:2374: error: Deadlock `innodb_init` (Trace 1) and `recv_sys_t::apply` (Trace 2) acquire locks `&(this->mutex.m_mutex)` in `class recv_sys_t` and `&(log_sys.mutex.m_mutex)` in `class log_t` in reverse orders. Additional report(s) on the same line were suppressed. 2372. 2373. if (err == DB_SUCCESS) { 2374. err = srv_start(create_new_db); ^ 2375. } 2376. #92 extra/mariabackup/xtrabackup.cc:4565: error: Deadlock `Backup_datasinks::backup_low` (Trace 1) and `recv_sys_t::apply` (Trace 2) acquire locks `&(this->mutex.m_mutex)` in `class recv_sys_t` and `&(log_sys.mutex.m_mutex)` in `class log_t` in reverse orders. Additional report(s) on the same line were suppressed. 4563. } 4564. 4565. if (metadata_to_lsn && xtrabackup_copy_logfile(true)) { ^ 4566. mysql_mutex_unlock(&log_sys.mutex); 4567. ds_close(dst_log_file); #93 extra/mariabackup/xtrabackup.cc:4926: error: Deadlock `xtrabackup_backup_func` (Trace 1) and `recv_sys_t::apply` (Trace 2) acquire locks `&(this->mutex.m_mutex)` in `class recv_sys_t` and `&(log_sys.mutex.m_mutex)` in `class log_t` in reverse orders. Additional report(s) on the same line were suppressed. 4924. 4925. if (ok) { 4926. ok = backup_datasinks.backup_low(); ^ 4927. 4928. backup_release(); #94 extra/mariabackup/xtrabackup.cc:5021: warning: Lock Consistency Violation Read/Write race. Non-private method `CorruptedPages::backup_fix_ddl` reads without synchronization from container `&(ddl_tracker.id_to_name)` via call to `std::map,std::allocator>,std::less,std::allocator,std::allocator>>>>::find`, which races with the write in method `CorruptedPages::backup_fix_ddl`. 5019. } 5020. 5021. if (ddl_tracker.id_to_name.find(id) == ddl_tracker.id_to_name.end()) { ^ 5022. continue; 5023. } #95 extra/mariabackup/xtrabackup.cc:5115: warning: Lock Consistency Violation Read/Write race. Non-private method `CorruptedPages::backup_fix_ddl` indirectly reads without synchronization from `innodb_counter_value[_].mon_min_value`, which races with the write in method `CorruptedPages::zero_out_free_pages`. 5113. } 5114. 5115. xb_load_single_table_tablespace(iter->second, false); ^ 5116. } 5117. #96 extra/mariabackup/xtrabackup.cc:5132: warning: Lock Consistency Violation Read/Write race. Non-private method `CorruptedPages::backup_fix_ddl` indirectly reads without synchronization from `innodb_counter_value[_].mon_max_value`, which races with the write in method `CorruptedPages::zero_out_free_pages`. 5130. for (const auto &t : new_tables) { 5131. if (!check_if_skip_table(t.second.c_str())) { 5132. xb_load_single_table_tablespace(t.second, false, ^ 5133. t.first); 5134. } #97 extra/mariabackup/xtrabackup.cc:5642: error: Const Refable Parameter Function parameter `new_ext` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 5640. 5641. 5642. std::string change_extension(std::string filename, std::string new_ext) { ^ 5643. DBUG_ASSERT(new_ext.size() == 3); 5644. std::string new_name(filename); #98 extra/mariabackup/xtrabackup.cc:5935: error: Const Refable Parameter Function parameter `name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 5933. 5934. /** Check if file exists*/ 5935. static bool file_exists(std::string name) ^ 5936. { 5937. return access(name.c_str(), R_OK) == 0 ; #99 extra/mariabackup/xtrabackup.cc:5941: error: Const Refable Parameter Function parameter `file` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 5939. 5940. /** Read file content into STL string */ 5941. static std::string read_file_as_string(const std::string file) { ^ 5942. char content[FN_REFLEN]; 5943. FILE *f = fopen(file.c_str(), "r"); #100 extra/mariabackup/xtrabackup.cc:6206: error: Deadlock `xtrabackup_prepare_func` (Trace 1) and `recv_sys_t::apply` (Trace 2) acquire locks `&(this->mutex.m_mutex)` in `class recv_sys_t` and `&(log_sys.mutex.m_mutex)` in `class log_t` in reverse orders. Additional report(s) on the same line were suppressed. 6204. 6205. recv_sys.recovery_on = false; 6206. if (innodb_init()) { ^ 6207. goto error_cleanup; 6208. } #101 extra/mariabackup/xtrabackup.cc:7138: error: Deadlock `main_low` (Trace 1) and `recv_sys_t::apply` (Trace 2) acquire locks `&(this->mutex.m_mutex)` in `class recv_sys_t` and `&(log_sys.mutex.m_mutex)` in `class log_t` in reverse orders. Additional report(s) on the same line were suppressed. 7136. 7137. /* --backup */ 7138. if (xtrabackup_backup && !xtrabackup_backup_func()) { ^ 7139. return(EXIT_FAILURE); 7140. } #102 extra/mariabackup/xtrabackup.cc:7144: error: Deadlock `main_low` (Trace 1) and `recv_sys_t::apply` (Trace 2) acquire locks `&(this->mutex.m_mutex)` in `class recv_sys_t` and `&(log_sys.mutex.m_mutex)` in `class log_t` in reverse orders. Additional report(s) on the same line were suppressed. 7142. /* --prepare */ 7143. if (xtrabackup_prepare 7144. && !xtrabackup_prepare_func(argv)) { ^ 7145. return(EXIT_FAILURE); 7146. } #103 extra/replace.c:1061: error: Dead Store The value written to `&org_name` is never used. 1059. int error; 1060. FILE *in,*out; 1061. char dir_buff[FN_REFLEN], tempname[FN_REFLEN], *org_name = name; ^ 1062. #ifdef HAVE_READLINK 1063. char link_name[FN_REFLEN]; #104 include/mysql/psi/mysql_socket.h:1243: error: Uninitialized Value `__param_0.is_unix_domain_socket` is read without initialization during the call to `st_mysql_socket::st_mysql_socket()`. 1241. #endif 1242. 1243. return socket_accept; ^ 1244. } 1245. #105 include/mysql/psi/mysql_thread.h:752: error: Deadlock `ddl_log_execute_recovery` (Trace 1) and `wait_for_commit::unregister_wait_for_prior_commit2` (Trace 2) acquire locks `&(waitee->LOCK_wait_commit.m_mutex)` in `class wait_for_commit` and `&(that->m_mutex)` in `class st_mysql_mutex` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #106 include/mysql/psi/mysql_thread.h:752: error: Deadlock `dispatch_command` (Trace 1) and `THD::awake` (Trace 2) acquire locks `&(this->LOCK_thd_kill.m_mutex)` in `class THD` and `&(this->LOCK_thd_data.m_mutex)` in `class THD` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #107 include/mysql/psi/mysql_thread.h:752: error: Deadlock `handle_delayed_insert` (Trace 1) and `wait_for_commit::unregister_wait_for_prior_commit2` (Trace 2) acquire locks `&(waitee->LOCK_wait_commit.m_mutex)` in `class wait_for_commit` and `&(that->m_mutex)` in `class st_mysql_mutex` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #108 include/mysql/psi/mysql_thread.h:752: error: Deadlock `handle_rpl_parallel_thread` (Trace 1) and `wait_for_commit::unregister_wait_for_prior_commit2` (Trace 2) acquire locks `&(waitee->LOCK_wait_commit.m_mutex)` in `class wait_for_commit` and `&(that->m_mutex)` in `class st_mysql_mutex` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #109 include/mysql/psi/mysql_thread.h:752: error: Deadlock `handle_slave_sql` (Trace 1) and `wait_for_commit::unregister_wait_for_prior_commit2` (Trace 2) acquire locks `&(this->LOCK_wait_commit.m_mutex)` in `class wait_for_commit` and `&(that->m_mutex)` in `class st_mysql_mutex` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #110 include/mysql/psi/mysql_thread.h:752: error: Deadlock `recv_recovery_from_checkpoint_start` (Trace 1) and `recv_sys_t::apply` (Trace 2) acquire locks `&(this->mutex.m_mutex)` in `class recv_sys_t` and `&(log_sys.mutex.m_mutex)` in `class log_t` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #111 include/mysql/psi/mysql_thread.h:752: error: Deadlock `spider_bg_mon_action` (Trace 1) and `wait_for_commit::unregister_wait_for_prior_commit2` (Trace 2) acquire locks `&(waitee->LOCK_wait_commit.m_mutex)` in `class wait_for_commit` and `&(that->m_mutex)` in `class st_mysql_mutex` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #112 include/mysql/psi/mysql_thread.h:752: error: Deadlock `spider_db_bulk_update_size_limit` (Trace 1) and `wait_for_commit::unregister_wait_for_prior_commit2` (Trace 2) acquire locks `&(waitee->LOCK_wait_commit.m_mutex)` in `class wait_for_commit` and `&(that->m_mutex)` in `class st_mysql_mutex` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #113 include/mysql/psi/mysql_thread.h:752: error: Deadlock `spider_get_share` (Trace 1) and `wait_for_commit::unregister_wait_for_prior_commit2` (Trace 2) acquire locks `&(waitee->LOCK_wait_commit.m_mutex)` in `class wait_for_commit` and `&(that->m_mutex)` in `class st_mysql_mutex` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #114 include/mysql/psi/mysql_thread.h:752: error: Deadlock `wsrep_rollback_local` (Trace 1) and `THD::awake` (Trace 2) acquire locks `&(this->LOCK_thd_kill.m_mutex)` in `class THD` and `&(this->LOCK_thd_data.m_mutex)` in `class THD` in reverse orders. Additional report(s) on the same line were suppressed. 750. return safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line); 751. #else 752. return pthread_mutex_lock(&that->m_mutex); ^ 753. #endif 754. } #115 libmariadb/libmariadb/ma_default.c:302: error: Dead Store The value written to `&key` is never used. 300. *ptr=0; 301. set_option(mysql, key, optval); 302. key= optval= 0; ^ 303. } 304. } #116 libmariadb/libmariadb/ma_dtoa.c:98: error: Null Dereference The call to `dtoa` may trigger the following issue: `res` could be null (from the call to `dtoa()` on line 98) and is dereferenced in the call to `dtoa()`. 96. DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL); 97. 98. res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf)); ^ 99. 100. if (decpt == DTOA_OVERFLOW) #117 libmariadb/libmariadb/ma_dtoa.c:1306: error: Uninitialized Value `ilim` is read without initialization. 1304. */ 1305. 1306. int bbits, b2, b5, be, dig, i, ieps, UNINIT_VAR(ilim), ilim0, ^ 1307. UNINIT_VAR(ilim1), j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, 1308. spec_case, try_quick; #118 libmariadb/libmariadb/ma_dtoa.c:1307: error: Uninitialized Value `ilim1` is read without initialization. 1305. 1306. int bbits, b2, b5, be, dig, i, ieps, UNINIT_VAR(ilim), ilim0, 1307. UNINIT_VAR(ilim1), j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, ^ 1308. spec_case, try_quick; 1309. Long L; #119 libmariadb/libmariadb/ma_io.c:126: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `mysql_client_find_plugin()`. 124. MYSQL mysql; 125. if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *) 126. mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN))) ^ 127. return rio_plugin->methods->mopen(location, mode); 128. return NULL; #120 libmariadb/libmariadb/mariadb_async.c:86: error: Uninitialized Value `sock` is read without initialization. 84. polls ready for write, indicating that the connection attempt completed. 85. */ 86. res= connect(sock, name, namelen); ^ 87. if (res != 0) 88. { #121 libmariadb/libmariadb/mariadb_dyncol.c:521: error: Dead Store The value written to `&val` is never used. 519. uchar *place, size_t offset_size) 520. { 521. ulong UNINIT_VAR(val); ^ 522. ulong UNINIT_VAR(lim); 523. #122 libmariadb/libmariadb/mariadb_dyncol.c:521: error: Uninitialized Value `val` is read without initialization. 519. uchar *place, size_t offset_size) 520. { 521. ulong UNINIT_VAR(val); ^ 522. ulong UNINIT_VAR(lim); 523. #123 libmariadb/libmariadb/mariadb_dyncol.c:522: error: Dead Store The value written to `&lim` is never used. 520. { 521. ulong UNINIT_VAR(val); 522. ulong UNINIT_VAR(lim); ^ 523. 524. DBUG_ASSERT(offset_size >= 1 && offset_size <= 4); #124 libmariadb/libmariadb/mariadb_dyncol.c:522: error: Uninitialized Value `lim` is read without initialization. 520. { 521. ulong UNINIT_VAR(val); 522. ulong UNINIT_VAR(lim); ^ 523. 524. DBUG_ASSERT(offset_size >= 1 && offset_size <= 4); #125 libmariadb/libmariadb/mariadb_dyncol.c:556: error: Dead Store The value written to `&val` is never used. 554. uchar *place, size_t offset_size) 555. { 556. ulonglong UNINIT_VAR(val); ^ 557. ulonglong UNINIT_VAR(lim); 558. DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); #126 libmariadb/libmariadb/mariadb_dyncol.c:556: error: Uninitialized Value `val` is read without initialization. 554. uchar *place, size_t offset_size) 555. { 556. ulonglong UNINIT_VAR(val); ^ 557. ulonglong UNINIT_VAR(lim); 558. DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); #127 libmariadb/libmariadb/mariadb_dyncol.c:557: error: Dead Store The value written to `&lim` is never used. 555. { 556. ulonglong UNINIT_VAR(val); 557. ulonglong UNINIT_VAR(lim); ^ 558. DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); 559. #128 libmariadb/libmariadb/mariadb_dyncol.c:557: error: Uninitialized Value `lim` is read without initialization. 555. { 556. ulonglong UNINIT_VAR(val); 557. ulonglong UNINIT_VAR(lim); ^ 558. DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); 559. #129 libmariadb/libmariadb/mariadb_dyncol.c:2325: error: Dead Store The value written to `&rc` is never used. 2323. { 2324. DYN_HEADER header; 2325. enum enum_dyncol_func_result rc= ER_DYNCOL_FORMAT; ^ 2326. memset(&header, 0, sizeof(header)); 2327. #130 libmariadb/libmariadb/mariadb_dyncol.c:2592: error: Uninitialized Value `flag` is read without initialization. 2590. { 2591. uint mid, start, end, val; 2592. int UNINIT_VAR(flag); ^ 2593. LEX_STRING str; 2594. char buff[DYNCOL_NUM_CHAR]; #131 libmariadb/libmariadb/mariadb_dyncol.c:2911: error: Uninitialized Value `first_offset` is read without initialization. 2909. i++) 2910. { 2911. size_t UNINIT_VAR(first_offset); ^ 2912. uint start= j, end; 2913. #132 libmariadb/libmariadb/mariadb_dyncol.c:3742: error: Dead Store The value written to `&prev_num` is never used. 3740. } 3741. } 3742. prev_num= num; ^ 3743. prev_name= name; 3744. prev_data_offset= data_offset; #133 libmariadb/libmariadb/mariadb_dyncol.c:4146: error: Uninitialized Value `hdr.offset` is read without initialization during the call to `hdr_interval_length()`. 4144. goto err; 4145. header.length= 4146. hdr_interval_length(&header, header.entry + header.entry_size); ^ 4147. header.data= header.dtpool + header.offset; 4148. /* #134 libmariadb/libmariadb/mariadb_dyncol.c:4285: error: Uninitialized Value `hdr.offset` is read without initialization during the call to `hdr_interval_length()`. 4283. { 4284. header.length= 4285. hdr_interval_length(&header, header.entry + header.entry_size); ^ 4286. header.data= header.dtpool + header.offset; 4287. /* #135 libmariadb/libmariadb/mariadb_lib.c:1047: error: Null Dereference null (null value originating from line 1047) is dereferenced. 1045. ***************************************************************************/ 1046. 1047. static size_t rset_field_offsets[]= { ^ 1048. OFFSET(MYSQL_FIELD, catalog), 1049. OFFSET(MYSQL_FIELD, catalog_length), #136 libmariadb/libmariadb/mariadb_lib.c:1149: error: Dead Store The value written to `&p` is never used. 1147. 1148. /* filler */ 1149. p+= 2; ^ 1150. 1151. if (INTERNAL_NUM_FIELD(field)) #137 libmariadb/libmariadb/mariadb_lib.c:2156: error: Uninitialized Value `_.extension` is read without initialization. 2154. if (mysql->extension->conn_hdlr) 2155. { 2156. tmp_mysql.extension->conn_hdlr= mysql->extension->conn_hdlr; ^ 2157. mysql->extension->conn_hdlr= 0; 2158. } #138 libmariadb/libmariadb/mariadb_lib.c:2171: error: Uninitialized Value `mysql.methods` is read without initialization during the call to `mysql_real_connect()`. 2169. } 2170. 2171. if (!mysql_real_connect(&tmp_mysql, ^ 2172. mysql->options.host ? NULL : mysql->host, 2173. mysql->user,mysql->passwd, #139 libmariadb/libmariadb/mariadb_lib.c:2607: error: Uninitialized Value `str` is read without initialization. 2605. goto mem_error; 2606. 2607. str->str= tmp; ^ 2608. memcpy(str->str, data1->str, data1->length); 2609. str->length= data1->length; #140 libmariadb/libmariadb/mariadb_lib.c:2607: error: Uninitialized Value `tmp` is read without initialization. 2605. goto mem_error; 2606. 2607. str->str= tmp; ^ 2608. memcpy(str->str, data1->str, data1->length); 2609. str->length= data1->length; #141 libmariadb/libmariadb/mariadb_lib.c:3608: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `my_context_init()` on line 3599 is not freed after the last access at line 3608, column 9. 3606. calloc(1, sizeof(struct st_mysql_options_extension)))) 3607. { 3608. free(ctxt); ^ 3609. SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); 3610. goto end; #142 libmariadb/libmariadb/mariadb_rpl.c:1180: error: Dead Store The value written to `&ev` is never used. 1178. ev+= 1; 1179. rpl_event->event.heartbeat.flags= uint2korr(ev); 1180. ev+= 2; ^ 1181. 1182. break; #143 libmariadb/libmariadb/mariadb_rpl.c:1197: error: Dead Store The value written to `&ev` is never used. 1195. /* terminating zero */ 1196. RPL_CHECK_POS(ev, ev_end, 1); 1197. ev++; ^ 1198. break; 1199. #144 libmariadb/libmariadb/mariadb_rpl.c:1208: error: Dead Store The value written to `&ev` is never used. 1206. memcpy(rpl_event->event.start_encryption.nonce, ev, 12); 1207. memcpy(rpl->nonce, ev, 12); 1208. ev+= 12; ^ 1209. rpl->encrypted= 1; 1210. break; #145 libmariadb/libmariadb/mariadb_rpl.c:1252: error: Dead Store The value written to `&ev` is never used. 1250. RPL_CHECK_POS(ev, ev_end, len); 1251. rpl_set_string_and_len(&rpl_event->event.execute_load_query.statement, ev, len); 1252. ev+= len; ^ 1253. break; 1254. } #146 libmariadb/libmariadb/mariadb_rpl.c:1266: error: Dead Store The value written to `&ev` is never used. 1264. if (ma_set_rpl_filename(rpl, ev, len)) 1265. goto mem_error; 1266. ev+= len; ^ 1267. break; 1268. #147 libmariadb/libmariadb/mariadb_rpl.c:1317: error: Dead Store The value written to `&ev` is never used. 1315. { 1316. rpl_event->checksum= uint4korr(ev); 1317. ev+= 4; ^ 1318. } 1319. break; #148 libmariadb/libmariadb/mariadb_rpl.c:1456: error: Dead Store The value written to `&ev` is never used. 1454. ev+= 8; 1455. rpl_event->event.rand.second_seed= uint8korr(ev); 1456. ev+= 8; ^ 1457. 1458. break; #149 libmariadb/libmariadb/mariadb_rpl.c:1466: error: Dead Store The value written to `&ev` is never used. 1464. ev++; 1465. rpl_event->event.intvar.value= uint8korr(ev); 1466. ev+= 8; ^ 1467. break; 1468. #150 libmariadb/libmariadb/mariadb_rpl.c:1532: error: Dead Store The value written to `&ev` is never used. 1530. if ((unsigned long)(ev - rpl_event->raw_data) < rpl_event->raw_data_size) 1531. rpl_event->event.uservar.flags= *ev; 1532. ev++; ^ 1533. } 1534. break; #151 libmariadb/libmariadb/mariadb_rpl.c:1567: error: Dead Store The value written to `&ev` is never used. 1565. goto mem_error; 1566. 1567. ev+= len; ^ 1568. break; 1569. #152 libmariadb/libmariadb/mariadb_rpl.c:1635: error: Dead Store The value written to `&ev` is never used. 1633. rpl_event->event.previous_gtid.content.data= ev; 1634. rpl_event->event.previous_gtid.content.length= len; 1635. ev+= len; ^ 1636. } 1637. break; #153 libmariadb/libmariadb/mariadb_rpl.c:1657: error: Dead Store The value written to `&ev` is never used. 1655. ev+= 16; 1656. rpl_event->event.gtid_log.sequence_nr= uint8korr(ev); 1657. ev+= 8; ^ 1658. break; 1659. #154 libmariadb/libmariadb/mariadb_rpl.c:1689: error: Dead Store The value written to `&ev` is never used. 1687. RPL_CHECK_POS(ev, ev_end, 8); 1688. rpl_event->event.gtid.commit_id= uint8korr(ev); 1689. ev+= 8; ^ 1690. } 1691. else if (rpl_event->event.gtid.flags & (FL_PREPARED_XA | FL_COMPLETED_XA)) #155 libmariadb/libmariadb/mariadb_rpl.c:1704: error: Dead Store The value written to `&ev` is never used. 1702. RPL_CHECK_POS(ev, ev_end, len); 1703. rpl_set_string_and_len(&rpl_event->event.gtid.xid, ev, len); 1704. ev+= len; ^ 1705. } 1706. else #156 libmariadb/libmariadb/mariadb_rpl.c:1707: error: Dead Store The value written to `&ev` is never used. 1705. } 1706. else 1707. ev+= 6; ^ 1708. break; 1709. #157 libmariadb/libmariadb/mariadb_stmt.c:2285: error: Dead Store The value written to `&ret` is never used. 2283. { 2284. MYSQL *mysql= stmt->mysql; 2285. my_bool ret= 1; ^ 2286. unsigned int flags= MADB_RESET_LONGDATA | MADB_RESET_BUFFER | MADB_RESET_ERROR; 2287. unsigned int last_status; #158 libmariadb/plugins/auth/my_auth.c:69: error: Dead Store The value written to `&pkt_len` is never used. 67. */ 68. pkt= (uchar*)mysql->scramble_buff; 69. pkt_len= SCRAMBLE_LENGTH + 1; ^ 70. } 71. else #159 libmariadb/plugins/auth/my_auth.c:214: error: Dead Store The value written to `&end` is never used. 212. /* see end= buff+32 below, fixed size of the packet is 32 bytes */ 213. buff= malloc(33 + USERNAME_LENGTH + data_len + NAME_LEN + NAME_LEN + conn_attr_len + 9); 214. end= buff; ^ 215. 216. mysql->client_flag|= mysql->options.client_flag; #160 libmariadb/plugins/pvio/pvio_socket.c:347: error: Dead Store The value written to `&r` is never used. 345. ssize_t pvio_socket_async_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) 346. { 347. ssize_t r= -1; ^ 348. #ifndef _WIN32 349. int read_flags= MSG_DONTWAIT; #161 libmariadb/plugins/pvio/pvio_socket.c:420: error: Dead Store The value written to `&r` is never used. 418. ssize_t pvio_socket_async_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length) 419. { 420. ssize_t r= -1; ^ 421. struct st_pvio_socket *csock= NULL; 422. #ifndef _WIN32 #162 libmariadb/unittest/libmariadb/async.c:94: error: Dead Store The value written to `&res` is never used. 92. struct pollfd pfd; 93. int timeout; 94. int res= -1; ^ 95. 96. pfd.fd= mysql_get_socket(mysql); #163 libmariadb/unittest/libmariadb/async.c:150: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `mysql_options()`. 148. 149. mysql_init(&mysql); 150. rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); ^ 151. check_mysql_rc(rc, (MYSQL *)&mysql); 152. #164 libmariadb/unittest/libmariadb/async.c:266: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `mysql_options()`. 264. { 265. mysql_init(&mysql); 266. rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); ^ 267. check_mysql_rc(rc, (MYSQL *)&mysql); 268. #165 libmariadb/unittest/libmariadb/basic-t.c:66: error: Dead Store The value written to `&rc` is never used. 64. mysql_kill(my, thread_id); 65. mysql_ping(mysql); 66. rc= mysql_query(mysql, "load data local infile './nonexistingfile.csv' into table a (`a`)"); ^ 67. FAIL_IF(!test(mysql->options.client_flag | CLIENT_LOCAL_FILES), "client_flags not correct"); 68. diag("thread1: %ld %ld", thread_id, mysql_thread_id(mysql)); #166 libmariadb/unittest/libmariadb/basic-t.c:566: error: Dead Store The value written to `&rc` is never used. 564. FAIL_UNLESS(res == 20, ""); 565. /* If first autogenerated number fails and 2nd works: */ 566. rc= mysql_query(mysql, "insert into t4 values (null,'e')"); ^ 567. res= mysql_insert_id(mysql); 568. FAIL_UNLESS(res == 1, ""); #167 libmariadb/unittest/libmariadb/bulk1.c:64: error: Dead Store The value written to `&rc` is never used. 62. return SKIP; 63. 64. rc= mysql_select_db(mysql, "testc"); ^ 65. 66. rc= mysql_query(mysql, "DROP TABLE IF EXISTS bulk1"); #168 libmariadb/unittest/libmariadb/bulk1.c:1006: error: Dead Store The value written to `&array_size` is never used. 1004. int rc; 1005. MYSQL_BIND bind[2]; 1006. unsigned int array_size= 2; ^ 1007. int val_a[2]= {1,2}; 1008. char indicators[2]= {STMT_INDICATOR_NULL, STMT_INDICATOR_NULL}; #169 libmariadb/unittest/libmariadb/connection.c:134: error: Uninitialized Value `sql_big_selects_2` is read without initialization. 132. /* Check that SQL_BIG_SELECTS is reset properly. */ 133. 134. FAIL_UNLESS(sql_big_selects_orig == sql_big_selects_2, "Different value for sql_big_select"); ^ 135. 136. /*********************************************************************** #170 libmariadb/unittest/libmariadb/connection.c:134: error: Uninitialized Value `sql_big_selects_orig` is read without initialization. 132. /* Check that SQL_BIG_SELECTS is reset properly. */ 133. 134. FAIL_UNLESS(sql_big_selects_orig == sql_big_selects_2, "Different value for sql_big_select"); ^ 135. 136. /*********************************************************************** #171 libmariadb/unittest/libmariadb/connection.c:161: error: Uninitialized Value `sql_big_selects_3` is read without initialization. 159. /* Check that SQL_BIG_SELECTS is 0. */ 160. 161. FAIL_UNLESS(sql_big_selects_3 == 0, "big_selects != 0"); ^ 162. 163. /*********************************************************************** #172 libmariadb/unittest/libmariadb/connection.c:170: error: Dead Store The value written to `&rc` is never used. 168. /* Set MAX_JOIN_SIZE to the default value (-1). */ 169. 170. rc= mysql_query(mysql, "SET @@global.max_join_size = cast(-1 as unsigned int)"); ^ 171. rc= mysql_query(mysql, "SET @@session.max_join_size = default"); 172. #173 libmariadb/unittest/libmariadb/connection.c:171: error: Dead Store The value written to `&rc` is never used. 169. 170. rc= mysql_query(mysql, "SET @@global.max_join_size = cast(-1 as unsigned int)"); 171. rc= mysql_query(mysql, "SET @@session.max_join_size = default"); ^ 172. 173. /* Issue COM_CHANGE_USER. */ #174 libmariadb/unittest/libmariadb/connection.c:186: error: Uninitialized Value `sql_big_selects_4` is read without initialization. 184. /* Check that SQL_BIG_SELECTS is 1. */ 185. 186. FAIL_UNLESS(sql_big_selects_4 == 1, "sql_big_select != 1"); ^ 187. 188. /*********************************************************************** #175 libmariadb/unittest/libmariadb/connection.c:212: error: Uninitialized Value `sql_big_selects_5` is read without initialization. 210. /* Check that SQL_BIG_SELECTS is 1. */ 211. 212. FAIL_UNLESS(sql_big_selects_5 == sql_big_selects_orig, "big_select != 1"); ^ 213. 214. /*********************************************************************** #176 libmariadb/unittest/libmariadb/connection.c:224: error: Dead Store The value written to `&user_pw` is never used. 222. { 223. char buff[256]; 224. const char *user_pw= "mysqltest_pw"; ^ 225. const char *user_no_pw= "mysqltest_no_pw"; 226. const char *pw= "password"; #177 libmariadb/unittest/libmariadb/connection.c:225: error: Dead Store The value written to `&user_no_pw` is never used. 223. char buff[256]; 224. const char *user_pw= "mysqltest_pw"; 225. const char *user_no_pw= "mysqltest_no_pw"; ^ 226. const char *pw= "password"; 227. const char *db= "mysqltest_user_test_database"; #178 libmariadb/unittest/libmariadb/connection.c:226: error: Dead Store The value written to `&pw` is never used. 224. const char *user_pw= "mysqltest_pw"; 225. const char *user_no_pw= "mysqltest_no_pw"; 226. const char *pw= "password"; ^ 227. const char *db= "mysqltest_user_test_database"; 228. int rc; #179 libmariadb/unittest/libmariadb/connection.c:227: error: Dead Store The value written to `&db` is never used. 225. const char *user_no_pw= "mysqltest_no_pw"; 226. const char *pw= "password"; 227. const char *db= "mysqltest_user_test_database"; ^ 228. int rc; 229. #180 libmariadb/unittest/libmariadb/connection.c:543: error: Dead Store The value written to `&rc` is never used. 541. 542. /* use compressed protocol */ 543. rc= mysql_options(mysql, MYSQL_OPT_COMPRESS, NULL); ^ 544. 545. if (!(my_test_connect(mysql, hostname, username, #181 libmariadb/unittest/libmariadb/connection.c:769: error: Dead Store The value written to `&rc` is never used. 767. mysql->options.unused_1= 1; 768. 769. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 770. 771. mysql_ping(mysql); #182 libmariadb/unittest/libmariadb/connection.c:778: error: Dead Store The value written to `&rc` is never used. 776. FAIL_IF(mysql->options.unused_1 != 1, "options got lost"); 777. 778. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 779. 780. mysql_ping(mysql); #183 libmariadb/unittest/libmariadb/connection.c:829: error: Dead Store The value written to `&rc` is never used. 827. 828. sprintf(query, "DROP USER '%s'@'%s'", username, bind_addr); 829. rc= mysql_query(my, query); ^ 830. 831. sprintf(query, "CREATE USER '%s'@'%s' IDENTIFIED BY '%s'", username, bind_addr, password); #184 libmariadb/unittest/libmariadb/connection.c:1408: error: Dead Store The value written to `&rc` is never used. 1406. } 1407. sprintf(query, "DROP USER 'foo'@'%s'", this_host); 1408. rc= mysql_query(my, query); ^ 1409. 1410. sprintf(query, "CREATE USER 'foo'@'%s' IDENTIFIED BY 'foo'", this_host); #185 libmariadb/unittest/libmariadb/connection.c:1675: error: Dead Store The value written to `&rc` is never used. 1673. 1674. sprintf(query, "DROP USER 'foo'@'%s'", this_host); 1675. rc= mysql_query(my, query); ^ 1676. 1677. sprintf(query, "CREATE USER 'foo'@'%s' IDENTIFIED WITH caching_sha2_password BY 'foo'", this_host); #186 libmariadb/unittest/libmariadb/connection.c:1822: error: Dead Store The value written to `&rc` is never used. 1820. 1821. sprintf(query, "KILL %lu", thread_id); 1822. rc= mysql_query(mysql, query); ^ 1823. 1824. sleep(3); #187 libmariadb/unittest/libmariadb/connection.c:2154: error: Dead Store The value written to `&rc` is never used. 2152. { 2153. diag("Error: %s", mysql_error(mysql)); 2154. rc= FAIL; ^ 2155. } 2156. #188 libmariadb/unittest/libmariadb/connection.c:2229: error: Dead Store The value written to `&rc` is never used. 2227. struct st_callback data= {0,"", ""}; 2228. 2229. rc= mysql_optionsv(mysql, MARIADB_OPT_STATUS_CALLBACK, my_status_callback, &data); ^ 2230. 2231. if (!my_test_connect(mysql, hostname, username, #189 libmariadb/unittest/libmariadb/connection.c:2285: error: Dead Store The value written to `&rc` is never used. 2283. } 2284. 2285. rc= mysql_query(mysql, "DROP PROCEDURE conc632"); ^ 2286. 2287. rc= mysql_query(mysql, "CREATE PROCEDURE conc632() " #190 libmariadb/unittest/libmariadb/cursor.c:378: error: Dead Store The value written to `&rc` is never used. 376. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 377. } 378. rc= mysql_stmt_close(stmt); ^ 379. 380. rc= mysql_query(mysql, "drop table t1"); #191 libmariadb/unittest/libmariadb/cursor.c:429: error: Dead Store The value written to `&rc` is never used. 427. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 428. } 429. rc= mysql_stmt_close(stmt); ^ 430. 431. rc= mysql_query(mysql, "drop table t1"); #192 libmariadb/unittest/libmariadb/cursor.c:478: error: Dead Store The value written to `&id_val` is never used. 476. for (i= 0; i < 42; i++) 477. { 478. id_val= (i+1)*10; ^ 479. sprintf(a, "a%d", i); 480. a_len= (unsigned long)strlen(a); /* safety against broken sprintf */ #193 libmariadb/unittest/libmariadb/cursor.c:486: error: Dead Store The value written to `&rc` is never used. 484. 485. stmt_text= "select name from t1"; 486. rc= mysql_stmt_prepare(stmt, SL(stmt_text)); ^ 487. type= (ulong) CURSOR_TYPE_READ_ONLY; 488. mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type); #194 libmariadb/unittest/libmariadb/cursor.c:575: error: Dead Store The value written to `&rc` is never used. 573. rc= mysql_stmt_execute(stmt); 574. check_stmt_rc(rc, stmt);; 575. rc= mysql_query(mysql, "update t1 set id=id+100"); ^ 576. /* 577. If cursors are not materialized, the update will return an error; #195 libmariadb/unittest/libmariadb/cursor.c:611: error: Dead Store The value written to `&rc` is never used. 609. mysql_stmt_bind_result(stmt, my_bind); 610. 611. rc= mysql_stmt_execute(stmt); ^ 612. rc= mysql_stmt_fetch(stmt); 613. FAIL_UNLESS(rc == 0, "rc != 0"); #196 libmariadb/unittest/libmariadb/cursor.c:614: error: Dead Store The value written to `&rc` is never used. 612. rc= mysql_stmt_fetch(stmt); 613. FAIL_UNLESS(rc == 0, "rc != 0"); 614. rc= mysql_rollback(mysql); /* should close the cursor */ ^ 615. } 616. #197 libmariadb/unittest/libmariadb/cursor.c:873: error: Dead Store The value written to `&empno` is never used. 871. check_stmt_rc(rc, stmt); 872. 873. empno= 10; ^ 874. 875. /* ERROR: next statement causes a server crash */ #198 libmariadb/unittest/libmariadb/cursor.c:1352: error: Dead Store The value written to `&rc` is never used. 1350. rc= mysql_query(mysql, "insert into t1 (a) values (repeat('a', 256))"); 1351. check_mysql_rc(rc, mysql); 1352. rc= mysql_query(mysql, "set @@session.max_heap_table_size=16384"); ^ 1353. 1354. /* Create a big enough table (more than max_heap_table_size) */ #199 libmariadb/unittest/libmariadb/cursor.c:1369: error: Dead Store The value written to `&rc` is never used. 1367. rc= mysql_stmt_prepare(stmt, SL(stmt_text)); 1368. check_stmt_rc(rc, stmt); 1369. rc= mysql_stmt_execute(stmt); ^ 1370. while ((rc= mysql_stmt_fetch(stmt)) == 0); 1371. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); #200 libmariadb/unittest/libmariadb/cursor.c:1373: error: Dead Store The value written to `&rc` is never used. 1371. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 1372. 1373. rc= mysql_stmt_close(stmt); ^ 1374. 1375. rc= mysql_query(mysql, "drop table t1"); #201 libmariadb/unittest/libmariadb/cursor.c:1423: error: Dead Store The value written to `&rc` is never used. 1421. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); 1422. check_mysql_rc(rc, mysql); 1423. rc= mysql_query(mysql, "DROP VIEW IF EXISTS v1"); ^ 1424. rc= mysql_query(mysql, "CREATE TABLE t1 (a INTEGER)"); 1425. check_mysql_rc(rc, mysql); #202 libmariadb/unittest/libmariadb/cursor.c:1654: error: Dead Store The value written to `&rc` is never used. 1652. rc= mysql_stmt_reset(stmt); 1653. check_stmt_rc(rc, stmt); 1654. rc= mysql_stmt_fetch(stmt); ^ 1655. 1656. /* mariadb client supports GEOMETRY, so no error will #203 libmariadb/unittest/libmariadb/dyncol.c:49: error: Null Dereference `i` could be null (null value originating from line 45) and is dereferenced. 47. for (i=0; i < column_count; i++) 48. { 49. vals[i].type= DYN_COL_STRING; ^ 50. vals[i].x.string.value.str= (char *)strval[i]; 51. vals[i].x.string.value.length= strlen(strval[i]); #204 libmariadb/unittest/libmariadb/dyncol.c:57: error: Dead Store The value written to `&rc` is never used. 55. 56. mariadb_dyncol_init(&dyncol); 57. rc= mariadb_dyncol_create_many_named(&dyncol, column_count, keys1, vals, 0); ^ 58. mariadb_dyncol_free(&dyncol); 59. FAIL_IF(mariadb_dyncol_create_many_named(&dyncol, column_count, keys1, vals, 1) < 0, "Error"); #205 libmariadb/unittest/libmariadb/dyncol.c:293: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mariadb_dyncol_json()` on line 290 is not freed after the last access at line 293, column 5. 291. if (strcmp(s.str, "{\"0\":17,\"1\":{\"0\":17}}") != 0) 292. { 293. diag("%s != %s", s.str, "{\"0\":17,\"1\":{\"0\":17}}"); ^ 294. return FAIL; 295. } #206 libmariadb/unittest/libmariadb/dyncol.c:293: error: Memory Leak Memory dynamically allocated by `realloc`, indirectly via call to `mariadb_dyncol_json()` on line 290 is not freed after the last access at line 293, column 5. 291. if (strcmp(s.str, "{\"0\":17,\"1\":{\"0\":17}}") != 0) 292. { 293. diag("%s != %s", s.str, "{\"0\":17,\"1\":{\"0\":17}}"); ^ 294. return FAIL; 295. } #207 libmariadb/unittest/libmariadb/errors.c:293: error: Dead Store The value written to `&rc` is never used. 291. SKIP_MYSQL(mysql); 292. 293. rc= mysql_select_db(mysql, schema); ^ 294. 295. rc= mysql_query(mysql, "DROP TABLE IF EXISTS bulk1"); #208 libmariadb/unittest/libmariadb/features-10_2.c:88: error: Dead Store The value written to `&rc` is never used. 86. rc= mariadb_stmt_execute_direct(stmt, "DROP TABLE IF EXISTS execute_direct", -1); 87. check_stmt_rc(rc, stmt); 88. rc= mariadb_stmt_execute_direct(stmt, "CREATE TABLE execute_direct (a int, b varchar(20))", -1); ^ 89. rc= mysql_stmt_close(stmt); 90. stmt= mysql_stmt_init(mysql); #209 libmariadb/unittest/libmariadb/features-10_2.c:171: error: Dead Store The value written to `&rc` is never used. 169. 170. 171. rc= mysql_stmt_close(stmt); ^ 172. 173. return OK; #210 libmariadb/unittest/libmariadb/features-10_2.c:215: error: Null Dereference null (from the call to `mysql_stmt_init()` on line 214) is dereferenced in the call to `mysql_stmt_attr_set()`. 213. 214. stmt= mysql_stmt_init(mysql); 215. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor_type); ^ 216. check_stmt_rc(rc, stmt); 217. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_PREFETCH_ROWS, &prefetch_rows); #211 libmariadb/unittest/libmariadb/fetch.c:237: error: Dead Store The value written to `&row` is never used. 235. check_stmt_rc(rc,stmt); 236. 237. row= mysql_stmt_row_seek(stmt, row); ^ 238. 239. rc= mysql_stmt_fetch(stmt); #212 libmariadb/unittest/libmariadb/logs.c:102: error: Dead Store The value written to `&length` is never used. 100. id= 9876; 101. strcpy((char *)data, "MySQL - Open Source Database"); 102. length= strlen(data); ^ 103. 104. rc= mysql_stmt_bind_param(stmt, my_bind); #213 libmariadb/unittest/libmariadb/logs.c:111: error: Dead Store The value written to `&length` is never used. 109. 110. strcpy((char *)data, "'"); 111. length= 1; ^ 112. 113. rc= mysql_stmt_execute(stmt); #214 libmariadb/unittest/libmariadb/logs.c:117: error: Dead Store The value written to `&length` is never used. 115. 116. strcpy((char *)data, "\""); 117. length= 1; ^ 118. 119. rc= mysql_stmt_execute(stmt); #215 libmariadb/unittest/libmariadb/logs.c:123: error: Dead Store The value written to `&length` is never used. 121. 122. strcpy((char *)data, "my\'sql\'"); 123. length= strlen(data); ^ 124. rc= mysql_stmt_execute(stmt); 125. check_stmt_rc(rc, stmt); #216 libmariadb/unittest/libmariadb/misc.c:595: error: Dead Store The value written to `&rc` is never used. 593. if (verify_col_data(mysql, "t1", "year", "2014-01-01 01:01:01")) { 594. mysql_stmt_close(stmt); 595. rc= mysql_query(mysql, "drop table t1"); ^ 596. return FAIL; 597. } #217 libmariadb/unittest/libmariadb/misc.c:1292: error: Dead Store The value written to `&rc` is never used. 1290. // stmt= mysql_stmt_init(mysql); 1291. 1292. rc= mysql_autocommit(mysql, 1); ^ 1293. mariadb_get_infov(mysql, MARIADB_CONNECTION_SERVER_STATUS, &server_status); 1294. FAIL_IF(!(server_status & SERVER_STATUS_AUTOCOMMIT), #218 libmariadb/unittest/libmariadb/misc.c:1477: error: Dead Store The value written to `&env` is never used. 1475. MYSQL *mysql; 1476. FILE *fp= NULL; 1477. const char *env= getenv("MYSQL_TMP_DIR"); ^ 1478. char cnf_file1[FN_REFLEN + 1]; 1479. #219 libmariadb/unittest/libmariadb/misc.c:1588: error: Dead Store The value written to `&rc` is never used. 1586. char buffer[10]; 1587. 1588. rc= mysql_options(mysql, MARIADB_OPT_SKIP_READ_RESPONSE, &skip); ^ 1589. 1590. rc= mysql_real_query(mysql, SL("SELECT 1")); #220 libmariadb/unittest/libmariadb/ps.c:45: error: Dead Store The value written to `&mysql` is never used. 43. check_stmt_rc(rc, stmt); 44. 45. mysql= mysql_init(NULL); ^ 46. 47. return OK; #221 libmariadb/unittest/libmariadb/ps.c:70: error: Dead Store The value written to `&rc` is never used. 68. /* 1. Status is inited, so prepare should work */ 69. 70. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 71. 72. rc= mysql_ping(mysql); #222 libmariadb/unittest/libmariadb/ps.c:80: error: Dead Store The value written to `&rc` is never used. 78. 79. /* 2. Status is prepared, execute should fail */ 80. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 81. 82. rc= mysql_stmt_execute(stmt); #223 libmariadb/unittest/libmariadb/ps.c:100: error: Dead Store The value written to `&rc` is never used. 98. stmt= mysql_stmt_init(mysql); 99. 100. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void *)&x); ^ 101. 102. rc= mysql_stmt_prepare(stmt, SL(query)); #224 libmariadb/unittest/libmariadb/ps.c:100: error: Null Dereference `stmt` could be null (from the call to `mysql_stmt_init()` on line 98) and is dereferenced in the call to `mysql_stmt_attr_set()`. 98. stmt= mysql_stmt_init(mysql); 99. 100. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void *)&x); ^ 101. 102. rc= mysql_stmt_prepare(stmt, SL(query)); #225 libmariadb/unittest/libmariadb/ps.c:841: error: Dead Store The value written to `&id` is never used. 839. check_stmt_rc(rc, stmt); 840. 841. id= 30; ^ 842. rc= mysql_stmt_execute(stmt); 843. check_stmt_rc(rc, stmt); #226 libmariadb/unittest/libmariadb/ps.c:854: error: Dead Store The value written to `&is_null` is never used. 852. mysql_close(mysql_new); 853. 854. is_null= 1; ^ 855. rc= mysql_stmt_execute(stmt); 856. check_stmt_rc(rc, stmt); #227 libmariadb/unittest/libmariadb/ps.c:923: error: Dead Store The value written to `&rc` is never used. 921. check_stmt_rc(rc, stmt); 922. 923. rc= mysql_query(mysql, "SELECT * FROM test_open_direct"); ^ 924. 925. result= mysql_store_result(mysql); #228 libmariadb/unittest/libmariadb/ps.c:1104: error: Dead Store The value written to `&nData` is never used. 1102. int rc; 1103. char szData[25]; 1104. int nData= 1; ^ 1105. MYSQL_RES *result; 1106. MYSQL_BIND my_bind[2]; #229 libmariadb/unittest/libmariadb/ps.c:1245: error: Dead Store The value written to `&int_data` is never used. 1243. check_stmt_rc(rc, stmt); 1244. 1245. int_data= 999; ^ 1246. data= (char *)"Michael"; 1247. #230 libmariadb/unittest/libmariadb/ps.c:1343: error: Dead Store The value written to `&length` is never used. 1341. check_stmt_rc(rc, stmt); 1342. 1343. length= 40; ^ 1344. strcpy(data, "MySQL AB"); 1345. #231 libmariadb/unittest/libmariadb/ps.c:1531: error: Dead Store The value written to `&rc` is never used. 1529. my_bind[0].length= (unsigned long *)&blob_length; 1530. my_bind[0].error= &my_bind[0].error_value; 1531. rc= mysql_stmt_bind_result(stmt, my_bind); ^ 1532. data[16]= 0; 1533. #232 libmariadb/unittest/libmariadb/ps.c:1602: error: Dead Store The value written to `&length` is never used. 1600. check_stmt_rc(rc, stmt); 1601. 1602. length= 10; ^ 1603. strcpy(data, "MySQL AB"); 1604. #233 libmariadb/unittest/libmariadb/ps.c:1650: error: Dead Store The value written to `&nData` is never used. 1648. int rc, rowcount= 0; 1649. char szData[30]= {0}; 1650. int nData= 1; ^ 1651. MYSQL_RES *result; 1652. MYSQL_BIND my_bind[2]; #234 libmariadb/unittest/libmariadb/ps.c:1787: error: Dead Store The value written to `&nData` is never used. 1785. check_stmt_rc(rc, stmt); 1786. 1787. nData= 100; ^ 1788. rc= mysql_stmt_execute(stmt); 1789. check_stmt_rc(rc, stmt); #235 libmariadb/unittest/libmariadb/ps.c:2253: error: Dead Store The value written to `&my_val` is never used. 2251. check_stmt_rc(rc, stmt); 2252. 2253. my_val= -1; ^ 2254. rc= mysql_stmt_execute(stmt); 2255. check_stmt_rc(rc, stmt); #236 libmariadb/unittest/libmariadb/ps.c:2750: error: Dead Store The value written to `&length` is never used. 2748. for (tiny_data= 0; tiny_data < 3; tiny_data++) 2749. { 2750. length= sprintf(str_data, "MySQL%d", tiny_data); ^ 2751. rc= mysql_stmt_execute(stmt); 2752. check_stmt_rc(rc, stmt); #237 libmariadb/unittest/libmariadb/ps.c:2940: error: Dead Store The value written to `&int_data` is never used. 2938. 2939. /* Specify the data */ 2940. int_data= 10; /* integer */ ^ 2941. strcpy(str_data, "MySQL"); /* string */ 2942. #238 libmariadb/unittest/libmariadb/ps.c:2944: error: Dead Store The value written to `&is_null` is never used. 2942. 2943. /* INSERT SMALLINT data as NULL */ 2944. is_null= 1; ^ 2945. 2946. /* Execute the insert statement - 1*/ #239 libmariadb/unittest/libmariadb/ps.c:2955: error: Dead Store The value written to `&int_data` is never used. 2953. 2954. /* Re-execute the insert, by changing the values */ 2955. int_data= 1000; ^ 2956. strcpy(str_data, "The most popular open source database"); 2957. small_data= 1000; /* smallint */ #240 libmariadb/unittest/libmariadb/ps.c:2957: error: Dead Store The value written to `&small_data` is never used. 2955. int_data= 1000; 2956. strcpy(str_data, "The most popular open source database"); 2957. small_data= 1000; /* smallint */ ^ 2958. is_null= 0; /* reset */ 2959. #241 libmariadb/unittest/libmariadb/ps.c:3365: error: Dead Store The value written to `&my_val` is never used. 3363. my_bind[0].length= &my_length; 3364. my_bind[0].is_null= &my_null; 3365. my_val= 1; ^ 3366. rc= mysql_stmt_bind_param(stmt, my_bind); 3367. check_stmt_rc(rc, stmt); #242 libmariadb/unittest/libmariadb/ps.c:3524: error: Dead Store The value written to `&double_data` is never used. 3522. strcpy(real_data, "10.2"); 3523. length[1]= (ulong)strlen(real_data); 3524. double_data= 34.5; ^ 3525. rc= mysql_stmt_bind_param(stmt, my_bind); 3526. check_stmt_rc(rc, stmt); #243 libmariadb/unittest/libmariadb/ps.c:3711: error: Dead Store The value written to `&id` is never used. 3709. check_stmt_rc(rc, stmt); 3710. 3711. id= 10; ^ 3712. rc= mysql_stmt_execute(stmt); 3713. check_stmt_rc(rc, stmt); #244 libmariadb/unittest/libmariadb/ps.c:4101: error: Dead Store The value written to `&rc` is never used. 4099. rc= mysql_real_query(mysql, SL(stmt_text)); 4100. check_mysql_rc(rc, mysql); 4101. rc= mysql_stmt_free_result(stmt); ^ 4102. rc= mysql_stmt_close(stmt); 4103. return OK; #245 libmariadb/unittest/libmariadb/ps.c:4102: error: Dead Store The value written to `&rc` is never used. 4100. check_mysql_rc(rc, mysql); 4101. rc= mysql_stmt_free_result(stmt); 4102. rc= mysql_stmt_close(stmt); ^ 4103. return OK; 4104. } #246 libmariadb/unittest/libmariadb/ps.c:4113: error: Dead Store The value written to `&nData` is never used. 4111. int rc; 4112. char szData[25]; 4113. int nData= 1; ^ 4114. MYSQL_BIND my_bind[2]; 4115. ulong length[2]; #247 libmariadb/unittest/libmariadb/ps.c:4451: error: Dead Store The value written to `&length` is never used. 4449. get_bind[0].length= &length; 4450. get_bind[0].buffer_length= (int)NAME_LEN; 4451. length= NAME_LEN; ^ 4452. 4453. get_bind[1].buffer_type= MYSQL_TYPE_LONG; #248 libmariadb/unittest/libmariadb/ps.c:4709: error: Dead Store The value written to `&rc` is never used. 4707. FAIL_IF(mysql_stmt_param_count(stmt2) != 1, "param_count != 1"); 4708. 4709. rc= mysql_stmt_close(stmt1); ^ 4710. 4711. /* #249 libmariadb/unittest/libmariadb/ps.c:4730: error: Dead Store The value written to `&count` is never used. 4728. my_bind[0].buffer= (void *)&count; 4729. my_bind[0].buffer_type= MYSQL_TYPE_LONG; 4730. count= 100; ^ 4731. 4732. rc= mysql_stmt_bind_param(stmt_x, my_bind); #250 libmariadb/unittest/libmariadb/ps.c:4867: error: Dead Store The value written to `&rc` is never used. 4865. 4866. stmt= mysql_stmt_init(mysql); 4867. rc= mysql_stmt_prepare(stmt, SL(query)); ^ 4868. 4869. memset(bind, 0, sizeof(MYSQL_BIND)); #251 libmariadb/unittest/libmariadb/ps.c:4949: error: Dead Store The value written to `&rc` is never used. 4947. check_stmt_rc(rc, stmt); 4948. 4949. rc= mysql_query(mysql, "DROP TABLE t1"); ^ 4950. 4951. return OK; #252 libmariadb/unittest/libmariadb/ps.c:5156: error: Dead Store The value written to `&rc` is never used. 5154. enum mysql_stmt_state state; 5155. 5156. rc= mysql_stmt_attr_get(stmt, STMT_ATTR_STATE, &state); ^ 5157. FAIL_IF(state != MYSQL_STMT_INITTED, "expected status MYSQL_STMT_INITTED"); 5158. #253 libmariadb/unittest/libmariadb/ps.c:5156: error: Null Dereference `stmt` could be null (from the call to `mysql_stmt_init()` on line 5152) and is dereferenced in the call to `mysql_stmt_attr_get()`. 5154. enum mysql_stmt_state state; 5155. 5156. rc= mysql_stmt_attr_get(stmt, STMT_ATTR_STATE, &state); ^ 5157. FAIL_IF(state != MYSQL_STMT_INITTED, "expected status MYSQL_STMT_INITTED"); 5158. #254 libmariadb/unittest/libmariadb/ps.c:5162: error: Dead Store The value written to `&rc` is never used. 5160. check_stmt_rc(rc, stmt); 5161. 5162. rc= mysql_stmt_attr_get(stmt, STMT_ATTR_STATE, &state); ^ 5163. FAIL_IF(state != MYSQL_STMT_PREPARED, "expected status MYSQL_STMT_PREPARED"); 5164. #255 libmariadb/unittest/libmariadb/ps.c:5168: error: Dead Store The value written to `&rc` is never used. 5166. check_stmt_rc(rc, stmt); 5167. 5168. rc= mysql_stmt_attr_get(stmt, STMT_ATTR_STATE, &state); ^ 5169. FAIL_IF(state != MYSQL_STMT_EXECUTED, "expected status MYSQL_STMT_EXECUTED"); 5170. #256 libmariadb/unittest/libmariadb/ps.c:5203: error: Dead Store The value written to `&rc` is never used. 5201. fields_binary= mariadb_stmt_fetch_fields(stmt); 5202. 5203. rc= mysql_query(mysql, "SELECT a,b,c,d,e,f FROM t1"); ^ 5204. result= mysql_store_result(mysql); 5205. fields_text= mysql_fetch_fields(result); #257 libmariadb/unittest/libmariadb/ps_bugs.c:392: error: Dead Store The value written to `&num` is never used. 390. 391. isnull= 0; 392. num= 88; ^ 393. for (i= 0 ; i < 4 ; i++) 394. my_bind[i].is_null= &isnull; #258 libmariadb/unittest/libmariadb/ps_bugs.c:553: error: Dead Store The value written to `&rc` is never used. 551. rc= mysql_options(mysql, MYSQL_OPT_RECONNECT, "1"); 552. check_mysql_rc(rc, mysql); 553. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 554. 555. rc= mysql_ping(mysql); #259 libmariadb/unittest/libmariadb/ps_bugs.c:709: error: Dead Store The value written to `&rc` is never used. 707. check_stmt_rc(rc, stmt); 708. 709. rc= mysql_stmt_fetch(stmt); ^ 710. FAIL_UNLESS(mysql_warning_count(mysql), "Warning expected"); 711. #260 libmariadb/unittest/libmariadb/ps_bugs.c:806: error: Dead Store The value written to `&rc` is never used. 804. /* II. Check SELECT metadata */ 805. stmt_text= ("select t, tt, mt, lt, vl, vb, vu from t1"); 806. rc= mysql_stmt_prepare(stmt, SL(stmt_text)); ^ 807. metadata= mysql_stmt_result_metadata(stmt); 808. field= mysql_fetch_fields(metadata); #261 libmariadb/unittest/libmariadb/ps_bugs.c:837: error: Null Dereference `stmt` could be null (from the call to `mysql_stmt_init()` on line 836) and is dereferenced in the call to `mysql_stmt_attr_set()`. 835. /* Check that attr_get returns correct data on little and big endian CPUs */ 836. stmt= mysql_stmt_init(mysql); 837. mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag); ^ 838. mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag); 839. FAIL_UNLESS(flag == flag_orig, "flag != flag_orig"); #262 libmariadb/unittest/libmariadb/ps_bugs.c:841: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_init()` on line 836 is not freed after the last access at line 841, column 3. 839. FAIL_UNLESS(flag == flag_orig, "flag != flag_orig"); 840. 841. mysql_stmt_close(stmt); ^ 842. 843. return OK; #263 libmariadb/unittest/libmariadb/ps_bugs.c:889: error: Dead Store The value written to `&int_data` is never used. 887. check_stmt_rc(rc, stmt); 888. 889. int_data= 1; ^ 890. 891. /* #264 libmariadb/unittest/libmariadb/ps_bugs.c:931: error: Dead Store The value written to `&int_data` is never used. 929. */ 930. 931. int_data= 2; ^ 932. /* execute */ 933. rc= mysql_stmt_execute(stmt); #265 libmariadb/unittest/libmariadb/ps_bugs.c:1000: error: Dead Store The value written to `&rc` is never used. 998. error: 999. mysql_stmt_close(stmt); 1000. rc= mysql_query(mysql, "DROP TABLE test_long_data"); ^ 1001. return FAIL; 1002. } #266 libmariadb/unittest/libmariadb/ps_bugs.c:1549: error: Dead Store The value written to `&int8_val` is never used. 1547. mysql_stmt_bind_param(stmt, bind_array); 1548. 1549. int8_val= int8_min; ^ 1550. uint8_val= uint8_min; 1551. int16_val= int16_min; #267 libmariadb/unittest/libmariadb/ps_bugs.c:1550: error: Dead Store The value written to `&uint8_val` is never used. 1548. 1549. int8_val= int8_min; 1550. uint8_val= uint8_min; ^ 1551. int16_val= int16_min; 1552. uint16_val= uint16_min; #268 libmariadb/unittest/libmariadb/ps_bugs.c:1551: error: Dead Store The value written to `&int16_val` is never used. 1549. int8_val= int8_min; 1550. uint8_val= uint8_min; 1551. int16_val= int16_min; ^ 1552. uint16_val= uint16_min; 1553. int32_val= int32_min; #269 libmariadb/unittest/libmariadb/ps_bugs.c:1552: error: Dead Store The value written to `&uint16_val` is never used. 1550. uint8_val= uint8_min; 1551. int16_val= int16_min; 1552. uint16_val= uint16_min; ^ 1553. int32_val= int32_min; 1554. uint32_val= uint32_min; #270 libmariadb/unittest/libmariadb/ps_bugs.c:1553: error: Dead Store The value written to `&int32_val` is never used. 1551. int16_val= int16_min; 1552. uint16_val= uint16_min; 1553. int32_val= int32_min; ^ 1554. uint32_val= uint32_min; 1555. int64_val= int64_min; #271 libmariadb/unittest/libmariadb/ps_bugs.c:1554: error: Dead Store The value written to `&uint32_val` is never used. 1552. uint16_val= uint16_min; 1553. int32_val= int32_min; 1554. uint32_val= uint32_min; ^ 1555. int64_val= int64_min; 1556. uint64_val= uint64_min; #272 libmariadb/unittest/libmariadb/ps_bugs.c:1555: error: Dead Store The value written to `&int64_val` is never used. 1553. int32_val= int32_min; 1554. uint32_val= uint32_min; 1555. int64_val= int64_min; ^ 1556. uint64_val= uint64_min; 1557. #273 libmariadb/unittest/libmariadb/ps_bugs.c:1556: error: Dead Store The value written to `&uint64_val` is never used. 1554. uint32_val= uint32_min; 1555. int64_val= int64_min; 1556. uint64_val= uint64_min; ^ 1557. 1558. rc= mysql_stmt_execute(stmt); #274 libmariadb/unittest/libmariadb/ps_bugs.c:1692: error: Dead Store The value written to `&int_data` is never used. 1690. rc= mysql_stmt_bind_param(stmt, my_bind); 1691. check_stmt_rc(rc, stmt); 1692. int_data= 1; ^ 1693. strcpy(str_data, "hh"); 1694. str_length= (unsigned long)strlen(str_data); #275 libmariadb/unittest/libmariadb/ps_bugs.c:1694: error: Dead Store The value written to `&str_length` is never used. 1692. int_data= 1; 1693. strcpy(str_data, "hh"); 1694. str_length= (unsigned long)strlen(str_data); ^ 1695. 1696. rc= mysql_stmt_execute(stmt); #276 libmariadb/unittest/libmariadb/ps_bugs.c:1730: error: Dead Store The value written to `&cur_query` is never used. 1728. NULL 1729. }; 1730. const char **cur_query= queries; ^ 1731. 1732. #277 libmariadb/unittest/libmariadb/ps_bugs.c:1749: error: Dead Store The value written to `&in_is_null` is never used. 1747. in_bind.length= 0; 1748. in_bind.buffer= (void *)&in_long; 1749. in_is_null= 1; ^ 1750. in_long= 1; 1751. #278 libmariadb/unittest/libmariadb/ps_bugs.c:1750: error: Dead Store The value written to `&in_long` is never used. 1748. in_bind.buffer= (void *)&in_long; 1749. in_is_null= 1; 1750. in_long= 1; ^ 1751. 1752. out_bind.buffer_type= MYSQL_TYPE_STRING; #279 libmariadb/unittest/libmariadb/ps_bugs.c:2631: error: Dead Store The value written to `&rc` is never used. 2629. 2630. stmt_text= "drop table if exists t1"; 2631. rc= mysql_real_query(mysql, SL(stmt_text)); ^ 2632. 2633. stmt_text= "create table if not exists t1" #280 libmariadb/unittest/libmariadb/ps_bugs.c:2684: error: Memory Leak Memory dynamically allocated by `malloc` on line 2679 is not freed after the last access at line 2684, column 3. 2682. param_str= (char*) malloc(COLUMN_COUNT * CHARS_PER_PARAM); 2683. 2684. FAIL_IF(my_bind == 0 || query == 0 || param_str == 0, "Not enough memory"); ^ 2685. 2686. stmt= mysql_stmt_init(mysql); #281 libmariadb/unittest/libmariadb/ps_bugs.c:2684: error: Memory Leak Memory dynamically allocated by `malloc` on line 2680 is not freed after the last access at line 2684, column 3. 2682. param_str= (char*) malloc(COLUMN_COUNT * CHARS_PER_PARAM); 2683. 2684. FAIL_IF(my_bind == 0 || query == 0 || param_str == 0, "Not enough memory"); ^ 2685. 2686. stmt= mysql_stmt_init(mysql); #282 libmariadb/unittest/libmariadb/ps_bugs.c:2684: error: Memory Leak Memory dynamically allocated by `malloc` on line 2682 is not freed after the last access at line 2684, column 3. 2682. param_str= (char*) malloc(COLUMN_COUNT * CHARS_PER_PARAM); 2683. 2684. FAIL_IF(my_bind == 0 || query == 0 || param_str == 0, "Not enough memory"); ^ 2685. 2686. stmt= mysql_stmt_init(mysql); #283 libmariadb/unittest/libmariadb/ps_bugs.c:2736: error: Dead Store The value written to `&rc` is never used. 2734. rc= mysql_stmt_execute(stmt); 2735. check_stmt_rc(rc, stmt); 2736. rc= mysql_stmt_reset(stmt); ^ 2737. } 2738. #284 libmariadb/unittest/libmariadb/ps_bugs.c:2814: error: Dead Store The value written to `&rc` is never used. 2812. rc= mysql_stmt_store_result(*stmt); 2813. check_stmt_rc(rc, *stmt); 2814. rc= mysql_stmt_fetch(*stmt); ^ 2815. FAIL_UNLESS((int32) (stmt - stmt_list) == no, ""); 2816. } #285 libmariadb/unittest/libmariadb/ps_bugs.c:2829: error: Dead Store The value written to `&b` is never used. 2827. const char *stmt_text; 2828. int rc; 2829. short b= 1; ^ 2830. MYSQL_BIND my_bind[1]; 2831. #286 libmariadb/unittest/libmariadb/ps_bugs.c:3368: error: Dead Store The value written to `&stmt_text` is never used. 3366. check_stmt_rc(rc, stmt); 3367. mysql_stmt_close(stmt); 3368. stmt_text= "drop table if exists t1, v1"; ^ 3369. rc= mysql_query(mysql, "DROP TABLE t1"); 3370. check_mysql_rc(rc, mysql); #287 libmariadb/unittest/libmariadb/ps_bugs.c:3450: error: Dead Store The value written to `&is_null` is never used. 3448. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 3449. 3450. is_null= 1; ^ 3451. rc= mysql_stmt_execute(stmt); 3452. check_stmt_rc(rc, stmt); #288 libmariadb/unittest/libmariadb/ps_bugs.c:3837: error: Dead Store The value written to `&rc` is never used. 3835. 3836. /* kill connection */ 3837. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 3838. 3839. rc= mysql_stmt_execute(stmt); #289 libmariadb/unittest/libmariadb/ps_bugs.c:4265: error: Dead Store The value written to `&rc` is never used. 4263. check_stmt_rc(rc, stmt); 4264. 4265. rc= mysql_stmt_fetch(stmt); ^ 4266. mysql_stmt_close(stmt); 4267. #290 libmariadb/unittest/libmariadb/ps_bugs.c:4298: error: Dead Store The value written to `&rc` is never used. 4296. check_stmt_rc(rc, stmt); 4297. 4298. rc= mysql_stmt_fetch(stmt); ^ 4299. mysql_stmt_close(stmt); 4300. #291 libmariadb/unittest/libmariadb/ps_bugs.c:4355: error: Dead Store The value written to `&rc` is never used. 4353. check_stmt_rc(rc, stmt); 4354. 4355. rc= mysql_query(mysql, "SELECT row_count()"); ^ 4356. result= mysql_store_result(mysql); 4357. row= mysql_fetch_row(result); #292 libmariadb/unittest/libmariadb/ps_bugs.c:4365: error: Dead Store The value written to `&rc` is never used. 4363. rc= mysql_stmt_prepare(stmt, "SELECT row_count()", -1); 4364. check_stmt_rc(rc, stmt); 4365. rc= mysql_stmt_execute(stmt); ^ 4366. 4367. memset(bind, 0, 2 * sizeof(MYSQL_BIND)); #293 libmariadb/unittest/libmariadb/ps_bugs.c:4372: error: Dead Store The value written to `&rc` is never used. 4370. bind[0].buffer_type= bind[1].buffer_type= MYSQL_TYPE_STRING; 4371. 4372. rc= mysql_stmt_bind_result(stmt, bind); ^ 4373. 4374. while(!mysql_stmt_fetch(stmt)) #294 libmariadb/unittest/libmariadb/ps_bugs.c:4376: error: Dead Store The value written to `&rc` is never used. 4374. while(!mysql_stmt_fetch(stmt)) 4375. diag("b1: %s", buf1); 4376. rc= mysql_stmt_close(stmt); ^ 4377. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); 4378. check_mysql_rc(rc, mysql); #295 libmariadb/unittest/libmariadb/ps_bugs.c:4415: error: Dead Store The value written to `&rc` is never used. 4413. diag("rc=%d err=%d float=%f, %d", rc, err, f, MYSQL_DATA_TRUNCATED); 4414. 4415. rc= mysql_stmt_close(stmt); ^ 4416. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); 4417. check_mysql_rc(rc, mysql); #296 libmariadb/unittest/libmariadb/ps_bugs.c:4484: error: Dead Store The value written to `&rc` is never used. 4482. FAIL_UNLESS(num_rows == 9, "num_rows != 9"); 4483. 4484. rc= mysql_stmt_close(stmt1); ^ 4485. rc= mysql_stmt_close(stmt2); 4486. FAIL_UNLESS(rc == 0, ""); #297 libmariadb/unittest/libmariadb/ps_bugs.c:4607: error: Dead Store The value written to `&rc` is never used. 4605. check_stmt_rc(rc, stmt); 4606. 4607. rc= mysql_stmt_bind_result(stmt, &bind); ^ 4608. 4609. while (mysql_stmt_fetch(stmt) != MYSQL_NO_DATA) #298 libmariadb/unittest/libmariadb/ps_bugs.c:4628: error: Dead Store The value written to `&rc` is never used. 4626. char buf1[52]; 4627. 4628. rc= mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, &val); ^ 4629. 4630. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); #299 libmariadb/unittest/libmariadb/ps_bugs.c:4630: error: Dead Store The value written to `&rc` is never used. 4628. rc= mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, &val); 4629. 4630. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); ^ 4631. rc= mysql_query(mysql, "CREATE TABLE t1 (i INT(20) ZEROFILL)"); 4632. check_mysql_rc(rc, mysql); #300 libmariadb/unittest/libmariadb/ps_bugs.c:4727: error: Dead Store The value written to `&rc` is never used. 4725. rc= mysql_stmt_execute(stmt); 4726. check_stmt_rc(rc, stmt); 4727. rc= mysql_stmt_store_result(stmt); ^ 4728. 4729. memset(bind, 0, sizeof(MYSQL_BIND)); #301 libmariadb/unittest/libmariadb/ps_bugs.c:4902: error: Dead Store The value written to `&rc` is never used. 4900. rc= mysql_stmt_execute(stmt); 4901. check_stmt_rc(rc, stmt); 4902. rc= mysql_stmt_store_result(stmt); ^ 4903. 4904. memset(bind, 0, sizeof(MYSQL_BIND)); #302 libmariadb/unittest/libmariadb/ps_bugs.c:4983: error: Dead Store The value written to `&rc` is never used. 4981. rc= mysql_stmt_execute(stmt); 4982. check_stmt_rc(rc, stmt); 4983. rc= mysql_stmt_fetch(stmt); ^ 4984. diag("num_rows: %lld", mysql_stmt_num_rows(stmt)); 4985. FAIL_IF(mysql_stmt_num_rows(stmt) != 1, "expected 1 row"); #303 libmariadb/unittest/libmariadb/ps_bugs.c:5073: error: Dead Store The value written to `&rc` is never used. 5071. bind.buffer_length= 1; 5072. 5073. rc= mysql_stmt_bind_result(stmt, &bind); ^ 5074. 5075. rc= mysql_stmt_fetch(stmt); #304 libmariadb/unittest/libmariadb/ps_bugs.c:5247: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_init()` on line 5242 is not freed after the last access at line 5247, column 3. 5245. 5246. diag("MDEV-23768 not fixed yet"); 5247. mysql_stmt_close(stmt); ^ 5248. return SKIP; 5249. #305 libmariadb/unittest/libmariadb/ps_bugs.c:5269: error: Dead Store The value written to `&rc` is never used. 5267. check_stmt_rc(rc, stmt); 5268. 5269. rc= mysql_stmt_close(stmt); ^ 5270. 5271. return OK; #306 libmariadb/unittest/libmariadb/ps_bugs.c:5323: error: Dead Store The value written to `&rc` is never used. 5321. float f; 5322. 5323. rc= mysql_query(mysql, "drop table if exists t1"); ^ 5324. 5325. rc= mysql_real_query(mysql, SL("CREATE TABLE t1 (a int)")); #307 libmariadb/unittest/libmariadb/ps_bugs.c:5325: error: Dead Store The value written to `&rc` is never used. 5323. rc= mysql_query(mysql, "drop table if exists t1"); 5324. 5325. rc= mysql_real_query(mysql, SL("CREATE TABLE t1 (a int)")); ^ 5326. 5327. rc= mysql_real_query(mysql, SL("INSERT INTO t1 VALUES (1073741825)")); #308 libmariadb/unittest/libmariadb/ps_bugs.c:5327: error: Dead Store The value written to `&rc` is never used. 5325. rc= mysql_real_query(mysql, SL("CREATE TABLE t1 (a int)")); 5326. 5327. rc= mysql_real_query(mysql, SL("INSERT INTO t1 VALUES (1073741825)")); ^ 5328. 5329. stmt= mysql_stmt_init(mysql); #309 libmariadb/unittest/libmariadb/ps_bugs.c:5456: error: Dead Store The value written to `¶mCount` is never used. 5454. int rc; 5455. MYSQL_BIND bind[MDEV19838_MAX_PARAM_COUNT]; 5456. unsigned int i, paramCount = 1; ^ 5457. char charvalue[] = "012345678901234567890123456789012345"; 5458. MYSQL_STMT *stmt; #310 libmariadb/unittest/libmariadb/ps_bugs.c:5554: error: Dead Store The value written to `&rc` is never used. 5552. mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, ¶mCount); 5553. 5554. rc = mysql_stmt_bind_param(stmt, bind); ^ 5555. 5556. rc = mariadb_stmt_execute_direct(stmt, "INSERT INTO mdev19838" #311 libmariadb/unittest/libmariadb/ps_bugs.c:5611: error: Dead Store The value written to `&rc` is never used. 5609. MYSQL_STMT *stmt= mysql_stmt_init(mysql); 5610. 5611. rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a int)"); ^ 5612. 5613. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CB_USER_DATA, mysql); #312 libmariadb/unittest/libmariadb/ps_bugs.c:5709: error: Dead Store The value written to `&rc` is never used. 5707. check_mysql_rc(rc, mysql); 5708. 5709. rc= mysql_query(mysql, "SET @@lock_wait_timeout=3"); ^ 5710. 5711. rc= mysql_query(my, "LOCK TABLES conc633 WRITE"); #313 libmariadb/unittest/libmariadb/ps_bugs.c:5894: error: Dead Store The value written to `&rc` is never used. 5892. check_stmt_rc(rc, stmt); 5893. 5894. rc= mysql_stmt_execute(stmt); ^ 5895. 5896. memset(&bind, 0, sizeof(MYSQL_BIND)); #314 libmariadb/unittest/libmariadb/ps_bugs.c:5905: error: Dead Store The value written to `&rc` is never used. 5903. check_stmt_rc(rc, stmt); 5904. 5905. rc= mysql_stmt_fetch(stmt); ^ 5906. 5907. diag("Buffer: %s", buffer); #315 libmariadb/unittest/libmariadb/ps_bugs.c:5910: error: Dead Store The value written to `&rc` is never used. 5908. FAIL_IF(strlen(buffer) == 1, "Expected zerofilled string"); 5909. 5910. rc= mysql_stmt_close(stmt); ^ 5911. 5912. rc= mysql_query(mysql, "DROP TABLE t1"); #316 libmariadb/unittest/libmariadb/ps_bugs.c:5942: error: Dead Store The value written to `&rc` is never used. 5940. check_stmt_rc(rc, stmt); 5941. 5942. rc= mysql_stmt_bind_result(stmt, bind); ^ 5943. 5944. mysql_stmt_fetch(stmt); #317 libmariadb/unittest/libmariadb/ps_new.c:113: error: Dead Store The value written to `&rc` is never used. 111. rc= mysql_stmt_next_result(stmt); 112. check_stmt_rc(rc, stmt); 113. rc= mysql_stmt_bind_result(stmt, rs_bind); ^ 114. 115. rc= mysql_stmt_fetch(stmt); #318 libmariadb/unittest/libmariadb/ps_new.c:115: error: Dead Store The value written to `&rc` is never used. 113. rc= mysql_stmt_bind_result(stmt, rs_bind); 114. 115. rc= mysql_stmt_fetch(stmt); ^ 116. FAIL_IF(mysql_stmt_field_count(stmt) != 3, "expected 3 fields"); 117. FAIL_IF(int_data[0] != 100 || int_data[1] != 200 || int_data[2] != 300, #319 libmariadb/unittest/libmariadb/ps_new.c:121: error: Dead Store The value written to `&rc` is never used. 119. 120. FAIL_IF(mysql_stmt_next_result(stmt) != 0, "expected more results"); 121. rc= mysql_stmt_bind_result(stmt, rs_bind); ^ 122. 123. rc= mysql_stmt_fetch(stmt); #320 libmariadb/unittest/libmariadb/ps_new.c:123: error: Dead Store The value written to `&rc` is never used. 121. rc= mysql_stmt_bind_result(stmt, rs_bind); 122. 123. rc= mysql_stmt_fetch(stmt); ^ 124. FAIL_IF(mysql_stmt_field_count(stmt) != 2, "expected 2 fields"); 125. FAIL_IF(int_data[0] != 200 || int_data[1] != 300, #321 libmariadb/unittest/libmariadb/ps_new.c:131: error: Dead Store The value written to `&rc` is never used. 129. FAIL_IF(mysql_stmt_field_count(stmt) != 0, "expected 0 fields"); 130. 131. rc= mysql_stmt_close(stmt); ^ 132. rc = mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); 133. check_mysql_rc(rc, mysql); #322 libmariadb/unittest/libmariadb/ps_new.c:220: error: Dead Store The value written to `&rc` is never used. 218. } while (mysql_stmt_next_result(stmt) == 0); 219. 220. rc= mysql_stmt_close(stmt); ^ 221. return OK; 222. } #323 libmariadb/unittest/libmariadb/ps_new.c:277: error: Dead Store The value written to `&rc` is never used. 275. check_mysql_rc(rc, mysql); 276. 277. rc= mysql_stmt_close(stmt); ^ 278. return OK; 279. } #324 libmariadb/unittest/libmariadb/ps_new.c:425: error: Dead Store The value written to `&rc` is never used. 423. } 424. 425. rc= mysql_stmt_close(stmt); ^ 426. 427. #325 libmariadb/unittest/libmariadb/result.c:71: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 65 is not freed after the last access at line 71, column 3. 69. able to execute other api calls */ 70. rc= mysql_ping(mysql); 71. FAIL_IF(!rc, "Error expected"); ^ 72. 73. while (mysql_fetch_row(result)) #326 libmariadb/unittest/libmariadb/result.c:76: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 65 is not freed after the last access at line 76, column 3. 74. rowcount++; 75. 76. FAIL_IF(rowcount != 2, "rowcount != 2"); ^ 77. 78. mysql_free_result(result); #327 libmariadb/unittest/libmariadb/result.c:317: error: Dead Store The value written to `&length` is never used. 315. FAIL_UNLESS(length1 == 5, "length1 != 5"); 316. 317. length= 99; ^ 318. rc= mysql_stmt_fetch(stmt); 319. check_stmt_rc(rc, stmt); #328 libmariadb/unittest/libmariadb/result.c:348: error: Dead Store The value written to `&length` is never used. 346. FAIL_UNLESS(length1 == 5, "length1 != 5"); 347. 348. length= 99; ^ 349. rc= mysql_stmt_fetch(stmt); 350. check_stmt_rc(rc, stmt); #329 libmariadb/unittest/libmariadb/result.c:471: error: Dead Store The value written to `&nData` is never used. 469. check_stmt_rc(rc, stmt); 470. 471. nData= 10; length= 0; ^ 472. rc= mysql_stmt_execute(stmt); 473. check_stmt_rc(rc, stmt); #330 libmariadb/unittest/libmariadb/result.c:487: error: Dead Store The value written to `&nData` is never used. 485. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 486. 487. nData= 20; ^ 488. rc= mysql_stmt_execute(stmt); 489. check_stmt_rc(rc, stmt); #331 libmariadb/unittest/libmariadb/result.c:685: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 679 is not freed after the last access at line 685, column 3. 683. 684. field= mysql_fetch_field(result); 685. FAIL_UNLESS(field->flags & NOT_NULL_FLAG && ^ 686. field->flags & PRI_KEY_FLAG && 687. field->flags & AUTO_INCREMENT_FLAG, "Wrong flags for field 0"); #332 libmariadb/unittest/libmariadb/result.c:903: error: Dead Store The value written to `&rc` is never used. 901. error: 902. mysql_free_result(res); 903. rc= mysql_query(mysql, "drop table t1"); ^ 904. return FAIL; 905. } #333 libmariadb/unittest/libmariadb/view.c:92: error: Dead Store The value written to `&length` is never used. 90. my_bind[0].buffer_length= 50; 91. my_bind[0].length= &length; 92. length= 4; ^ 93. my_bind[0].is_null= &is_null; 94. rc= mysql_stmt_bind_param(stmt, my_bind); #334 libmariadb/unittest/libmariadb/view.c:357: error: Dead Store The value written to `&my_val` is never used. 355. { 356. int rowcount= 0; 357. my_val= i; ^ 358. 359. rc= mysql_stmt_execute(insert_stmt); #335 libmariadb/unittest/libmariadb/view.c:450: error: Dead Store The value written to `&rc` is never used. 448. "PRIMARY KEY (K1C4,K2C4,K3C4,K4N4))"); 449. check_mysql_rc(rc, mysql); 450. rc= mysql_query(mysql, ^ 451. "CREATE VIEW v1 AS select sql_no_cache " 452. " K1C4 AS K1C4, K2C4 AS K2C4, K3C4 AS K3C4, K4N4 AS K4N4, " #336 libmysqld/libmysql.c:890: error: Dead Store The value written to `&fields` is never used. 888. mysql_list_processes(MYSQL *mysql) 889. { 890. MYSQL_DATA *UNINIT_VAR(fields); ^ 891. uint field_count; 892. uchar *pos; #337 libmysqld/libmysql.c:890: error: Uninitialized Value `fields` is read without initialization. 888. mysql_list_processes(MYSQL *mysql) 889. { 890. MYSQL_DATA *UNINIT_VAR(fields); ^ 891. uint field_count; 892. uchar *pos; #338 libmysqld/libmysql.c:1219: error: Uninitialized Value `end` is read without initialization. 1217. #ifdef USE_MB 1218. my_bool use_mb_flag= my_ci_use_mb(mysql->charset); 1219. char *UNINIT_VAR(end); ^ 1220. if (use_mb_flag) 1221. for (end=name; *end ; end++) ; #339 libmysqld/libmysql.c:1391: error: Dead Store The value written to `&err` is never used. 1389. 1390. if (err == 0) 1391. err= ER(errcode); ^ 1392. 1393. stmt->last_errno= errcode; #340 libmysqld/libmysql.c:3384: error: Dead Store The value written to `&value` is never used. 3382. { 3383. int error; 3384. value= number_to_datetime_or_date(value, 0, (MYSQL_TIME *) buffer, 0, &error); ^ 3385. *param->error= MY_TEST(error); 3386. break; #341 mysys/file_logger.c:94: error: Uninitialized Value `_.lock.m_psi` is read without initialization. 92. return 0; /* End of memory */ 93. } 94. *l_perm= new_log; ^ 95. flogger_mutex_init(key_LOCK_logger_service, &l_perm->lock, 96. MY_MUTEX_INIT_FAST); #342 mysys/hash.c:392: error: Uninitialized Value `rec_hash_nr` is read without initialization. 390. size_t idx, halfbuff, first_index; 391. size_t length; 392. my_hash_value_type current_hash_nr, UNINIT_VAR(rec_hash_nr), ^ 393. UNINIT_VAR(rec2_hash_nr); 394. uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key; #343 mysys/hash.c:393: error: Uninitialized Value `rec2_hash_nr` is read without initialization. 391. size_t length; 392. my_hash_value_type current_hash_nr, UNINIT_VAR(rec_hash_nr), 393. UNINIT_VAR(rec2_hash_nr); ^ 394. uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key; 395. HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; #344 mysys/hash.c:394: error: Uninitialized Value `rec_data` is read without initialization. 392. my_hash_value_type current_hash_nr, UNINIT_VAR(rec_hash_nr), 393. UNINIT_VAR(rec2_hash_nr); 394. uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key; ^ 395. HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; 396. #345 mysys/hash.c:394: error: Uninitialized Value `rec2_data` is read without initialization. 392. my_hash_value_type current_hash_nr, UNINIT_VAR(rec_hash_nr), 393. UNINIT_VAR(rec2_hash_nr); 394. uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key; ^ 395. HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; 396. #346 mysys/hash.c:395: error: Uninitialized Value `gpos` is read without initialization. 393. UNINIT_VAR(rec2_hash_nr); 394. uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key; 395. HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; ^ 396. 397. key= (uchar*) my_hash_key(info, record, &length, 1); #347 mysys/hash.c:395: error: Uninitialized Value `gpos2` is read without initialization. 393. UNINIT_VAR(rec2_hash_nr); 394. uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key; 395. HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; ^ 396. 397. key= (uchar*) my_hash_key(info, record, &length, 1); #348 mysys/ma_dyncol.c:507: error: Dead Store The value written to `&val` is never used. 505. uchar *place, size_t offset_size) 506. { 507. ulong UNINIT_VAR(val); ^ 508. ulong UNINIT_VAR(lim); 509. #349 mysys/ma_dyncol.c:507: error: Uninitialized Value `val` is read without initialization. 505. uchar *place, size_t offset_size) 506. { 507. ulong UNINIT_VAR(val); ^ 508. ulong UNINIT_VAR(lim); 509. #350 mysys/ma_dyncol.c:508: error: Dead Store The value written to `&lim` is never used. 506. { 507. ulong UNINIT_VAR(val); 508. ulong UNINIT_VAR(lim); ^ 509. 510. DBUG_ASSERT(offset_size >= 1 && offset_size <= 4); #351 mysys/ma_dyncol.c:508: error: Uninitialized Value `lim` is read without initialization. 506. { 507. ulong UNINIT_VAR(val); 508. ulong UNINIT_VAR(lim); ^ 509. 510. DBUG_ASSERT(offset_size >= 1 && offset_size <= 4); #352 mysys/ma_dyncol.c:542: error: Dead Store The value written to `&val` is never used. 540. uchar *place, size_t offset_size) 541. { 542. ulonglong UNINIT_VAR(val); ^ 543. ulonglong UNINIT_VAR(lim); 544. DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); #353 mysys/ma_dyncol.c:542: error: Uninitialized Value `val` is read without initialization. 540. uchar *place, size_t offset_size) 541. { 542. ulonglong UNINIT_VAR(val); ^ 543. ulonglong UNINIT_VAR(lim); 544. DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); #354 mysys/ma_dyncol.c:543: error: Dead Store The value written to `&lim` is never used. 541. { 542. ulonglong UNINIT_VAR(val); 543. ulonglong UNINIT_VAR(lim); ^ 544. DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); 545. #355 mysys/ma_dyncol.c:543: error: Uninitialized Value `lim` is read without initialization. 541. { 542. ulonglong UNINIT_VAR(val); 543. ulonglong UNINIT_VAR(lim); ^ 544. DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); 545. #356 mysys/ma_dyncol.c:1613: error: Uninitialized Value `columns_order` is read without initialization. 1611. { 1612. struct st_service_funcs *fmt= fmt_data + hdr->format; 1613. void **UNINIT_VAR(columns_order); ^ 1614. uchar *element; 1615. uint i; #357 mysys/ma_dyncol.c:2292: error: Dead Store The value written to `&rc` is never used. 2290. { 2291. DYN_HEADER header; 2292. enum enum_dyncol_func_result rc= ER_DYNCOL_FORMAT; ^ 2293. bzero(&header, sizeof(header)); 2294. #358 mysys/ma_dyncol.c:2572: error: Uninitialized Value `flag` is read without initialization. 2570. { 2571. uint mid, start, end, val; 2572. int UNINIT_VAR(flag); ^ 2573. LEX_STRING str; 2574. char buff[DYNCOL_NUM_CHAR]; #359 mysys/ma_dyncol.c:2897: error: Uninitialized Value `first_offset` is read without initialization. 2895. i++) 2896. { 2897. size_t UNINIT_VAR(first_offset); ^ 2898. uint start= j, end; 2899. #360 mysys/ma_dyncol.c:4198: error: Uninitialized Value `hdr.offset` is read without initialization during the call to `hdr_interval_length()`. 4196. goto err; 4197. header.length= 4198. hdr_interval_length(&header, header.entry + header.entry_size); ^ 4199. header.data= header.dtpool + header.offset; 4200. /* #361 mysys/mf_keycache.c:4225: error: Uninitialized Value `next_hash_link` is read without initialization. 4223. BLOCK_REASSIGNED))) 4224. { 4225. struct st_hash_link *UNINIT_VAR(next_hash_link); ^ 4226. my_off_t UNINIT_VAR(next_diskpos); 4227. File UNINIT_VAR(next_file); #362 mysys/mf_keycache.c:4226: error: Uninitialized Value `next_diskpos` is read without initialization. 4224. { 4225. struct st_hash_link *UNINIT_VAR(next_hash_link); 4226. my_off_t UNINIT_VAR(next_diskpos); ^ 4227. File UNINIT_VAR(next_file); 4228. uint UNINIT_VAR(next_status); #363 mysys/mf_keycache.c:4227: error: Uninitialized Value `next_file` is read without initialization. 4225. struct st_hash_link *UNINIT_VAR(next_hash_link); 4226. my_off_t UNINIT_VAR(next_diskpos); 4227. File UNINIT_VAR(next_file); ^ 4228. uint UNINIT_VAR(next_status); 4229. uint UNINIT_VAR(hash_requests); #364 mysys/mf_keycache.c:4228: error: Uninitialized Value `next_status` is read without initialization. 4226. my_off_t UNINIT_VAR(next_diskpos); 4227. File UNINIT_VAR(next_file); 4228. uint UNINIT_VAR(next_status); ^ 4229. uint UNINIT_VAR(hash_requests); 4230. #365 mysys/mf_keycache.c:4229: error: Uninitialized Value `hash_requests` is read without initialization. 4227. File UNINIT_VAR(next_file); 4228. uint UNINIT_VAR(next_status); 4229. uint UNINIT_VAR(hash_requests); ^ 4230. 4231. total_found++; #366 mysys/mf_pack.c:33: error: Uninitialized Value `buff_length` is read without initialization. 31. { 32. int cwd_err; 33. size_t d_length,length,UNINIT_VAR(buff_length); ^ 34. char * start; 35. char buff[FN_REFLEN + 1]; #367 mysys/mf_qsort.c:133: error: Dead Store The value written to `&a` is never used. 131. for (ptr = low_ptr; ptr > low && CMP(ptr - size, ptr) > 0; 132. ptr -= size) 133. SWAP(ptr, ptr - size, size, ptr_cmp); ^ 134. } 135. POP(low, high); #368 mysys/mf_qsort.c:133: error: Dead Store The value written to `&b` is never used. 131. for (ptr = low_ptr; ptr > low && CMP(ptr - size, ptr) > 0; 132. ptr -= size) 133. SWAP(ptr, ptr - size, size, ptr_cmp); ^ 134. } 135. POP(low, high); #369 mysys/mf_qsort.c:144: error: Dead Store The value written to `&a` is never used. 142. { 143. size_t step = size* (count / 8); 144. MEDIAN(low, low + step, low+step*2); ^ 145. MEDIAN(mid - step, mid, mid+step); 146. MEDIAN(high - 2 * step, high-step, high); #370 mysys/mf_qsort.c:144: error: Dead Store The value written to `&b` is never used. 142. { 143. size_t step = size* (count / 8); 144. MEDIAN(low, low + step, low+step*2); ^ 145. MEDIAN(mid - step, mid, mid+step); 146. MEDIAN(high - 2 * step, high-step, high); #371 mysys/mf_qsort.c:145: error: Dead Store The value written to `&a` is never used. 143. size_t step = size* (count / 8); 144. MEDIAN(low, low + step, low+step*2); 145. MEDIAN(mid - step, mid, mid+step); ^ 146. MEDIAN(high - 2 * step, high-step, high); 147. /* Put best median in 'mid' */ #372 mysys/mf_qsort.c:145: error: Dead Store The value written to `&b` is never used. 143. size_t step = size* (count / 8); 144. MEDIAN(low, low + step, low+step*2); 145. MEDIAN(mid - step, mid, mid+step); ^ 146. MEDIAN(high - 2 * step, high-step, high); 147. /* Put best median in 'mid' */ #373 mysys/mf_qsort.c:146: error: Dead Store The value written to `&a` is never used. 144. MEDIAN(low, low + step, low+step*2); 145. MEDIAN(mid - step, mid, mid+step); 146. MEDIAN(high - 2 * step, high-step, high); ^ 147. /* Put best median in 'mid' */ 148. MEDIAN(low+step, mid, high-step); #374 mysys/mf_qsort.c:146: error: Dead Store The value written to `&b` is never used. 144. MEDIAN(low, low + step, low+step*2); 145. MEDIAN(mid - step, mid, mid+step); 146. MEDIAN(high - 2 * step, high-step, high); ^ 147. /* Put best median in 'mid' */ 148. MEDIAN(low+step, mid, high-step); #375 mysys/mf_qsort.c:148: error: Dead Store The value written to `&a` is never used. 146. MEDIAN(high - 2 * step, high-step, high); 147. /* Put best median in 'mid' */ 148. MEDIAN(low+step, mid, high-step); ^ 149. low_ptr = low; 150. high_ptr = high; #376 mysys/mf_qsort.c:148: error: Dead Store The value written to `&b` is never used. 146. MEDIAN(high - 2 * step, high-step, high); 147. /* Put best median in 'mid' */ 148. MEDIAN(low+step, mid, high-step); ^ 149. low_ptr = low; 150. high_ptr = high; #377 mysys/mf_qsort.c:154: error: Dead Store The value written to `&a` is never used. 152. else 153. { 154. MEDIAN(low, mid, high); ^ 155. /* The low and high argument are already in sorted against 'pivot' */ 156. low_ptr = low + size; #378 mysys/mf_qsort.c:154: error: Dead Store The value written to `&b` is never used. 152. else 153. { 154. MEDIAN(low, mid, high); ^ 155. /* The low and high argument are already in sorted against 'pivot' */ 156. low_ptr = low + size; #379 mysys/mf_qsort.c:170: error: Dead Store The value written to `&a` is never used. 168. if (low_ptr < high_ptr) 169. { 170. SWAP(low_ptr, high_ptr, size, ptr_cmp); ^ 171. low_ptr += size; 172. high_ptr -= size; #380 mysys/mf_qsort.c:170: error: Dead Store The value written to `&b` is never used. 168. if (low_ptr < high_ptr) 169. { 170. SWAP(low_ptr, high_ptr, size, ptr_cmp); ^ 171. low_ptr += size; 172. high_ptr -= size; #381 mysys/my_atomic_writes.c:129: error: Uninitialized Value `_.st_rdev` is read without initialization. 127. } 128. #endif 129. shannon_devices[shannon_found_devices].st_dev= stat_buff.st_rdev; ^ 130. snprintf(shannon_devices[shannon_found_devices].dev_name, 131. sizeof(shannon_devices[shannon_found_devices].dev_name), #382 mysys/my_copy.c:65: error: Dead Store The value written to `&from_file` is never used. 63. DBUG_PRINT("my",("from %s to %s MyFlags %lu", from, to, MyFlags)); 64. 65. from_file=to_file= -1; ^ 66. DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */ 67. if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ #383 mysys/my_getopt.c:200: error: Dead Store The value written to `&opt_found` is never used. 198. my_get_one_option get_one_option) 199. { 200. uint UNINIT_VAR(opt_found), argvpos= 0, length; ^ 201. my_bool end_of_options= 0, must_be_var, set_maximum_value, 202. option_is_loose, option_is_autoset; #384 mysys/my_getopt.c:200: error: Uninitialized Value `opt_found` is read without initialization. 198. my_get_one_option get_one_option) 199. { 200. uint UNINIT_VAR(opt_found), argvpos= 0, length; ^ 201. my_bool end_of_options= 0, must_be_var, set_maximum_value, 202. option_is_loose, option_is_autoset; #385 mysys/my_getopt.c:205: error: Uninitialized Value `prev_found` is read without initialization. 203. char **pos, **pos_end, *optend, *opt_str, key_name[FN_REFLEN]; 204. char *filename= (char*)""; 205. const char *UNINIT_VAR(prev_found); ^ 206. const struct my_option *optp; 207. void *value; #386 mysys/my_getopt.c:209: error: Dead Store The value written to `&is_cmdline_arg` is never used. 207. void *value; 208. int ho_error= 0, error, i; 209. my_bool is_cmdline_arg= 1; ^ 210. DBUG_ENTER("handle_options"); 211. #387 mysys/my_getopt.c:674: error: Dead Store The value written to `&ptr` is never used. 672. set_if_smaller(len, FN_REFLEN-1); 673. strmake(key_name, cur_arg, len); 674. DBUG_RETURN(++ptr); ^ 675. } 676. else #388 mysys/my_lib.c:145: error: Dead Store The value written to `&dp` is never used. 143. NAMES_START_SIZE, MYF(MyFlags)); 144. 145. dp= (struct dirent*) dirent_tmp; ^ 146. 147. while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp))) #389 mysys/my_seek.c:49: error: Dead Store The value written to `&newpos` is never used. 47. my_off_t my_seek(File fd, my_off_t pos, int whence, myf MyFlags) 48. { 49. os_off_t newpos= -1; ^ 50. DBUG_ENTER("my_seek"); 51. DBUG_PRINT("my",("fd: %d Pos: %llu Whence: %d MyFlags: %lu", #390 mysys/string.c:163: error: Dead Store The value written to `&next_pos` is never used. 161. { 162. const char *cur_pos= append; 163. const char *next_pos= cur_pos; ^ 164. 165. /* Search for quote in each string and replace with escaped quote */ #391 mysys/tree.c:151: error: Dead Store The value written to `&abort` is never used. 149. { 150. first_error= first_error ? first_error : error; 151. abort= 1; ^ 152. } 153. } #392 mysys/typelib.c:73: error: Uninitialized Value `findpos` is read without initialization. 71. { 72. int find,pos; 73. int UNINIT_VAR(findpos); /* guarded by find */ ^ 74. const char *UNINIT_VAR(termptr); 75. const char *i; #393 mysys/typelib.c:74: error: Uninitialized Value `termptr` is read without initialization. 72. int find,pos; 73. int UNINIT_VAR(findpos); /* guarded by find */ 74. const char *UNINIT_VAR(termptr); ^ 75. const char *i; 76. const char *j; #394 plugin/auth_pam/auth_pam.c:189: error: Uninitialized Value `proc_id` is read without initialization. 187. close(p_to_c[1]); 188. close(c_to_p[0]); 189. while (waitpid(proc_id, NULL, WNOHANG) != (int) proc_id) ^ 190. { 191. if (n_sleep++ == sleep_limit) #395 plugin/disks/information_schema_disks.cc:67: error: Static Initialization Order Fiasco Initializer of Show::disks_table_fields accesses global variable from a different translation unit: type_handler_varchar|. 65. namespace Show { 66. 67. ST_FIELD_INFO disks_table_fields[]= ^ 68. { 69. Column("Disk", Varchar(PATH_MAX), NOT_NULL), #396 plugin/disks/information_schema_disks.cc:174: error: Dead Store The value written to `&rv` is never used. 172. static int disks_fill_table(THD* pThd, TABLE_LIST* pTables, Item* pCond) 173. { 174. int rv= 1; ^ 175. #ifdef HAVE_SETMNTENT 176. struct mntent* pEnt; #397 plugin/feedback/feedback.cc:66: error: Static Initialization Order Fiasco Initializer of feedback::feedback_fields accesses global variable from a different translation unit: type_handler_varchar|. 64. GLOBAL_STATUS tables otherwise condition pushdown below will not work 65. */ 66. static ST_FIELD_INFO feedback_fields[] = ^ 67. { 68. Show::Column("VARIABLE_NAME", Show::Varchar(255), NOT_NULL), #398 plugin/func_test/plugin.cc:71: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_sysconst_test accesses global variable from a different translation unit: Create_func_sysconst_test::s_singleton|. 69. 70. 71. static Plugin_function ^ 72. plugin_descriptor_function_sysconst_test(BUILDER(Create_func_sysconst_test)); 73. #399 plugin/handler_socket/handlersocket/database.cpp:428: error: Dead Store The value written to `&suc` is never used. 426. } 427. { 428. bool suc = true; ^ 429. #if MYSQL_VERSION_ID >= 50505 430. suc = (trans_commit_stmt(thd) == 0); #400 plugin/handler_socket/libhsclient/auto_ptrcontainer.hpp:46: error: Use After Delete accessing `std::_List_iterator::operator*()` that was invalidated by `delete` on line 46. 44. ~auto_ptrcontainer() { 45. for (iterator i = begin(); i != end(); ++i) { 46. delete *i; ^ 47. } 48. } #401 plugin/locale_info/locale_info.cc:41: error: Static Initialization Order Fiasco Initializer of Show::locale_info_locale_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 39. 40. /* LOCALES */ 41. static ST_FIELD_INFO locale_info_locale_fields_info[]= ^ 42. { 43. Column("ID", SLonglong(4), NOT_NULL, "Id"), #402 plugin/metadata_lock_info/metadata_lock_info.cc:37: error: Static Initialization Order Fiasco Initializer of Show::i_s_metadata_lock_info_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 35. namespace Show { 36. 37. static ST_FIELD_INFO i_s_metadata_lock_info_fields_info[] = ^ 38. { 39. Column("THREAD_ID", ULonglong(20), NOT_NULL, "thread_id"), #403 plugin/qc_info/qc_info.cc:87: error: Static Initialization Order Fiasco Initializer of Show::qc_info_fields accesses global variable from a different translation unit: type_handler_varchar|. 85. 86. /* ST_FIELD_INFO is defined in table.h */ 87. static ST_FIELD_INFO qc_info_fields[]= ^ 88. { 89. Column("STATEMENT_SCHEMA", Varchar(NAME_LEN), NOT_NULL), #404 plugin/query_response_time/plugin.cc:76: error: Static Initialization Order Fiasco Initializer of Show::query_response_time_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 74. namespace Show { 75. 76. ST_FIELD_INFO query_response_time_fields_info[] = ^ 77. { 78. Column("TIME", Varchar(QRT_TIME_STRING_LENGTH), NOT_NULL, "Time"), #405 plugin/type_geom/plugin.cc:31: error: Static Initialization Order Fiasco Initializer of Show::spatial_ref_sys_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 29. namespace Show { 30. 31. static ST_FIELD_INFO spatial_ref_sys_fields_info[]= ^ 32. { 33. Column("SRID", SShort(5), NOT_NULL), #406 plugin/type_geom/plugin.cc:98: error: Static Initialization Order Fiasco Initializer of Show::geometry_columns_fields_info accesses global variable from a different translation unit: type_handler_stiny|. 96. namespace Show { 97. 98. static ST_FIELD_INFO geometry_columns_fields_info[]= ^ 99. { 100. Column("F_TABLE_CATALOG", Catalog(), NOT_NULL, OPEN_FRM_ONLY), #407 plugin/type_inet/plugin.cc:158: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_inet6_aton accesses global variable from a different translation unit: Create_func_inet6_aton::s_singleton|. 156. 157. 158. static Plugin_function ^ 159. plugin_descriptor_function_inet_aton(BUILDER(Create_func_inet_aton)), 160. plugin_descriptor_function_inet_ntoa(BUILDER(Create_func_inet_ntoa)), #408 plugin/type_inet/plugin.cc:158: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_inet6_ntoa accesses global variable from a different translation unit: Create_func_inet6_ntoa::s_singleton|. 156. 157. 158. static Plugin_function ^ 159. plugin_descriptor_function_inet_aton(BUILDER(Create_func_inet_aton)), 160. plugin_descriptor_function_inet_ntoa(BUILDER(Create_func_inet_ntoa)), #409 plugin/type_inet/plugin.cc:158: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_inet_aton accesses global variable from a different translation unit: Create_func_inet_aton::s_singleton|. 156. 157. 158. static Plugin_function ^ 159. plugin_descriptor_function_inet_aton(BUILDER(Create_func_inet_aton)), 160. plugin_descriptor_function_inet_ntoa(BUILDER(Create_func_inet_ntoa)), #410 plugin/type_inet/plugin.cc:158: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_inet_ntoa accesses global variable from a different translation unit: Create_func_inet_ntoa::s_singleton|. 156. 157. 158. static Plugin_function ^ 159. plugin_descriptor_function_inet_aton(BUILDER(Create_func_inet_aton)), 160. plugin_descriptor_function_inet_ntoa(BUILDER(Create_func_inet_ntoa)), #411 plugin/type_inet/plugin.cc:158: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_is_ipv4 accesses global variable from a different translation unit: Create_func_is_ipv4::s_singleton|. 156. 157. 158. static Plugin_function ^ 159. plugin_descriptor_function_inet_aton(BUILDER(Create_func_inet_aton)), 160. plugin_descriptor_function_inet_ntoa(BUILDER(Create_func_inet_ntoa)), #412 plugin/type_inet/plugin.cc:158: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_is_ipv4_compat accesses global variable from a different translation unit: Create_func_is_ipv4_compat::s_singleton|. 156. 157. 158. static Plugin_function ^ 159. plugin_descriptor_function_inet_aton(BUILDER(Create_func_inet_aton)), 160. plugin_descriptor_function_inet_ntoa(BUILDER(Create_func_inet_ntoa)), #413 plugin/type_inet/plugin.cc:158: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_is_ipv4_mapped accesses global variable from a different translation unit: Create_func_is_ipv4_mapped::s_singleton|. 156. 157. 158. static Plugin_function ^ 159. plugin_descriptor_function_inet_aton(BUILDER(Create_func_inet_aton)), 160. plugin_descriptor_function_inet_ntoa(BUILDER(Create_func_inet_ntoa)), #414 plugin/type_inet/plugin.cc:158: error: Static Initialization Order Fiasco Initializer of plugin_descriptor_function_is_ipv6 accesses global variable from a different translation unit: Create_func_is_ipv6::s_singleton|. 156. 157. 158. static Plugin_function ^ 159. plugin_descriptor_function_inet_aton(BUILDER(Create_func_inet_aton)), 160. plugin_descriptor_function_inet_ntoa(BUILDER(Create_func_inet_ntoa)), #415 plugin/type_mysql_json/mysql_json.cc:288: error: Uninitialized Value `blob_length` is read without initialization. 286. const enum_field_types field_type= static_cast(type_value); 287. 288. size_t UNINIT_VAR(blob_length), length_bytes; ^ 289. const uchar *blob_start; 290. #416 plugin/user_variables/user_variables.cc:47: error: Static Initialization Order Fiasco Initializer of Show::user_variables_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 45. namespace Show { 46. 47. static ST_FIELD_INFO user_variables_fields_info[] = ^ 48. { 49. Column("VARIABLE_NAME", Name(), NOT_NULL, "Variable_name"), #417 plugin/userstat/client_stats.cc:3: error: Static Initialization Order Fiasco Initializer of Show::client_stats_fields accesses global variable from a different translation unit: type_handler_varchar|. 1. namespace Show { 2. 3. static ST_FIELD_INFO client_stats_fields[]= ^ 4. { 5. Column("CLIENT",Varchar(LIST_PROCESS_HOST_LEN), NOT_NULL, "Client"), #418 plugin/userstat/client_stats.cc:68: error: Dead Store The value written to `&j` is never used. 66. table->field[j++]->store((longlong)user_stats->empty_queries, TRUE); 67. table->field[j++]->store((longlong)user_stats->total_ssl_connections, TRUE); 68. table->field[j++]->store((longlong)user_stats->max_statement_time_exceeded, TRUE); ^ 69. if (schema_table_store_record(thd, table)) 70. { #419 plugin/userstat/index_stats.cc:3: error: Static Initialization Order Fiasco Initializer of Show::index_stats_fields accesses global variable from a different translation unit: type_handler_varchar|. 1. namespace Show { 2. 3. static ST_FIELD_INFO index_stats_fields[]= ^ 4. { 5. Column("TABLE_SCHEMA", Varchar(NAME_LEN), NOT_NULL, "Table_schema"), #420 plugin/userstat/table_stats.cc:3: error: Static Initialization Order Fiasco Initializer of Show::table_stats_fields accesses global variable from a different translation unit: type_handler_varchar|. 1. namespace Show { 2. 3. static ST_FIELD_INFO table_stats_fields[]= ^ 4. { 5. Column("TABLE_SCHEMA", Varchar(NAME_LEN), NOT_NULL, "Table_schema"), #421 plugin/userstat/user_stats.cc:3: error: Static Initialization Order Fiasco Initializer of Show::user_stats_fields accesses global variable from a different translation unit: type_handler_varchar|. 1. namespace Show { 2. 3. static ST_FIELD_INFO user_stats_fields[]= ^ 4. { 5. Column("USER",Varchar(USERNAME_CHAR_LENGTH),NOT_NULL, "User"), #422 plugin/wsrep_info/plugin.cc:60: error: Static Initialization Order Fiasco Initializer of Show::wsrep_memb_fields accesses global variable from a different translation unit: type_handler_varchar|. 58. namespace Show { 59. 60. static ST_FIELD_INFO wsrep_memb_fields[]= ^ 61. { 62. Column("INDEX", SLong(), NOT_NULL, "Index"), #423 plugin/wsrep_info/plugin.cc:69: error: Static Initialization Order Fiasco Initializer of Show::wsrep_status_fields accesses global variable from a different translation unit: type_handler_varchar|. 67. }; 68. 69. static ST_FIELD_INFO wsrep_status_fields[]= ^ 70. { 71. Column("NODE_INDEX", SLong(), NOT_NULL, "Node_Index"), #424 sql-common/client.c:591: error: Dead Store The value written to `&pos` is never used. 589. pos+=2; 590. mysql->server_status=uint2korr(pos); 591. pos+=2; ^ 592. } 593. return FALSE; #425 sql-common/client.c:2670: error: Uninitialized Value `pkt_scramble_len` is read without initialization. 2668. { 2669. char buff[NAME_LEN+USERNAME_LENGTH+100]; 2670. int scramble_data_len, UNINIT_VAR(pkt_scramble_len); ^ 2671. char *end,*host_info= 0, *server_version_end, *pkt_end; 2672. char *scramble_data; #426 sql-common/client.c:4140: error: Dead Store The value written to `&pkt_len` is never used. 4138. */ 4139. pkt= (uchar*)mysql->scramble; 4140. pkt_len= SCRAMBLE_LENGTH + 1; ^ 4141. } 4142. else #427 sql-common/client.c:4192: error: Dead Store The value written to `&pkt_len` is never used. 4190. */ 4191. pkt= (uchar*)mysql->scramble; 4192. pkt_len= SCRAMBLE_LENGTH_323 + 1; ^ 4193. } 4194. else #428 sql-common/my_time.c:918: error: Dead Store The value written to `&state` is never used. 916. const char *end=str + length, *end_of_days; 917. my_bool found_days, found_hours; 918. uint UNINIT_VAR(state); ^ 919. 920. *endptr= str; #429 sql-common/my_time.c:918: error: Uninitialized Value `state` is read without initialization. 916. const char *end=str + length, *end_of_days; 917. my_bool found_days, found_hours; 918. uint UNINIT_VAR(state); ^ 919. 920. *endptr= str; #430 sql-common/my_time.c:968: error: Dead Store The value written to `&state` is never used. 966. date[2]= (ulong) (value/100 % 100); 967. date[3]= (ulong) (value % 100); 968. state=4; ^ 969. goto fractional; 970. } #431 sql/create_options.cc:391: error: Uninitialized Value `_.var_type` is read without initialization. 389. struct my_option optp; 390. plugin_opt_set_limits(&optp, opt->var); 391. switch(optp.var_type) { ^ 392. case GET_ULL: 393. case GET_ULONG: #432 sql/create_options.cc:396: error: Uninitialized Value `_.def_value` is read without initialization. 394. case GET_UINT: 395. opt->type= HA_OPTION_TYPE_ULL; 396. opt->def_value= (ulonglong)optp.def_value; ^ 397. opt->min_value= (ulonglong)optp.min_value; 398. opt->max_value= (ulonglong)optp.max_value; #433 sql/create_options.cc:397: error: Uninitialized Value `_.min_value` is read without initialization. 395. opt->type= HA_OPTION_TYPE_ULL; 396. opt->def_value= (ulonglong)optp.def_value; 397. opt->min_value= (ulonglong)optp.min_value; ^ 398. opt->max_value= (ulonglong)optp.max_value; 399. opt->block_size= (ulonglong)optp.block_size; #434 sql/create_options.cc:398: error: Uninitialized Value `_.max_value` is read without initialization. 396. opt->def_value= (ulonglong)optp.def_value; 397. opt->min_value= (ulonglong)optp.min_value; 398. opt->max_value= (ulonglong)optp.max_value; ^ 399. opt->block_size= (ulonglong)optp.block_size; 400. break; #435 sql/create_options.cc:399: error: Uninitialized Value `_.block_size` is read without initialization. 397. opt->min_value= (ulonglong)optp.min_value; 398. opt->max_value= (ulonglong)optp.max_value; 399. opt->block_size= (ulonglong)optp.block_size; ^ 400. break; 401. case GET_STR: #436 sql/create_options.cc:407: error: Uninitialized Value `_.def_value` is read without initialization. 405. case GET_BOOL: 406. opt->type= HA_OPTION_TYPE_BOOL; 407. opt->def_value= optp.def_value; ^ 408. break; 409. case GET_ENUM: #437 sql/create_options.cc:412: error: Uninitialized Value `_.def_value` is read without initialization. 410. { 411. opt->type= HA_OPTION_TYPE_ENUM; 412. opt->def_value= optp.def_value; ^ 413. 414. char buf[256]; #438 sql/create_options.cc:417: error: Uninitialized Value `_.typelib` is read without initialization. 415. String str(buf, sizeof(buf), system_charset_info); 416. str.length(0); 417. for (const char **s= optp.typelib->type_names; *s; s++) ^ 418. { 419. if (str.append(*s, strlen(*s)) || str.append(',')) #439 sql/create_options.cc:736: error: Uninitialized Value `end` is read without initialization. 734. { 735. const uchar *buff_end= buff + length; 736. engine_option_value *UNINIT_VAR(end); ^ 737. MEM_ROOT *root= &share->mem_root; 738. uint count; #440 sql/create_options.cc:789: error: Uninitialized Value `end` is read without initialization. 787. MEM_ROOT *root) 788. { 789. engine_option_value *UNINIT_VAR(end), *opt; ^ 790. DBUG_ENTER("merge_engine_table_options"); 791. #441 sql/ddl_log.cc:1117: error: Dead Store The value written to `&fr_length` is never used. 1115. without lower case conversion 1116. */ 1117. fr_length= build_table_filename(from_path, FN_REFLEN, ^ 1118. from_db->str, from_table->str, reg_ext, 1119. flags & FN_FROM_IS_TMP); #442 sql/ddl_log.cc:1120: error: Dead Store The value written to `&to_length` is never used. 1118. from_db->str, from_table->str, reg_ext, 1119. flags & FN_FROM_IS_TMP); 1120. to_length= build_table_filename(to_path, FN_REFLEN, ^ 1121. to_db->str, to_table->str, reg_ext, 1122. flags & FN_TO_IS_TMP); #443 sql/ddl_log.cc:1373: error: Dead Store The value written to `&error` is never used. 1371. case DDL_LOG_RENAME_ACTION: 1372. { 1373. error= TRUE; ^ 1374. if (frm_action) 1375. { #444 sql/ddl_log.cc:1756: error: Dead Store The value written to `&error` is never used. 1754. if (!non_existing_table_error(error)) 1755. break; 1756. error= -1; ^ 1757. } 1758. } #445 sql/ddl_log.cc:1760: error: Dead Store The value written to `&error` is never used. 1758. } 1759. else 1760. error= ha_delete_table_force(thd, path.str, &db, &table); ^ 1761. } 1762. strxnmov(to_path, sizeof(to_path)-1, path.str, reg_ext, NullS); #446 sql/ddl_log.cc:2281: error: Dead Store The value written to `&error` is never used. 2279. /* Impossible length. Ignore query */ 2280. recovery_state.query.length(0); 2281. error= 1; ^ 2282. my_error(ER_INTERNAL_ERROR, MYF(0), 2283. "DDL log: QUERY event has impossible length"); #447 sql/des_key_file.cc:72: error: Dead Store The value written to `&end` is never used. 70. // Remove newline and possible other control characters 71. for (start=buf+1 ; my_isspace(des_cs, *start) ; start++) ; 72. end=buf+length; ^ 73. for (end=strend(buf) ; 74. end > start && !my_isgraph(des_cs, end[-1]) ; end--) ; #448 sql/event_data_objects.cc:429: error: Uninitialized Value `tz_name.str` is read without initialization during the call to `Event_basic::load_time_zone()`. 427. DBUG_RETURN(TRUE); 428. 429. if (load_time_zone(thd, &tz_name)) ^ 430. DBUG_RETURN(TRUE); 431. #449 sql/event_data_objects.cc:489: error: Uninitialized Value `tz_name.str` is read without initialization during the call to `Event_basic::load_time_zone()`. 487. DBUG_RETURN(TRUE); 488. 489. if (load_time_zone(thd, &tz_name)) ^ 490. DBUG_RETURN(TRUE); 491. #450 sql/event_data_objects.cc:504: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 502. according to the current session settings. 503. */ 504. table->field[ET_FIELD_STARTS]->get_date(&time, TIME_NO_ZERO_DATE | ^ 505. thd->temporal_round_mode()); 506. starts= my_tz_OFFSET0->TIME_to_gmt_sec(&time,¬_used); #451 sql/event_queue.cc:594: error: Uninitialized Value `last_executed` is read without initialization. 592. bool ret= FALSE; 593. *event_name= NULL; 594. my_time_t UNINIT_VAR(last_executed); ^ 595. int UNINIT_VAR(status); 596. DBUG_ENTER("Event_queue::get_top_for_execution_if_time"); #452 sql/event_queue.cc:595: error: Uninitialized Value `status` is read without initialization. 593. *event_name= NULL; 594. my_time_t UNINIT_VAR(last_executed); 595. int UNINIT_VAR(status); ^ 596. DBUG_ENTER("Event_queue::get_top_for_execution_if_time"); 597. #453 sql/events.cc:1161: error: Dead Store The value written to `&ret` is never used. 1159. TABLE *table; 1160. READ_RECORD read_record_info; 1161. bool ret= TRUE; ^ 1162. uint count= 0; 1163. DBUG_ENTER("Events::load_events_from_db"); #454 sql/field.cc:1057: error: Dead Store The value written to `&buff` is never used. 1055. if (is_null()) 1056. { 1057. *buff++= 0; ^ 1058. return 0; // For NULL values don't write any data 1059. } #455 sql/field.cc:1075: error: Dead Store The value written to `&buff` is never used. 1073. if (is_null()) 1074. { 1075. *buff++= 0; ^ 1076. return 0; // For NULL values don't write any data 1077. } #456 sql/field.cc:2481: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 2479. { 2480. MYSQL_TIME ltime, tmp; 2481. if (get_date(<ime, Datetime::Options_cmp(thd))) ^ 2482. return 0; 2483. if (ltime.time_type != MYSQL_TIMESTAMP_TIME) #457 sql/field.cc:2485: error: Uninitialized Value `l_time1.day` is read without initialization during the call to `time_to_datetime_with_warn()`. 2483. if (ltime.time_type != MYSQL_TIMESTAMP_TIME) 2484. return pack_time(<ime); 2485. if (time_to_datetime_with_warn(thd, <ime, &tmp, TIME_CONV_NONE)) ^ 2486. return 0; 2487. return pack_time(&tmp); #458 sql/field.cc:2495: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 2493. MYSQL_TIME ltime; 2494. Time::Options_cmp opt(thd); 2495. if (get_date(<ime, opt)) ^ 2496. return 0; 2497. if (ltime.time_type == MYSQL_TIMESTAMP_TIME) #459 sql/field.cc:2812: error: Uninitialized Value `int_digits_tail_from` is read without initialization. 2810. right of the '.' (explained below) 2811. */ 2812. const uchar *UNINIT_VAR(int_digits_tail_from); ^ 2813. /* Number of 0 that need to be added at the left of the '.' (1E3: 3 zeros) */ 2814. uint UNINIT_VAR(int_digits_added_zeros); #460 sql/field.cc:2814: error: Uninitialized Value `int_digits_added_zeros` is read without initialization. 2812. const uchar *UNINIT_VAR(int_digits_tail_from); 2813. /* Number of 0 that need to be added at the left of the '.' (1E3: 3 zeros) */ 2814. uint UNINIT_VAR(int_digits_added_zeros); ^ 2815. /* 2816. Pointer used when digits move from the right of the '.' to the left #461 sql/field.cc:2819: error: Uninitialized Value `frac_digits_head_end` is read without initialization. 2817. of the '.' 2818. */ 2819. const uchar *UNINIT_VAR(frac_digits_head_end); ^ 2820. /* Number of 0 that need to be added at the right of the '.' (for 1E-3) */ 2821. uint UNINIT_VAR(frac_digits_added_zeros); #462 sql/field.cc:2821: error: Uninitialized Value `frac_digits_added_zeros` is read without initialization. 2819. const uchar *UNINIT_VAR(frac_digits_head_end); 2820. /* Number of 0 that need to be added at the right of the '.' (for 1E-3) */ 2821. uint UNINIT_VAR(frac_digits_added_zeros); ^ 2822. uchar *pos,*tmp_left_pos,*tmp_right_pos; 2823. /* Pointers that are used as limits (begin and end of the field buffer) */ #463 sql/field.cc:5028: error: Null Dereference The call to `double2my_decimal` ends up calling `dtoa` (after 2 more calls) and may trigger the following issue: `from` could be null (from the call to `double2my_decimal()` on line 5028) and is dereferenced in the call to `double2my_decimal()`. 5026. { 5027. DBUG_ASSERT(marked_for_read()); 5028. double2my_decimal(E_DEC_FATAL_ERROR, val_real(), decimal_value); ^ 5029. return decimal_value; 5030. } #464 sql/field.cc:5028: error: Null Dereference The call to `double2my_decimal` ends up calling `dtoa` (after 2 more calls) and may trigger the following issue: `res` could be null (from the call to `double2my_decimal()` on line 5028) and is dereferenced in the call to `double2my_decimal()`. 5026. { 5027. DBUG_ASSERT(marked_for_read()); 5028. double2my_decimal(E_DEC_FATAL_ERROR, val_real(), decimal_value); ^ 5029. return decimal_value; 5030. } #465 sql/field.cc:5232: error: Uninitialized Value `sec_part` is read without initialization. 5230. ulong sec_part; 5231. my_time_t ts= get_timestamp(&sec_part); 5232. if (!ts && !sec_part) ^ 5233. return to->store_time_dec(Datetime::zero().get_mysql_time(), decimals()); 5234. return to->store_timestamp_dec(Timeval(ts, sec_part), decimals()); #466 sql/field.cc:5319: error: Uninitialized Value `l_time1.day` is read without initialization during the call to `Datetime::Datetime()`. 5317. ErrConvTime str(ltime); 5318. THD *thd= get_thd(); 5319. Datetime dt(thd, &warn, ltime, Timestamp::DatetimeOptions(thd), decimals()); ^ 5320. return store_TIME_with_warning(thd, &dt, &str, warn); 5321. } #467 sql/field.cc:5329: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 5327. THD *thd= get_thd(); 5328. MYSQL_TIME_STATUS st; 5329. Datetime dt(thd, &st, from, len, cs, Timestamp::DatetimeOptions(thd), decimals()); ^ 5330. return store_TIME_with_warning(thd, &dt, &str, st.warnings); 5331. } #468 sql/field.cc:5520: error: Uninitialized Value `sec_part` is read without initialization. 5518. DBUG_ASSERT(!is_null_in_record(record)); 5519. ulong sec_part; 5520. return !get_timestamp(ptr_in_record(record), &sec_part) && !sec_part && ^ 5521. bool(sql_mode_for_dates(thd) & TIME_NO_ZERO_DATE) != false; 5522. } #469 sql/field.cc:5529: error: Uninitialized Value `sec_part` is read without initialization. 5527. ulong sec_part; 5528. my_time_t ts= get_timestamp(&sec_part); 5529. return get_thd()->timestamp_to_TIME(ltime, ts, sec_part, fuzzydate); ^ 5530. } 5531. #470 sql/field.cc:5679: error: Uninitialized Value `ltime.day` is read without initialization during the call to `Datetime::Datetime()`. 5677. THD *thd= get_thd(); 5678. ErrConvDecimal str(d); 5679. Datetime dt(thd, &error, d, Timestamp::DatetimeOptions(thd), decimals()); ^ 5680. return store_TIME_with_warning(thd, &dt, &str, error); 5681. } #471 sql/field.cc:5679: error: Uninitialized Value `ltime.month` is read without initialization during the call to `Datetime::Datetime()`. 5677. THD *thd= get_thd(); 5678. ErrConvDecimal str(d); 5679. Datetime dt(thd, &error, d, Timestamp::DatetimeOptions(thd), decimals()); ^ 5680. return store_TIME_with_warning(thd, &dt, &str, error); 5681. } #472 sql/field.cc:5679: error: Uninitialized Value `ltime.neg` is read without initialization during the call to `Datetime::Datetime()`. 5677. THD *thd= get_thd(); 5678. ErrConvDecimal str(d); 5679. Datetime dt(thd, &error, d, Timestamp::DatetimeOptions(thd), decimals()); ^ 5680. return store_TIME_with_warning(thd, &dt, &str, error); 5681. } #473 sql/field.cc:5679: error: Uninitialized Value `ltime.second_part` is read without initialization during the call to `Datetime::Datetime()`. 5677. THD *thd= get_thd(); 5678. ErrConvDecimal str(d); 5679. Datetime dt(thd, &error, d, Timestamp::DatetimeOptions(thd), decimals()); ^ 5680. return store_TIME_with_warning(thd, &dt, &str, error); 5681. } #474 sql/field.cc:5679: error: Uninitialized Value `this.hour` is read without initialization during the call to `Datetime::Datetime()`. 5677. THD *thd= get_thd(); 5678. ErrConvDecimal str(d); 5679. Datetime dt(thd, &error, d, Timestamp::DatetimeOptions(thd), decimals()); ^ 5680. return store_TIME_with_warning(thd, &dt, &str, error); 5681. } #475 sql/field.cc:5679: error: Uninitialized Value `this.second_part` is read without initialization during the call to `Datetime::Datetime()`. 5677. THD *thd= get_thd(); 5678. ErrConvDecimal str(d); 5679. Datetime dt(thd, &error, d, Timestamp::DatetimeOptions(thd), decimals()); ^ 5680. return store_TIME_with_warning(thd, &dt, &str, error); 5681. } #476 sql/field.cc:5679: error: Uninitialized Value `this.second` is read without initialization during the call to `Datetime::Datetime()`. 5677. THD *thd= get_thd(); 5678. ErrConvDecimal str(d); 5679. Datetime dt(thd, &error, d, Timestamp::DatetimeOptions(thd), decimals()); ^ 5680. return store_TIME_with_warning(thd, &dt, &str, error); 5681. } #477 sql/field.cc:5886: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 5884. ErrConvString str(from, len, cs); 5885. THD *thd= get_thd(); 5886. Datetime dt(thd, &st, from, len, cs, Datetime::Options(thd), decimals()); ^ 5887. return store_TIME_with_warning(&dt, &str, st.warnings); 5888. } #478 sql/field.cc:5915: error: Uninitialized Value `l_time1.day` is read without initialization during the call to `Datetime::Datetime()`. 5913. ErrConvTime str(ltime); 5914. THD *thd= get_thd(); 5915. Datetime dt(thd, &error, ltime, Datetime::Options(thd), decimals()); ^ 5916. return store_TIME_with_warning(&dt, &str, error); 5917. } #479 sql/field.cc:5925: error: Uninitialized Value `ltime.day` is read without initialization during the call to `Datetime::Datetime()`. 5923. ErrConvDecimal str(d); 5924. THD *thd= get_thd(); 5925. Datetime tm(thd, &error, d, Datetime::Options(thd), decimals()); ^ 5926. return store_TIME_with_warning(&tm, &str, error); 5927. } #480 sql/field.cc:5925: error: Uninitialized Value `ltime.month` is read without initialization during the call to `Datetime::Datetime()`. 5923. ErrConvDecimal str(d); 5924. THD *thd= get_thd(); 5925. Datetime tm(thd, &error, d, Datetime::Options(thd), decimals()); ^ 5926. return store_TIME_with_warning(&tm, &str, error); 5927. } #481 sql/field.cc:5925: error: Uninitialized Value `ltime.neg` is read without initialization during the call to `Datetime::Datetime()`. 5923. ErrConvDecimal str(d); 5924. THD *thd= get_thd(); 5925. Datetime tm(thd, &error, d, Datetime::Options(thd), decimals()); ^ 5926. return store_TIME_with_warning(&tm, &str, error); 5927. } #482 sql/field.cc:5925: error: Uninitialized Value `ltime.second_part` is read without initialization during the call to `Datetime::Datetime()`. 5923. ErrConvDecimal str(d); 5924. THD *thd= get_thd(); 5925. Datetime tm(thd, &error, d, Datetime::Options(thd), decimals()); ^ 5926. return store_TIME_with_warning(&tm, &str, error); 5927. } #483 sql/field.cc:5925: error: Uninitialized Value `this.hour` is read without initialization during the call to `Datetime::Datetime()`. 5923. ErrConvDecimal str(d); 5924. THD *thd= get_thd(); 5925. Datetime tm(thd, &error, d, Datetime::Options(thd), decimals()); ^ 5926. return store_TIME_with_warning(&tm, &str, error); 5927. } #484 sql/field.cc:5925: error: Uninitialized Value `this.second_part` is read without initialization during the call to `Datetime::Datetime()`. 5923. ErrConvDecimal str(d); 5924. THD *thd= get_thd(); 5925. Datetime tm(thd, &error, d, Datetime::Options(thd), decimals()); ^ 5926. return store_TIME_with_warning(&tm, &str, error); 5927. } #485 sql/field.cc:5925: error: Uninitialized Value `this.second` is read without initialization during the call to `Datetime::Datetime()`. 5923. ErrConvDecimal str(d); 5924. THD *thd= get_thd(); 5925. Datetime tm(thd, &error, d, Datetime::Options(thd), decimals()); ^ 5926. return store_TIME_with_warning(&tm, &str, error); 5927. } #486 sql/field.cc:5981: error: Uninitialized Value `l_time2.time_type` is read without initialization during the call to `Datetime::Datetime()`. 5979. { 5980. Datetime::Options opt(TIME_CONV_NONE, thd); 5981. Datetime dt(thd, const_item, opt, decimals()); ^ 5982. if (!dt.is_valid_datetime()) 5983. return NULL; #487 sql/field.cc:5995: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 5993. { 5994. Datetime dt= type_handler()->field_type() == MYSQL_TYPE_TIMESTAMP ? 5995. Datetime(thd, const_item, Timestamp::DatetimeOptions(thd)) : ^ 5996. Datetime(thd, const_item, Datetime::Options_cmp(thd)); 5997. if (!dt.is_valid_datetime()) #488 sql/field.cc:5995: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 5993. { 5994. Datetime dt= type_handler()->field_type() == MYSQL_TYPE_TIMESTAMP ? 5995. Datetime(thd, const_item, Timestamp::DatetimeOptions(thd)) : ^ 5996. Datetime(thd, const_item, Datetime::Options_cmp(thd)); 5997. if (!dt.is_valid_datetime()) #489 sql/field.cc:5996: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 5994. Datetime dt= type_handler()->field_type() == MYSQL_TYPE_TIMESTAMP ? 5995. Datetime(thd, const_item, Timestamp::DatetimeOptions(thd)) : 5996. Datetime(thd, const_item, Datetime::Options_cmp(thd)); ^ 5997. if (!dt.is_valid_datetime()) 5998. return NULL; #490 sql/field.cc:5996: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 5994. Datetime dt= type_handler()->field_type() == MYSQL_TYPE_TIMESTAMP ? 5995. Datetime(thd, const_item, Timestamp::DatetimeOptions(thd)) : 5996. Datetime(thd, const_item, Datetime::Options_cmp(thd)); ^ 5997. if (!dt.is_valid_datetime()) 5998. return NULL; #491 sql/field.cc:6066: error: Uninitialized Value `ltime.month` is read without initialization during the call to `Time::Time()`. 6064. */ 6065. Time::Options opt(sql_mode_for_dates(thd), thd); 6066. Time tm(thd, &st, from, len, cs, opt, decimals()); ^ 6067. return store_TIME_with_warning(&tm, &str, st.warnings); 6068. } #492 sql/field.cc:6066: error: Uninitialized Value `warn.warnings` is read without initialization during the call to `Time::Time()`. 6064. */ 6065. Time::Options opt(sql_mode_for_dates(thd), thd); 6066. Time tm(thd, &st, from, len, cs, opt, decimals()); ^ 6067. return store_TIME_with_warning(&tm, &str, st.warnings); 6068. } #493 sql/field.cc:6153: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 6151. DBUG_ASSERT(marked_for_read()); 6152. MYSQL_TIME ltime; 6153. get_date(<ime, Datetime::Options(TIME_TIME_ONLY, get_thd())); ^ 6154. str->alloc(field_length + 1); 6155. str->length(my_time_to_str(<ime, const_cast(str->ptr()), decimals())); #494 sql/field.cc:6155: error: Uninitialized Value `l_time.year` is read without initialization during the call to `my_time_to_str()`. 6153. get_date(<ime, Datetime::Options(TIME_TIME_ONLY, get_thd())); 6154. str->alloc(field_length + 1); 6155. str->length(my_time_to_str(<ime, const_cast(str->ptr()), decimals())); ^ 6156. str->set_charset(&my_charset_numeric); 6157. return str; #495 sql/field.cc:6227: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 6225. { 6226. MYSQL_TIME ltime; 6227. get_date(<ime, Time::Options(TIME_TIME_ONLY, get_thd())); ^ 6228. return protocol->store_time(<ime, decimals()); 6229. } #496 sql/field.cc:6327: error: Uninitialized Value `this.day` is read without initialization during the call to `Time::Time()`. 6325. { 6326. // Get the value of const_item with conversion from DATETIME to TIME 6327. Time tm(get_thd(), const_item, Time::Options_cmp(thd, mode)); ^ 6328. if (!tm.is_valid_time()) 6329. return NULL; #497 sql/field.cc:6327: error: Uninitialized Value `this.month` is read without initialization during the call to `Time::Time()`. 6325. { 6326. // Get the value of const_item with conversion from DATETIME to TIME 6327. Time tm(get_thd(), const_item, Time::Options_cmp(thd, mode)); ^ 6328. if (!tm.is_valid_time()) 6329. return NULL; #498 sql/field.cc:6327: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 6325. { 6326. // Get the value of const_item with conversion from DATETIME to TIME 6327. Time tm(get_thd(), const_item, Time::Options_cmp(thd, mode)); ^ 6328. if (!tm.is_valid_time()) 6329. return NULL; #499 sql/field.cc:6327: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 6325. { 6326. // Get the value of const_item with conversion from DATETIME to TIME 6327. Time tm(get_thd(), const_item, Time::Options_cmp(thd, mode)); ^ 6328. if (!tm.is_valid_time()) 6329. return NULL; #500 sql/field.cc:6381: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 6379. DBUG_ASSERT(marked_for_read()); 6380. MYSQL_TIME ltime; 6381. get_date(<ime, Time::Options(TIME_TIME_ONLY, get_thd())); ^ 6382. longlong val= TIME_to_ulonglong_time(<ime); 6383. return ltime.neg ? -val : val; #501 sql/field.cc:6382: error: Uninitialized Value `my_time.hour` is read without initialization during the call to `TIME_to_ulonglong_time()`. 6380. MYSQL_TIME ltime; 6381. get_date(<ime, Time::Options(TIME_TIME_ONLY, get_thd())); 6382. longlong val= TIME_to_ulonglong_time(<ime); ^ 6383. return ltime.neg ? -val : val; 6384. } #502 sql/field.cc:6383: error: Uninitialized Value `_.neg` is read without initialization. 6381. get_date(<ime, Time::Options(TIME_TIME_ONLY, get_thd())); 6382. longlong val= TIME_to_ulonglong_time(<ime); 6383. return ltime.neg ? -val : val; ^ 6384. } 6385. #503 sql/field.cc:6390: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 6388. DBUG_ASSERT(marked_for_read()); 6389. MYSQL_TIME ltime; 6390. get_date(<ime, Time::Options(TIME_TIME_ONLY, get_thd())); ^ 6391. return TIME_to_double(<ime); 6392. } #504 sql/field.cc:6391: error: Uninitialized Value `my_time.second_part` is read without initialization during the call to `TIME_to_double()`. 6389. MYSQL_TIME ltime; 6390. get_date(<ime, Time::Options(TIME_TIME_ONLY, get_thd())); 6391. return TIME_to_double(<ime); ^ 6392. } 6393. #505 sql/field.cc:6665: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 6663. ErrConvString str(from, len, cs); 6664. THD *thd= get_thd(); 6665. Datetime dt(thd, &st, from, len, cs, Date::Options(thd), 0); ^ 6666. return store_TIME_with_warning(&dt, &str, st.warnings); 6667. } #506 sql/field.cc:6693: error: Uninitialized Value `l_time1.day` is read without initialization during the call to `Datetime::Datetime()`. 6691. ErrConvTime str(ltime); 6692. THD *thd= get_thd(); 6693. Datetime dt(thd, &error, ltime, Date::Options(thd), 0); ^ 6694. return store_TIME_with_warning(&dt, &str, error); 6695. } #507 sql/field.cc:6702: error: Uninitialized Value `ltime.day` is read without initialization during the call to `Datetime::Datetime()`. 6700. ErrConvDecimal str(d); 6701. THD *thd= get_thd(); 6702. Datetime tm(thd, &error, d, Date::Options(thd), 0); ^ 6703. return store_TIME_with_warning(&tm, &str, error); 6704. } #508 sql/field.cc:6702: error: Uninitialized Value `ltime.month` is read without initialization during the call to `Datetime::Datetime()`. 6700. ErrConvDecimal str(d); 6701. THD *thd= get_thd(); 6702. Datetime tm(thd, &error, d, Date::Options(thd), 0); ^ 6703. return store_TIME_with_warning(&tm, &str, error); 6704. } #509 sql/field.cc:6702: error: Uninitialized Value `ltime.neg` is read without initialization during the call to `Datetime::Datetime()`. 6700. ErrConvDecimal str(d); 6701. THD *thd= get_thd(); 6702. Datetime tm(thd, &error, d, Date::Options(thd), 0); ^ 6703. return store_TIME_with_warning(&tm, &str, error); 6704. } #510 sql/field.cc:6702: error: Uninitialized Value `ltime.second_part` is read without initialization during the call to `Datetime::Datetime()`. 6700. ErrConvDecimal str(d); 6701. THD *thd= get_thd(); 6702. Datetime tm(thd, &error, d, Date::Options(thd), 0); ^ 6703. return store_TIME_with_warning(&tm, &str, error); 6704. } #511 sql/field.cc:6702: error: Uninitialized Value `this.hour` is read without initialization during the call to `Datetime::Datetime()`. 6700. ErrConvDecimal str(d); 6701. THD *thd= get_thd(); 6702. Datetime tm(thd, &error, d, Date::Options(thd), 0); ^ 6703. return store_TIME_with_warning(&tm, &str, error); 6704. } #512 sql/field.cc:6702: error: Uninitialized Value `this.second_part` is read without initialization during the call to `Datetime::Datetime()`. 6700. ErrConvDecimal str(d); 6701. THD *thd= get_thd(); 6702. Datetime tm(thd, &error, d, Date::Options(thd), 0); ^ 6703. return store_TIME_with_warning(&tm, &str, error); 6704. } #513 sql/field.cc:6702: error: Uninitialized Value `this.second` is read without initialization during the call to `Datetime::Datetime()`. 6700. ErrConvDecimal str(d); 6701. THD *thd= get_thd(); 6702. Datetime tm(thd, &error, d, Date::Options(thd), 0); ^ 6703. return store_TIME_with_warning(&tm, &str, error); 6704. } #514 sql/field.cc:6927: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 6925. In case if TIME_ROUND_FRACTIONAL is enabled, nanoseconds will round. 6926. */ 6927. Datetime dt(thd, const_item, Datetime::Options_cmp(thd)); ^ 6928. if (!dt.is_valid_datetime()) 6929. return NULL; #515 sql/field.cc:6927: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 6925. In case if TIME_ROUND_FRACTIONAL is enabled, nanoseconds will round. 6926. */ 6927. Datetime dt(thd, const_item, Datetime::Options_cmp(thd)); ^ 6928. if (!dt.is_valid_datetime()) 6929. return NULL; #516 sql/field.cc:6960: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 6958. then convert the result to DATE. 6959. */ 6960. Datetime dt(thd, const_item, Datetime::Options(TIME_CONV_NONE, thd)); ^ 6961. if (!dt.is_valid_datetime()) 6962. return NULL; #517 sql/field.cc:6960: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 6958. then convert the result to DATE. 6959. */ 6960. Datetime dt(thd, const_item, Datetime::Options(TIME_CONV_NONE, thd)); ^ 6961. if (!dt.is_valid_datetime()) 6962. return NULL; #518 sql/field.cc:7134: error: Uninitialized Value `my_time.second_part` is read without initialization during the call to `TIME_to_double()`. 7132. MYSQL_TIME ltime; 7133. get_date(<ime, date_mode_t(0)); 7134. return TIME_to_double(<ime); ^ 7135. } 7136. #519 sql/field.cc:7141: error: Uninitialized Value `my_time.year` is read without initialization during the call to `TIME_to_ulonglong_datetime()`. 7139. MYSQL_TIME ltime; 7140. get_date(<ime, date_mode_t(0)); 7141. return TIME_to_ulonglong_datetime(<ime); ^ 7142. } 7143. #520 sql/field.cc:7152: error: Uninitialized Value `l_time.year` is read without initialization during the call to `my_datetime_to_str()`. 7150. str->alloc(field_length+1); 7151. str->length(field_length); 7152. my_datetime_to_str(<ime, (char*) str->ptr(), dec); ^ 7153. str->set_charset(&my_charset_numeric); 7154. return str; #521 sql/field.cc:7561: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 7559. THD *thd= get_thd(); 7560. const LEX_CSTRING str= to_lex_cstring(); 7561. return Converter_strntod_with_warn(thd, ^ 7562. Warn_filter_string(thd, this), 7563. Field_string::charset(), #522 sql/field.cc:7561: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 7559. THD *thd= get_thd(); 7560. const LEX_CSTRING str= to_lex_cstring(); 7561. return Converter_strntod_with_warn(thd, ^ 7562. Warn_filter_string(thd, this), 7563. Field_string::charset(), #523 sql/field.cc:7573: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 7571. THD *thd= get_thd(); 7572. const LEX_CSTRING str= to_lex_cstring(); 7573. return Converter_strntoll_with_warn(thd, Warn_filter_string(thd, this), ^ 7574. Field_string::charset(), 7575. str.str, str.length).result(); #524 sql/field.cc:7573: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 7571. THD *thd= get_thd(); 7572. const LEX_CSTRING str= to_lex_cstring(); 7573. return Converter_strntoll_with_warn(thd, Warn_filter_string(thd, this), ^ 7574. Field_string::charset(), 7575. str.str, str.length).result(); #525 sql/field.cc:7965: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 7963. DBUG_ASSERT(marked_for_read()); 7964. THD *thd= get_thd(); 7965. return Converter_strntod_with_warn(thd, Warn_filter(thd), ^ 7966. Field_varstring::charset(), 7967. (const char *) get_data(), #526 sql/field.cc:7965: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 7963. DBUG_ASSERT(marked_for_read()); 7964. THD *thd= get_thd(); 7965. return Converter_strntod_with_warn(thd, Warn_filter(thd), ^ 7966. Field_varstring::charset(), 7967. (const char *) get_data(), #527 sql/field.cc:7976: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 7974. DBUG_ASSERT(marked_for_read()); 7975. THD *thd= get_thd(); 7976. return Converter_strntoll_with_warn(thd, Warn_filter(thd), ^ 7977. Field_varstring::charset(), 7978. (const char *) get_data(), #528 sql/field.cc:7976: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 7974. DBUG_ASSERT(marked_for_read()); 7975. THD *thd= get_thd(); 7976. return Converter_strntoll_with_warn(thd, Warn_filter(thd), ^ 7977. Field_varstring::charset(), 7978. (const char *) get_data(), #529 sql/field.cc:8577: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 8575. String buf; 8576. val_str(&buf, &buf); 8577. return Converter_strntod_with_warn(thd, Warn_filter(thd), field_charset(), ^ 8578. buf.ptr(), buf.length()).result(); 8579. } #530 sql/field.cc:8577: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 8575. String buf; 8576. val_str(&buf, &buf); 8577. return Converter_strntod_with_warn(thd, Warn_filter(thd), field_charset(), ^ 8578. buf.ptr(), buf.length()).result(); 8579. } #531 sql/field.cc:8588: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 8586. String buf; 8587. val_str(&buf, &buf); 8588. return Converter_strntoll_with_warn(thd, Warn_filter(thd), field_charset(), ^ 8589. buf.ptr(), buf.length()).result(); 8590. } #532 sql/field.cc:8588: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 8586. String buf; 8587. val_str(&buf, &buf); 8588. return Converter_strntoll_with_warn(thd, Warn_filter(thd), field_charset(), ^ 8589. buf.ptr(), buf.length()).result(); 8590. } #533 sql/field.cc:8801: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 8799. return 0.0; 8800. THD *thd= get_thd(); 8801. return Converter_strntod_with_warn(thd, Warn_filter(thd), ^ 8802. Field_blob::charset(), 8803. blob, get_length(ptr)).result(); #534 sql/field.cc:8801: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 8799. return 0.0; 8800. THD *thd= get_thd(); 8801. return Converter_strntod_with_warn(thd, Warn_filter(thd), ^ 8802. Field_blob::charset(), 8803. blob, get_length(ptr)).result(); #535 sql/field.cc:8815: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 8813. return 0; 8814. THD *thd= get_thd(); 8815. return Converter_strntoll_with_warn(thd, Warn_filter(thd), ^ 8816. Field_blob::charset(), 8817. blob, get_length(ptr)).result(); #536 sql/field.cc:8815: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 8813. return 0; 8814. THD *thd= get_thd(); 8815. return Converter_strntoll_with_warn(thd, Warn_filter(thd), ^ 8816. Field_blob::charset(), 8817. blob, get_length(ptr)).result(); #537 sql/field.cc:9269: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 9267. String buf; 9268. val_str(&buf, &buf); 9269. return Converter_strntod_with_warn(thd, Warn_filter(thd), field_charset(), ^ 9270. buf.ptr(), buf.length()).result(); 9271. } #538 sql/field.cc:9269: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 9267. String buf; 9268. val_str(&buf, &buf); 9269. return Converter_strntod_with_warn(thd, Warn_filter(thd), field_charset(), ^ 9270. buf.ptr(), buf.length()).result(); 9271. } #539 sql/field.cc:9280: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 9278. String buf; 9279. val_str(&buf, &buf); 9280. return Converter_strntoll_with_warn(thd, Warn_filter(thd), field_charset(), ^ 9281. buf.ptr(), buf.length()).result(); 9282. } #540 sql/field.cc:9280: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntoll_with_warn::Converter_strntoll_with_warn()`. 9278. String buf; 9279. val_str(&buf, &buf); 9280. return Converter_strntoll_with_warn(thd, Warn_filter(thd), field_charset(), ^ 9281. buf.ptr(), buf.length()).result(); 9282. } #541 sql/field.h:352: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strtoll10_with_warn::Converter_strtoll10_with_warn()`. 350. */ 351. THD *thd= current_thd; 352. return Converter_strtoll10_with_warn(thd, Warn_filter(thd), ^ 353. cs, cptr, end - cptr).result(); 354. } #542 sql/field.h:359: error: Uninitialized Value `this.m_end_of_num` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 357. const char *end) const 358. { 359. return Converter_strntod_with_warn(NULL, Warn_filter_all(), ^ 360. cs, cptr, end - cptr).result(); 361. } #543 sql/field.h:359: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strntod_with_warn::Converter_strntod_with_warn()`. 357. const char *end) const 358. { 359. return Converter_strntod_with_warn(NULL, Warn_filter_all(), ^ 360. cs, cptr, end - cptr).result(); 361. } #544 sql/field.h:3237: error: Uninitialized Value `warn` is read without initialization during the call to `Timestamp::round()`. 3235. int warn; 3236. time_round_mode_t mode= Datetime::default_round_mode(get_thd()); 3237. store_TIMESTAMP(Timestamp(ts, sec_part).round(decimals(), mode, &warn)); ^ 3238. } 3239. bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) override; #545 sql/field_conv.cc:434: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 432. MYSQL_TIME ltime; 433. // TODO: we now need to check result 434. if (copy->from_field->get_date(<ime, fuzzydate)) ^ 435. copy->to_field->reset(); 436. else #546 sql/filesort.cc:201: error: Dead Store The value written to `&num_rows` is never used. 199. uint maxbuffer; 200. Merge_chunk *buffpek; 201. ha_rows num_rows= HA_POS_ERROR, not_used=0; ^ 202. IO_CACHE tempfile, buffpek_pointers, *outfile; 203. Sort_param param; #547 sql/filesort.cc:878: error: Dead Store The value written to `&ref_pos` is never used. 876. sort_form=param->sort_form; 877. file=sort_form->file; 878. ref_pos= ref_buff; ^ 879. quick_select=select && select->quick; 880. *found_rows= 0; #548 sql/filesort.cc:1324: error: Dead Store The value written to `&to` is never used. 1322. if (null_value) 1323. { 1324. *to++= 0; ^ 1325. return 0; 1326. } #549 sql/filesort.cc:2662: error: Dead Store The value written to `&to` is never used. 2660. if (item->null_value) 2661. { 2662. *to++=0; ^ 2663. return 0; 2664. } #550 sql/filesort.cc:2684: error: Dead Store The value written to `&to` is never used. 2682. if (item->null_value) 2683. { 2684. *to++=0; ^ 2685. return 0; 2686. } #551 sql/filesort.cc:2730: error: Dead Store The value written to `&to` is never used. 2728. if (item->maybe_null()) 2729. { 2730. *to++=0; ^ 2731. return 0; 2732. } #552 sql/filesort.cc:2775: error: Dead Store The value written to `&to` is never used. 2773. if (sort_field->maybe_null && (to[-1]= !to[-1])) 2774. { 2775. to+= sort_field->length; // don't waste the time reversing all 0's ^ 2776. return; 2777. } #553 sql/gcalc_tools.cc:952: error: Dead Store The value written to `&cur_t_hook` is never used. 950. } 951. prev_state= sav_prev_state; 952. cur_t_hook= starting_t_hook; ^ 953. 954. eq_start= pi.point(); #554 sql/gcalc_tools.cc:1263: error: Uninitialized Value `si.m_first_blk` is read without initialization during the call to `Gcalc_scan_iterator::~Gcalc_scan_iterator()`. 1261. { 1262. if (si.step()) 1263. GCALC_DBUG_RETURN(1); ^ 1264. if (count_slice(&si)) 1265. GCALC_DBUG_RETURN(1); #555 sql/gcalc_tools.cc:1267: error: Uninitialized Value `si.m_first_blk` is read without initialization during the call to `Gcalc_scan_iterator::~Gcalc_scan_iterator()`. 1265. GCALC_DBUG_RETURN(1); 1266. } 1267. GCALC_DBUG_RETURN(0); ^ 1268. } 1269. #556 sql/ha_partition.cc:1850: error: Dead Store The value written to `&error` is never used. 1848. uint num_remain_partitions, part_count, orig_count; 1849. handler **new_file_array; 1850. int error= 1; ^ 1851. bool first; 1852. uint temp_partitions= m_part_info->temp_partitions.elements; #557 sql/ha_partition.cc:2613: error: Uninitialized Value `engine_data` is read without initialization. 2611. table_share->table_cache_key.length), 2612. type, 2613. engine_callback, engine_data, ^ 2614. FALSE)) 2615. DBUG_RETURN(TRUE); #558 sql/ha_partition.cc:2820: error: Dead Store The value written to `&result` is never used. 2818. char *name_buffer_ptr; 2819. uchar *file_buffer, *engine_array; 2820. bool result= TRUE; ^ 2821. char file_name[FN_REFLEN]; 2822. char part_name[FN_REFLEN]; #559 sql/ha_partition.cc:3877: error: Dead Store The value written to `&file` is never used. 3875. { 3876. error= HA_ERR_INITIALIZATION; 3877. file= &m_file[i]; ^ 3878. goto err_handler; 3879. } #560 sql/ha_partition.cc:3896: error: Dead Store The value written to `&file` is never used. 3894. { 3895. error= HA_ERR_INITIALIZATION; 3896. file= &m_file[i]; ^ 3897. goto err_handler; 3898. } #561 sql/ha_partition.cc:3941: error: Dead Store The value written to `&file` is never used. 3939. error= HA_ERR_INITIALIZATION; 3940. /* set file to last handler, so all of them are closed */ 3941. file= &m_file[m_tot_parts - 1]; ^ 3942. goto err_handler; 3943. } #562 sql/ha_partition.cc:5987: error: Dead Store The value written to `&key_len` is never used. 5985. { 5986. int error; 5987. uint UNINIT_VAR(key_len); /* used if have_start_key==TRUE */ ^ 5988. bool reverse_order= FALSE; 5989. DBUG_ENTER("ha_partition::common_index_read"); #563 sql/ha_partition.cc:5987: error: Uninitialized Value `key_len` is read without initialization. 5985. { 5986. int error; 5987. uint UNINIT_VAR(key_len); /* used if have_start_key==TRUE */ ^ 5988. bool reverse_order= FALSE; 5989. DBUG_ENTER("ha_partition::common_index_read"); #564 sql/handler.cc:4444: error: Dead Store The value written to `&textno` is never used. 4442. } 4443. 4444. int textno= -1; // impossible value ^ 4445. switch (error) { 4446. case EACCES: #565 sql/handler.cc:4459: error: Dead Store The value written to `&fatal_error` is never used. 4457. case ENOSPC: 4458. case HA_ERR_DISK_FULL: 4459. SET_FATAL_ERROR; // Ensure error is logged ^ 4460. my_printf_error(ER_DISK_FULL, "Disk got full writing '%s.%s' (Errcode: %M)", 4461. MYF(errflag | ME_ERROR_LOG), #566 sql/handler.cc:4652: error: Dead Store The value written to `&textno` is never used. 4650. } 4651. case HA_ERR_TABLE_NEEDS_UPGRADE: 4652. textno= ER_TABLE_NEEDS_UPGRADE; ^ 4653. my_error(ER_TABLE_NEEDS_UPGRADE, errflag, 4654. "TABLE", table_share->table_name.str); #567 sql/handler.cc:4713: error: Dead Store The value written to `&fatal_error` is never used. 4711. else 4712. { 4713. SET_FATAL_ERROR; ^ 4714. my_error(ER_GET_ERRMSG, errflag, error, str.c_ptr(), engine); 4715. } #568 sql/handler.cc:5739: error: Dead Store The value written to `&key_part` is never used. 5737. uchar *UNINIT_VAR(save_record_0); 5738. KEY *UNINIT_VAR(key_info); 5739. KEY_PART_INFO *UNINIT_VAR(key_part); ^ 5740. KEY_PART_INFO *UNINIT_VAR(key_part_end); 5741. #569 sql/handler.cc:6966: error: Uninitialized Value `error1` is read without initialization. 6964. enum ha_rkey_function find_flag) 6965. { 6966. int error, UNINIT_VAR(error1); ^ 6967. 6968. error= ha_index_init(index, 0); #570 sql/handler.cc:7572: error: Dead Store The value written to `&error` is never used. 7570. return error; 7571. 7572. error= lookup_handler->ha_start_keyread(key_nr); ^ 7573. DBUG_ASSERT(!error); 7574. #571 sql/handler.cc:7616: error: Dead Store The value written to `&end_error` is never used. 7614. lookup_errkey= key_nr; 7615. 7616. int end_error= lookup_handler->ha_end_keyread(); ^ 7617. DBUG_ASSERT(!end_error); 7618. #572 sql/item.cc:135: error: Uninitialized Value `l_time1.day` is read without initialization during the call to `time_to_datetime_with_warn()`. 133. if (ltime.time_type != MYSQL_TIMESTAMP_TIME) 134. return pack_time(<ime); 135. if ((null_value= time_to_datetime_with_warn(thd, <ime, &tmp, ^ 136. TIME_CONV_NONE))) 137. return 0; #573 sql/item.cc:255: error: Uninitialized Value `this.m_error` is read without initialization during the call to `Value_source::Converter_strtoll10_with_warn::Converter_strtoll10_with_warn()`. 253. return 0; 254. } 255. Converter_strtoll10_with_warn cnv(NULL, Warn_filter_all(), ^ 256. res->charset(), res->ptr(), res->length()); 257. *error= cnv.error(); #574 sql/item.cc:1453: error: Uninitialized Value `conv_errors` is read without initialization. 1451. collation.repertoire)); 1452. 1453. if (unlikely(!conv || (conv_errors && lossless))) ^ 1454. { 1455. /* #575 sql/item.cc:6216: error: Dead Store The value written to `&from_field` is never used. 6214. { 6215. DBUG_ASSERT(fixed() == 0); 6216. Field *from_field= (Field *)not_found_field; ^ 6217. bool outer_fixed= false; 6218. SELECT_LEX *select; #576 sql/item.cc:8081: error: Unnecessary Copy Intermediate variable `sel->grouping_tmp_fields` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 8079. { 8080. st_select_lex *sel= (st_select_lex *)arg; 8081. Field_pair *gr_field= find_matching_field_pair(this, sel->grouping_tmp_fields); ^ 8082. if (gr_field) 8083. { #577 sql/item.cc:8107: error: Unnecessary Copy Intermediate variable `sel->grouping_tmp_fields` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 8105. st_select_lex *sel= (st_select_lex *)arg; 8106. Field_pair *gr_field= find_matching_field_pair(this, 8107. sel->grouping_tmp_fields); ^ 8108. return gr_field->corresponding_item->build_clone(thd); 8109. } #578 sql/item.cc:8391: error: Dead Store The value written to `&select` is never used. 8389. { 8390. outer_context= outer_context->outer_context; 8391. select= outer_context->select_lex; ^ 8392. prev_subselect_item= 8393. last_checked_context->select_lex->master_unit()->item; #579 sql/item.cc:10565: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 10563. Item *Item_cache_datetime::make_literal(THD *thd) 10564. { 10565. Datetime dt(thd, this, TIME_CONV_NONE | TIME_FRAC_NONE); ^ 10566. return new (thd->mem_root) Item_datetime_literal(thd, &dt, decimals); 10567. } #580 sql/item.cc:10565: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 10563. Item *Item_cache_datetime::make_literal(THD *thd) 10564. { 10565. Datetime dt(thd, this, TIME_CONV_NONE | TIME_FRAC_NONE); ^ 10566. return new (thd->mem_root) Item_datetime_literal(thd, &dt, decimals); 10567. } #581 sql/item.cc:10571: error: Uninitialized Value `from.neg` is read without initialization during the call to `Date::Date()`. 10569. Item *Item_cache_date::make_literal(THD *thd) 10570. { 10571. Date d(thd, this, TIME_CONV_NONE | TIME_FRAC_NONE); ^ 10572. return new (thd->mem_root) Item_date_literal(thd, &d); 10573. } #582 sql/item.cc:10577: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 10575. Item *Item_cache_time::make_literal(THD *thd) 10576. { 10577. Time t(thd, this); ^ 10578. return new (thd->mem_root) Item_time_literal(thd, &t, decimals); 10579. } #583 sql/item.cc:10607: error: Uninitialized Value `__param_0.year` is read without initialization during the call to `Datetime::Datetime()`. 10605. { 10606. null_value= true; 10607. return Datetime(); ^ 10608. } 10609. return m_native.to_datetime(thd); #584 sql/item.h:2109: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 2107. virtual longlong val_datetime_packed(THD *thd) 2108. { 2109. return Datetime(thd, this, Datetime::Options_cmp(thd)).to_packed(); ^ 2110. } 2111. // Get a TIME value in numeric packed format for comparison #585 sql/item.h:2109: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 2107. virtual longlong val_datetime_packed(THD *thd) 2108. { 2109. return Datetime(thd, this, Datetime::Options_cmp(thd)).to_packed(); ^ 2110. } 2111. // Get a TIME value in numeric packed format for comparison #586 sql/item.h:2114: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 2112. virtual longlong val_time_packed(THD *thd) 2113. { 2114. return Time(thd, this, Time::Options_cmp(thd)).to_packed(); ^ 2115. } 2116. longlong val_datetime_packed_result(THD *thd); #587 sql/item.h:2114: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 2112. virtual longlong val_time_packed(THD *thd) 2113. { 2114. return Time(thd, this, Time::Options_cmp(thd)).to_packed(); ^ 2115. } 2116. longlong val_datetime_packed_result(THD *thd); #588 sql/item.h:5384: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 5382. bool val_native(THD *thd, Native *to) override 5383. { 5384. return Time(thd, this).to_native(to, decimals); ^ 5385. } 5386. Item *do_get_copy(THD *thd) const override #589 sql/item.h:7587: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 7585. { 7586. Datetime::Options_cmp opt(thd); 7587. return has_value() ? Datetime(thd, this, opt).to_packed() : 0; ^ 7588. } 7589. longlong val_time_packed(THD *) override #590 sql/item.h:7587: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 7585. { 7586. Datetime::Options_cmp opt(thd); 7587. return has_value() ? Datetime(thd, this, opt).to_packed() : 0; ^ 7588. } 7589. longlong val_time_packed(THD *) override #591 sql/item.h:7595: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 7593. longlong val_int() override 7594. { 7595. return has_value() ? Time(this).to_longlong() : 0; ^ 7596. } 7597. double val_real() override #592 sql/item.h:7595: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 7593. longlong val_int() override 7594. { 7595. return has_value() ? Time(this).to_longlong() : 0; ^ 7596. } 7597. double val_real() override #593 sql/item.h:7599: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 7597. double val_real() override 7598. { 7599. return has_value() ? Time(this).to_double() : 0; ^ 7600. } 7601. String *val_str(String *to) override #594 sql/item.h:7599: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 7597. double val_real() override 7598. { 7599. return has_value() ? Time(this).to_double() : 0; ^ 7600. } 7601. String *val_str(String *to) override #595 sql/item.h:7603: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 7601. String *val_str(String *to) override 7602. { 7603. return has_value() ? Time(this).to_string(to, decimals) : NULL; ^ 7604. } 7605. my_decimal *val_decimal(my_decimal *to) override #596 sql/item.h:7603: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 7601. String *val_str(String *to) override 7602. { 7603. return has_value() ? Time(this).to_string(to, decimals) : NULL; ^ 7604. } 7605. my_decimal *val_decimal(my_decimal *to) override #597 sql/item.h:7607: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 7605. my_decimal *val_decimal(my_decimal *to) override 7606. { 7607. return has_value() ? Time(this).to_decimal(to) : NULL; ^ 7608. } 7609. bool val_native(THD *thd, Native *to) override #598 sql/item.h:7607: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 7605. my_decimal *val_decimal(my_decimal *to) override 7606. { 7607. return has_value() ? Time(this).to_decimal(to) : NULL; ^ 7608. } 7609. bool val_native(THD *thd, Native *to) override #599 sql/item.h:7611: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 7609. bool val_native(THD *thd, Native *to) override 7610. { 7611. return has_value() ? Time(thd, this).to_native(to, decimals) : true; ^ 7612. } 7613. }; #600 sql/item.h:7630: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 7628. longlong val_time_packed(THD *thd) override 7629. { 7630. return Time(thd, this, Time::Options_cmp(thd)).to_packed(); ^ 7631. } 7632. longlong val_int() override #601 sql/item.h:7630: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 7628. longlong val_time_packed(THD *thd) override 7629. { 7630. return Time(thd, this, Time::Options_cmp(thd)).to_packed(); ^ 7631. } 7632. longlong val_int() override #602 sql/item.h:7665: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 7663. longlong val_time_packed(THD *thd) override 7664. { 7665. return Time(thd, this, Time::Options_cmp(thd)).to_packed(); ^ 7666. } 7667. longlong val_int() override #603 sql/item.h:7665: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 7663. longlong val_time_packed(THD *thd) override 7664. { 7665. return Time(thd, this, Time::Options_cmp(thd)).to_packed(); ^ 7666. } 7667. longlong val_int() override #604 sql/item_cmpfunc.cc:338: error: Uninitialized Value `orig_field_val` is read without initialization. 336. Use_relaxed_field_copy urfc(thd); 337. MY_BITMAP *old_maps[2] = { NULL, NULL }; 338. ulonglong UNINIT_VAR(orig_field_val); /* original field value if valid */ ^ 339. bool save_field_value; 340. #605 sql/item_cmpfunc.cc:547: error: Null Dereference `Item::addr()` could be null (from the call to `Item::addr()` on line 547) and is dereferenced in the call to `Arg_comparator::set_cmp_func()`. 545. return true; 546. } 547. if (comparators[i].set_cmp_func(thd, owner, (*a)->addr(i), ^ 548. (*b)->addr(i), set_null)) 549. return true; #606 sql/item_cmpfunc.cc:2509: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 2507. for (uint i= 0; i < 2; i++) 2508. { 2509. Datetime_truncation_not_needed dt(thd, args[i], ^ 2510. fuzzydate & ~TIME_FUZZY_DATES); 2511. if (!(dt.copy_to_mysql_time(ltime, mysql_timestamp_type()))) #607 sql/item_cmpfunc.cc:2509: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 2507. for (uint i= 0; i < 2; i++) 2508. { 2509. Datetime_truncation_not_needed dt(thd, args[i], ^ 2510. fuzzydate & ~TIME_FUZZY_DATES); 2511. if (!(dt.copy_to_mysql_time(ltime, mysql_timestamp_type()))) #608 sql/item_cmpfunc.cc:2523: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 2521. for (uint i= 0; i < 2; i++) 2522. { 2523. if (!Time(thd, args[i]).copy_to_mysql_time(ltime)) ^ 2524. return (null_value= false); 2525. } #609 sql/item_cmpfunc.cc:3011: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 3009. if (!compare()) 3010. return (null_value= true); 3011. Datetime_truncation_not_needed dt(thd, args[2], fuzzydate); ^ 3012. return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type())); 3013. } #610 sql/item_cmpfunc.cc:3011: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 3009. if (!compare()) 3010. return (null_value= true); 3011. Datetime_truncation_not_needed dt(thd, args[2], fuzzydate); ^ 3012. return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type())); 3013. } #611 sql/item_cmpfunc.cc:3022: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 3020. if (!compare()) 3021. return (null_value= true); 3022. return (null_value= Time(thd, args[2]).copy_to_mysql_time(ltime)); ^ 3023. 3024. } #612 sql/item_cmpfunc.cc:3196: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 3194. if (!item) 3195. return (null_value= true); 3196. Datetime_truncation_not_needed dt(thd, item, fuzzydate); ^ 3197. return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type())); 3198. } #613 sql/item_cmpfunc.cc:3196: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 3194. if (!item) 3195. return (null_value= true); 3196. Datetime_truncation_not_needed dt(thd, item, fuzzydate); ^ 3197. return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type())); 3198. } #614 sql/item_cmpfunc.cc:3207: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 3205. if (!item) 3206. return (null_value= true); 3207. return (null_value= Time(thd, item).copy_to_mysql_time(ltime)); ^ 3208. } 3209. #615 sql/item_cmpfunc.cc:3567: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 3565. for (uint i= 0; i < arg_count; i++) 3566. { 3567. Datetime_truncation_not_needed dt(thd, args[i], ^ 3568. fuzzydate & ~TIME_FUZZY_DATES); 3569. if (!dt.copy_to_mysql_time(ltime, mysql_timestamp_type())) #616 sql/item_cmpfunc.cc:3567: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 3565. for (uint i= 0; i < arg_count; i++) 3566. { 3567. Datetime_truncation_not_needed dt(thd, args[i], ^ 3568. fuzzydate & ~TIME_FUZZY_DATES); 3569. if (!dt.copy_to_mysql_time(ltime, mysql_timestamp_type())) #617 sql/item_cmpfunc.cc:3581: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 3579. for (uint i= 0; i < arg_count; i++) 3580. { 3581. if (!Time(thd, args[i]).copy_to_mysql_time(ltime)) ^ 3582. return (null_value= false); 3583. } #618 sql/item_cmpfunc.h:1289: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 1287. bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override 1288. { 1289. Datetime_truncation_not_needed dt(thd, find_item(), fuzzydate); ^ 1290. return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type())); 1291. } #619 sql/item_cmpfunc.h:1289: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime_truncation_not_needed::Datetime_truncation_not_needed()`. 1287. bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override 1288. { 1289. Datetime_truncation_not_needed dt(thd, find_item(), fuzzydate); ^ 1290. return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type())); 1291. } #620 sql/item_cmpfunc.h:1294: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 1292. bool time_op(THD *thd, MYSQL_TIME *ltime) override 1293. { 1294. return (null_value= Time(find_item()).copy_to_mysql_time(ltime)); ^ 1295. } 1296. longlong int_op() override #621 sql/item_cmpfunc.h:1294: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 1292. bool time_op(THD *thd, MYSQL_TIME *ltime) override 1293. { 1294. return (null_value= Time(find_item()).copy_to_mysql_time(ltime)); ^ 1295. } 1296. longlong int_op() override #622 sql/item_create.cc:5886: error: Static Initialization Order Fiasco Initializer of func_array accesses global variable from a different translation unit: Create_func_to_char::s_singleton|. 5884. */ 5885. 5886. const Native_func_registry func_array[] = ^ 5887. { 5888. { { STRING_WITH_LEN("ABS") }, BUILDER(Create_func_abs)}, #623 sql/item_func.cc:2934: error: Uninitialized Value `min_max` is read without initialization. 2932. date_mode_t fuzzydate) 2933. { 2934. longlong UNINIT_VAR(min_max); ^ 2935. DBUG_ASSERT(fixed()); 2936. #624 sql/item_func.cc:2984: error: Uninitialized Value `res` is read without initialization. 2982. String *Item_func_min_max::val_str_native(String *str) 2983. { 2984. String *UNINIT_VAR(res); ^ 2985. for (uint i=0; i < arg_count ; i++) 2986. { #625 sql/item_func.cc:3075: error: Uninitialized Value `res` is read without initialization. 3073. { 3074. DBUG_ASSERT(fixed()); 3075. my_decimal tmp_buf, *tmp, *UNINIT_VAR(res); ^ 3076. 3077. for (uint i=0; i < arg_count ; i++) #626 sql/item_func.cc:3893: error: Uninitialized Value `tmp_null_value` is read without initialization. 3891. 3892. res= udf.val_decimal(&tmp_null_value, dec_buf); 3893. null_value= tmp_null_value; ^ 3894. DBUG_RETURN(res); 3895. } #627 sql/item_func.cc:6291: error: Uninitialized Value `item` is read without initialization. 6289. { 6290. DBUG_ASSERT(fixed() == 0); 6291. Item *UNINIT_VAR(item); // Safe as arg_count is > 1 ^ 6292. 6293. status_var_increment(thd->status_var.feature_fulltext); #628 sql/item_func.cc:6881: error: Dead Store The value written to `&res` is never used. 6879. the used stored procedure has SQL SECURITY DEFINER. 6880. */ 6881. res= sp_check_access(thd); ^ 6882. #ifndef NO_EMBEDDED_ACCESS_CHECKS 6883. /* #629 sql/item_func.h:691: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 689. double val_real(Item_handled_func *item) const override 690. { 691. return Time(item).to_double(); ^ 692. } 693. longlong val_int(Item_handled_func *item) const override #630 sql/item_func.h:691: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 689. double val_real(Item_handled_func *item) const override 690. { 691. return Time(item).to_double(); ^ 692. } 693. longlong val_int(Item_handled_func *item) const override #631 sql/item_func.h:695: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 693. longlong val_int(Item_handled_func *item) const override 694. { 695. return Time(item).to_longlong(); ^ 696. } 697. my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override #632 sql/item_func.h:695: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 693. longlong val_int(Item_handled_func *item) const override 694. { 695. return Time(item).to_longlong(); ^ 696. } 697. my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override #633 sql/item_func.h:699: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 697. my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override 698. { 699. return Time(item).to_decimal(to); ^ 700. } 701. String *val_str_ascii(Item_handled_func *item, String *to) const override #634 sql/item_func.h:699: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 697. my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override 698. { 699. return Time(item).to_decimal(to); ^ 700. } 701. String *val_str_ascii(Item_handled_func *item, String *to) const override #635 sql/item_func.h:703: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 701. String *val_str_ascii(Item_handled_func *item, String *to) const override 702. { 703. return Time(item).to_string(to, item->decimals); ^ 704. } 705. bool val_native(THD *thd, Item_handled_func *item, Native *to) const override #636 sql/item_func.h:703: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 701. String *val_str_ascii(Item_handled_func *item, String *to) const override 702. { 703. return Time(item).to_string(to, item->decimals); ^ 704. } 705. bool val_native(THD *thd, Item_handled_func *item, Native *to) const override #637 sql/item_func.h:707: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 705. bool val_native(THD *thd, Item_handled_func *item, Native *to) const override 706. { 707. return Time(thd, item).to_native(to, item->decimals); ^ 708. } 709. }; #638 sql/item_geofunc.cc:164: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `Geometry::create_from_json()`. 162. (const uchar *) js->end()); 163. 164. if ((null_value= !Geometry::create_from_json(&buffer, &je, options==1, str))) ^ 165. { 166. int code= 0; #639 sql/item_geofunc.cc:1289: error: Uninitialized Value `shape_a` is read without initialization. 1287. { 1288. int do_store_shapes=1; 1289. uint UNINIT_VAR(shape_a), UNINIT_VAR(shape_b); ^ 1290. uint n_operands= 0; 1291. int last_shape_pos; #640 sql/item_geofunc.cc:1289: error: Uninitialized Value `shape_b` is read without initialization. 1287. { 1288. int do_store_shapes=1; 1289. uint UNINIT_VAR(shape_a), UNINIT_VAR(shape_b); ^ 1290. uint n_operands= 0; 1291. int last_shape_pos; #641 sql/item_geofunc.cc:2676: error: Uninitialized Value `px` is read without initialization. 2674. MBR mbr; 2675. const char *c_end; 2676. double UNINIT_VAR(px), UNINIT_VAR(py), x0, UNINIT_VAR(y0); ^ 2677. String *result= 0; 2678. const Gcalc_scan_iterator::point *pprev= NULL; #642 sql/item_geofunc.cc:2676: error: Uninitialized Value `py` is read without initialization. 2674. MBR mbr; 2675. const char *c_end; 2676. double UNINIT_VAR(px), UNINIT_VAR(py), x0, UNINIT_VAR(y0); ^ 2677. String *result= 0; 2678. const Gcalc_scan_iterator::point *pprev= NULL; #643 sql/item_geofunc.cc:2676: error: Uninitialized Value `y0` is read without initialization. 2674. MBR mbr; 2675. const char *c_end; 2676. double UNINIT_VAR(px), UNINIT_VAR(py), x0, UNINIT_VAR(y0); ^ 2677. String *result= 0; 2678. const Gcalc_scan_iterator::point *pprev= NULL; #644 sql/item_jsonfunc.cc:255: error: Dead Store The value written to `&curr_state` is never used. 253. int first_value= 1; 254. int value_size = 0; 255. int curr_state= -1; ^ 256. int64_t value_len= 0; 257. String curr_str{}; #645 sql/item_jsonfunc.cc:577: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 575. 576. path.cur_step= path.p.steps; 577. if (json_find_path(&je, &path.p, &path.cur_step, array_counters)) ^ 578. { 579. if (je.s.error) #646 sql/item_jsonfunc.cc:638: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 636. cur_step= p.steps; 637. continue_search: 638. if (json_find_path(&je, &p, &cur_step, array_counters)) ^ 639. return true; 640. #647 sql/item_jsonfunc.cc:641: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 639. return true; 640. 641. if (json_read_value(&je)) ^ 642. return true; 643. #648 sql/item_jsonfunc.cc:787: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `Item_func_json_unquote::read_json()`. 785. String *js; 786. 787. if (!(js= read_json(&je))) ^ 788. return NULL; 789. #649 sql/item_jsonfunc.cc:984: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_get_path_next()`. 982. (const uchar *) js->ptr() + js->length(), &p); 983. 984. while (json_get_path_next(&je, &p) == 0) ^ 985. { 986. if (!(count_path= path_exact(paths, arg_count-1, &p, je.value_type))) #650 sql/item_jsonfunc.cc:1247: error: Uninitialized Value `js.c_next` is read without initialization during the call to `find_key_in_object()`. 1245. 1246. json_string_set_str(&key_name, k_start, k_end); 1247. if (!find_key_in_object(js, &key_name) || ^ 1248. json_read_value(js) || 1249. !check_contains(js, value)) #651 sql/item_jsonfunc.cc:1388: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 1386. 1387. path.cur_step= path.p.steps; 1388. if (json_find_path(&je, &path.p, &path.cur_step, array_counters)) ^ 1389. { 1390. if (je.s.error) #652 sql/item_jsonfunc.cc:1403: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 1401. (const uchar *) val->end()); 1402. 1403. if (json_read_value(&je) || json_read_value(&ve)) ^ 1404. goto error; 1405. #653 sql/item_jsonfunc.cc:1403: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 1401. (const uchar *) val->end()); 1402. 1403. if (json_read_value(&je) || json_read_value(&ve)) ^ 1404. goto error; 1405. #654 sql/item_jsonfunc.cc:1608: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_get_path_next()`. 1606. 1607. result= 0; 1608. while (json_get_path_next(&je, &p) == 0) ^ 1609. { 1610. int n_path= arg_count - 2; #655 sql/item_jsonfunc.cc:1921: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 1919. c_path->cur_step= c_path->p.steps; 1920. 1921. if (json_find_path(&je, &c_path->p, &c_path->cur_step, array_counters)) ^ 1922. { 1923. if (je.s.error) #656 sql/item_jsonfunc.cc:1929: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 1927. } 1928. 1929. if (json_read_value(&je)) ^ 1930. goto js_error; 1931. #657 sql/item_jsonfunc.cc:2061: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 2059. c_path->cur_step= c_path->p.steps; 2060. 2061. if (json_find_path(&je, &c_path->p, &c_path->cur_step, array_counters)) ^ 2062. { 2063. if (je.s.error) #658 sql/item_jsonfunc.cc:2070: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 2068. } 2069. 2070. if (json_read_value(&je)) ^ 2071. goto js_error; 2072. #659 sql/item_jsonfunc.cc:2437: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `do_merge()`. 2435. je2.killed_ptr= (uchar*)&thd->killed; 2436. 2437. if (do_merge(str, &je1, &je2)) ^ 2438. goto error_return; 2439. #660 sql/item_jsonfunc.cc:2467: error: Uninitialized Value `_.s.error` is read without initialization. 2465. if (je1.s.error) 2466. report_json_error(js1, &je1, 0); 2467. if (je2.s.error) ^ 2468. report_json_error(js2, &je2, n_arg); 2469. thd->check_killed(); // to get the error message right #661 sql/item_jsonfunc.cc:2745: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 2743. if (merge_to_null) 2744. { 2745. if (json_read_value(&je2)) ^ 2746. goto error_return; 2747. if (je2.value_type == JSON_VALUE_OBJECT) #662 sql/item_jsonfunc.cc:2763: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `do_merge_patch()`. 2761. je1.killed_ptr= (uchar*)&thd->killed; 2762. 2763. if (do_merge_patch(str, &je1, &je2, &empty_result)) ^ 2764. goto error_return; 2765. #663 sql/item_jsonfunc.cc:2852: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 2850. 2851. path.cur_step= path.p.steps; 2852. if (json_find_path(&je, &path.p, &path.cur_step, array_counters)) ^ 2853. { 2854. if (je.s.error) #664 sql/item_jsonfunc.cc:2861: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 2859. 2860. 2861. if (json_read_value(&je)) ^ 2862. goto err_return; 2863. #665 sql/item_jsonfunc.cc:2944: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_scan_next()`. 2942. break; 2943. } 2944. } while (json_scan_next(&je) == 0); ^ 2945. 2946. if (likely(!je.s.error)) #666 sql/item_jsonfunc.cc:2977: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 2975. (const uchar *) js->ptr() + js->length()); 2976. 2977. if (json_read_value(&je)) ^ 2978. goto error; 2979. #667 sql/item_jsonfunc.cc:3099: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 3097. 3098. if (c_path->p.last_step >= c_path->p.steps && 3099. json_find_path(&je, &c_path->p, &c_path->cur_step, array_counters)) ^ 3100. { 3101. if (je.s.error) #668 sql/item_jsonfunc.cc:3106: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 3104. } 3105. 3106. if (json_read_value(&je)) ^ 3107. goto js_error; 3108. #669 sql/item_jsonfunc.cc:3204: error: Uninitialized Value `js.c_next` is read without initialization during the call to `json_key_matches()`. 3202. case JST_KEY: 3203. json_string_set_str(&key_name, lp->key, lp->key_end); 3204. if (json_key_matches(&je, &key_name)) ^ 3205. goto v_found; 3206. n_key++; #670 sql/item_jsonfunc.cc:3240: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 3238. continue; 3239. 3240. if (json_read_value(&je)) ^ 3241. goto js_error; 3242. #671 sql/item_jsonfunc.cc:3356: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 3354. c_path->cur_step= c_path->p.steps; 3355. 3356. if (json_find_path(&je, &c_path->p, &c_path->cur_step, array_counters)) ^ 3357. { 3358. if (je.s.error) #672 sql/item_jsonfunc.cc:3363: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 3361. } 3362. 3363. if (json_read_value(&je)) ^ 3364. goto js_error; 3365. #673 sql/item_jsonfunc.cc:3410: error: Uninitialized Value `js.c_next` is read without initialization during the call to `json_key_matches()`. 3408. rem_start= (const char *) (je.s.c_str - je.sav_c_len); 3409. json_string_set_str(&key_name, lp->key, lp->key_end); 3410. if (json_key_matches(&je, &key_name)) ^ 3411. goto v_found; 3412. #674 sql/item_jsonfunc.cc:3558: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 3556. path.cur_step= path.p.steps; 3557. 3558. if (json_find_path(&je, &path.p, &path.cur_step, array_counters)) ^ 3559. { 3560. if (je.s.error) #675 sql/item_jsonfunc.cc:3567: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 3565. 3566. skip_search: 3567. if (json_read_value(&je)) ^ 3568. goto err_return; 3569. #676 sql/item_jsonfunc.cc:3769: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_get_path_next()`. 3767. (const uchar *) js->ptr() + js->length(), &p); 3768. 3769. while (json_get_path_next(&je, &p) == 0) ^ 3770. { 3771. if (json_value_scalar(&je)) #677 sql/item_jsonfunc.cc:3930: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 3928. json_scan_start(&je, js->charset(), (const uchar *) js->ptr(), 3929. (const uchar *) js->ptr()+js->length()); 3930. if (json_read_value(&je)) ^ 3931. goto error; 3932. if (je.value_type == JSON_VALUE_STRING) #678 sql/item_strfunc.cc:1967: error: Dead Store The value written to `&remove_length` is never used. 1965. String tmp(buff,sizeof(buff),system_charset_info); 1966. String *res, *remove_str; 1967. uint UNINIT_VAR(remove_length); ^ 1968. 1969. res= args[0]->val_str(str); #679 sql/item_strfunc.cc:1967: error: Uninitialized Value `remove_length` is read without initialization. 1965. String tmp(buff,sizeof(buff),system_charset_info); 1966. String *res, *remove_str; 1967. uint UNINIT_VAR(remove_length); ^ 1968. 1969. res= args[0]->val_str(str); #680 sql/item_strfunc.cc:2012: error: Dead Store The value written to `&remove_length` is never used. 2010. String tmp(buff, sizeof(buff), system_charset_info); 2011. String *res, *remove_str; 2012. uint UNINIT_VAR(remove_length); ^ 2013. 2014. res= args[0]->val_str(str); #681 sql/item_strfunc.cc:2012: error: Uninitialized Value `remove_length` is read without initialization. 2010. String tmp(buff, sizeof(buff), system_charset_info); 2011. String *res, *remove_str; 2012. uint UNINIT_VAR(remove_length); ^ 2013. 2014. res= args[0]->val_str(str); #682 sql/item_strfunc.cc:2092: error: Dead Store The value written to `&remove_length` is never used. 2090. String tmp(buff, sizeof(buff), system_charset_info); 2091. String *res, *remove_str; 2092. uint UNINIT_VAR(remove_length); ^ 2093. 2094. res= args[0]->val_str(str); #683 sql/item_strfunc.cc:2092: error: Uninitialized Value `remove_length` is read without initialization. 2090. String tmp(buff, sizeof(buff), system_charset_info); 2091. String *res, *remove_str; 2092. uint UNINIT_VAR(remove_length); ^ 2093. 2094. res= args[0]->val_str(str); #684 sql/item_strfunc.cc:4784: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mariadb_dyncol_json()` on line 4784 is not freed after the last access at line 4784, column 7. 4782. col.str= (char *)res->ptr(); 4783. col.length= res->length(); 4784. if ((rc= mariadb_dyncol_json(&col, &json))) ^ 4785. { 4786. dynamic_column_error_message(rc); #685 sql/item_subselect.cc:4312: error: Null Dereference `in_subs` could be null (from the call to `Item::get_IN_subquery()` on line 4311) and is dereferenced. 4310. table->status= 0; 4311. Item_in_subselect *in_subs= item->get_IN_subquery(); 4312. Subq_materialization_tracker *tracker= in_subs->get_materialization_tracker(); ^ 4313. DBUG_ASSERT(in_subs); 4314. DBUG_ASSERT(thd); #686 sql/item_subselect.cc:4478: error: Null Dereference `in_subs` could be null (from the call to `Item::get_IN_subquery()` on line 4475) and is dereferenced. 4476. DBUG_ASSERT(thd); 4477. 4478. in_subs->value= 0; ^ 4479. empty_result_set= TRUE; 4480. table->status= 0; #687 sql/item_subselect.cc:4931: error: Null Dereference `item_in` could be null (from the call to `Item::get_IN_subquery()` on line 4929) and is dereferenced. 4929. Item_in_subselect *item_in= item->get_IN_subquery(); 4930. 4931. if (item_in->is_top_level_item()) ^ 4932. return COMPLETE_MATCH; 4933. else #688 sql/item_subselect.cc:5392: error: Null Dereference `item_in` could be null (from the call to `Item::get_IN_subquery()` on line 5391) and is dereferenced. 5390. { 5391. Item_in_subselect *item_in= item->get_IN_subquery(); 5392. Item_iterator_row it(item_in->left_expr); ^ 5393. /* The only index on the temporary table. */ 5394. KEY *tmp_key= tmp_table->key_info; #689 sql/item_subselect.cc:5462: error: Null Dereference `Item::get_IN_subquery()` could be null (from the call to `Item::get_IN_subquery()` on line 5462) and is dereferenced. 5460. related engines are created and chosen for each execution. 5461. */ 5462. item->get_IN_subquery()->engine= materialize_engine; ^ 5463. if (lookup_engine_type == SINGLE_COLUMN_ENGINE || 5464. lookup_engine_type == TABLE_SCAN_ENGINE || #690 sql/item_subselect.cc:6360: error: Null Dereference `item_in` could be null (from the call to `Item::get_IN_subquery()` on line 6353) and is dereferenced. 6358. item_in->is_top_level_item())); 6359. 6360. Subq_materialization_tracker *tracker= item_in->get_materialization_tracker(); ^ 6361. tracker->increment_loops_count(); 6362. #691 sql/item_subselect.cc:7033: error: Dead Store The value written to `&error` is never used. 7031. else 7032. { 7033. error= report_error(tmp_table, error); ^ 7034. break; 7035. } #692 sql/item_subselect.h:1464: error: Null Dereference `Item::get_IN_subquery()` could be null (from the call to `Item::get_IN_subquery()` on line 1464) and is dereferenced. 1462. correctly. 1463. */ 1464. return !(item->get_IN_subquery()->null_value); ^ 1465. } 1466. void print(String*, enum_query_type) override; #693 sql/item_sum.cc:2330: error: Dead Store The value written to `&nr` is never used. 2328. uchar *res= result_field->ptr; 2329. 2330. nr= args[0]->val_real(); /* sets null_value as side-effect */ ^ 2331. 2332. if (args[0]->null_value) #694 sql/item_sum.cc:2535: error: Uninitialized Value `tmp_item` is read without initialization. 2533. bool Item_sum_min::add() 2534. { 2535. Item *UNINIT_VAR(tmp_item); ^ 2536. DBUG_ENTER("Item_sum_min::add"); 2537. DBUG_PRINT("enter", ("this: %p", this)); #695 sql/item_sum.cc:2575: error: Uninitialized Value `tmp_item` is read without initialization. 2573. bool Item_sum_max::add() 2574. { 2575. Item * UNINIT_VAR(tmp_item); ^ 2576. DBUG_ENTER("Item_sum_max::add"); 2577. DBUG_PRINT("enter", ("this: %p", this)); #696 sql/item_sum.cc:2761: error: Uninitialized Value `tmp_item` is read without initialization. 2759. void Item_sum_min_max::reset_field() 2760. { 2761. Item *UNINIT_VAR(tmp_item), *arg0; ^ 2762. DBUG_ENTER("Item_sum_min_max::reset_field"); 2763. #697 sql/item_sum.cc:3103: error: Uninitialized Value `tmp_item` is read without initialization. 3101. { 3102. DBUG_ENTER("Item_sum_min_max::update_field"); 3103. Item *UNINIT_VAR(tmp_item); ^ 3104. if (unlikely(direct_added)) 3105. { #698 sql/item_sum.cc:3450: error: Uninitialized Value `tmp_null_value` is read without initialization. 3448. 3449. res= udf.val_decimal(&tmp_null_value, dec_buf); 3450. null_value= tmp_null_value; ^ 3451. DBUG_RETURN(res); 3452. } #699 sql/item_timefunc.cc:141: error: Uninitialized Value `sunday_first_n_first_week_non_iso` is read without initialization. 139. int frac_part; 140. bool usa_time= 0; 141. bool UNINIT_VAR(sunday_first_n_first_week_non_iso); ^ 142. bool UNINIT_VAR(strict_week_number); 143. bool UNINIT_VAR(strict_week_number_year_type); #700 sql/item_timefunc.cc:142: error: Uninitialized Value `strict_week_number` is read without initialization. 140. bool usa_time= 0; 141. bool UNINIT_VAR(sunday_first_n_first_week_non_iso); 142. bool UNINIT_VAR(strict_week_number); ^ 143. bool UNINIT_VAR(strict_week_number_year_type); 144. const char *val_begin= val; #701 sql/item_timefunc.cc:143: error: Uninitialized Value `strict_week_number_year_type` is read without initialization. 141. bool UNINIT_VAR(sunday_first_n_first_week_non_iso); 142. bool UNINIT_VAR(strict_week_number); 143. bool UNINIT_VAR(strict_week_number_year_type); ^ 144. const char *val_begin= val; 145. const char *val_end= val + length; #702 sql/item_timefunc.cc:816: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 814. DBUG_ASSERT(fixed()); 815. THD *thd= current_thd; 816. Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 817. return (null_value= !d.is_valid_datetime()) ? 0 : d.daynr(); 818. } #703 sql/item_timefunc.cc:816: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 814. DBUG_ASSERT(fixed()); 815. THD *thd= current_thd; 816. Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 817. return (null_value= !d.is_valid_datetime()) ? 0 : d.daynr(); 818. } #704 sql/item_timefunc.cc:826: error: Uninitialized Value `l_time2.time_type` is read without initialization during the call to `Datetime_from_temporal::Datetime_from_temporal()`. 824. DBUG_ASSERT(fixed()); 825. // val_int_endpoint() is called only if args[0] is a temporal Item_field 826. Datetime_from_temporal dt(current_thd, args[0], TIME_FUZZY_DATES); ^ 827. if ((null_value= !dt.is_valid_datetime())) 828. { #705 sql/item_timefunc.cc:826: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime_from_temporal::Datetime_from_temporal()`. 824. DBUG_ASSERT(fixed()); 825. // val_int_endpoint() is called only if args[0] is a temporal Item_field 826. Datetime_from_temporal dt(current_thd, args[0], TIME_FUZZY_DATES); ^ 827. if ((null_value= !dt.is_valid_datetime())) 828. { #706 sql/item_timefunc.cc:848: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 846. The argument can be of a non-temporal data type. 847. */ 848. Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 849. return (null_value= !dt.is_valid_datetime()) ? 0 : dt.to_seconds(); 850. } #707 sql/item_timefunc.cc:848: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 846. The argument can be of a non-temporal data type. 847. */ 848. Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 849. return (null_value= !dt.is_valid_datetime()) ? 0 : dt.to_seconds(); 850. } #708 sql/item_timefunc.cc:894: error: Uninitialized Value `l_time2.time_type` is read without initialization during the call to `Datetime_from_temporal::Datetime_from_temporal()`. 892. DBUG_ASSERT(fixed()); 893. // val_int_endpoint() is only called if args[0] is a temporal Item_field 894. Datetime_from_temporal dt(current_thd, args[0], TIME_CONV_NONE); ^ 895. longlong res; 896. if ((null_value= !dt.is_valid_datetime())) #709 sql/item_timefunc.cc:894: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime_from_temporal::Datetime_from_temporal()`. 892. DBUG_ASSERT(fixed()); 893. // val_int_endpoint() is only called if args[0] is a temporal Item_field 894. Datetime_from_temporal dt(current_thd, args[0], TIME_CONV_NONE); ^ 895. longlong res; 896. if ((null_value= !dt.is_valid_datetime())) #710 sql/item_timefunc.cc:948: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 946. DBUG_ASSERT(fixed()); 947. THD *thd= current_thd; 948. Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 949. return (null_value= !d.is_valid_datetime()) ? 0 : d.dayofyear(); 950. } #711 sql/item_timefunc.cc:948: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 946. DBUG_ASSERT(fixed()); 947. THD *thd= current_thd; 948. Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 949. return (null_value= !d.is_valid_datetime()) ? 0 : d.dayofyear(); 950. } #712 sql/item_timefunc.cc:956: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 954. DBUG_ASSERT(fixed()); 955. THD *thd= current_thd; 956. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 957. return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->day; 958. } #713 sql/item_timefunc.cc:956: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 954. DBUG_ASSERT(fixed()); 955. THD *thd= current_thd; 956. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 957. return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->day; 958. } #714 sql/item_timefunc.cc:964: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 962. DBUG_ASSERT(fixed()); 963. THD *thd= current_thd; 964. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 965. return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->month; 966. } #715 sql/item_timefunc.cc:964: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 962. DBUG_ASSERT(fixed()); 963. THD *thd= current_thd; 964. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 965. return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->month; 966. } #716 sql/item_timefunc.cc:988: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 986. uint err; 987. THD *thd= current_thd; 988. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 989. if ((null_value= (!d.is_valid_datetime() || !d.get_mysql_time()->month))) 990. return (String *) 0; #717 sql/item_timefunc.cc:988: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 986. uint err; 987. THD *thd= current_thd; 988. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 989. if ((null_value= (!d.is_valid_datetime() || !d.get_mysql_time()->month))) 990. return (String *) 0; #718 sql/item_timefunc.cc:1007: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1005. DBUG_ASSERT(fixed()); 1006. THD *thd= current_thd; 1007. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 1008. return (null_value= !d.is_valid_datetime()) ? 0 : d.quarter(); 1009. } #719 sql/item_timefunc.cc:1007: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1005. DBUG_ASSERT(fixed()); 1006. THD *thd= current_thd; 1007. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 1008. return (null_value= !d.is_valid_datetime()) ? 0 : d.quarter(); 1009. } #720 sql/item_timefunc.cc:1015: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 1013. DBUG_ASSERT(fixed()); 1014. THD *thd= current_thd; 1015. Time tm(thd, args[0], Time::Options_for_cast(thd)); ^ 1016. return (null_value= !tm.is_valid_time()) ? 0 : tm.get_mysql_time()->hour; 1017. } #721 sql/item_timefunc.cc:1023: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 1021. DBUG_ASSERT(fixed()); 1022. THD *thd= current_thd; 1023. Time tm(thd, args[0], Time::Options_for_cast(thd)); ^ 1024. return (null_value= !tm.is_valid_time()) ? 0 : tm.get_mysql_time()->minute; 1025. } #722 sql/item_timefunc.cc:1034: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 1032. DBUG_ASSERT(fixed()); 1033. THD *thd= current_thd; 1034. Time tm(thd, args[0], Time::Options_for_cast(thd)); ^ 1035. return (null_value= !tm.is_valid_time()) ? 0 : tm.get_mysql_time()->second; 1036. } #723 sql/item_timefunc.cc:1083: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1081. uint week_format; 1082. THD *thd= current_thd; 1083. Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 1084. if ((null_value= !d.is_valid_datetime())) 1085. return 0; #724 sql/item_timefunc.cc:1083: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1081. uint week_format; 1082. THD *thd= current_thd; 1083. Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 1084. if ((null_value= !d.is_valid_datetime())) 1085. return 0; #725 sql/item_timefunc.cc:1098: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1096. DBUG_ASSERT(fixed()); 1097. THD *thd= current_thd; 1098. Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 1099. return (null_value= !d.is_valid_datetime()) ? 0 : 1100. d.yearweek((week_mode((uint) args[1]->val_int()) | WEEK_YEAR)); #726 sql/item_timefunc.cc:1098: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1096. DBUG_ASSERT(fixed()); 1097. THD *thd= current_thd; 1098. Datetime d(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 1099. return (null_value= !d.is_valid_datetime()) ? 0 : 1100. d.yearweek((week_mode((uint) args[1]->val_int()) | WEEK_YEAR)); #727 sql/item_timefunc.cc:1108: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1106. DBUG_ASSERT(fixed()); 1107. THD *thd= current_thd; 1108. Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 1109. if ((null_value= !dt.is_valid_datetime())) 1110. return 0; #728 sql/item_timefunc.cc:1108: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1106. DBUG_ASSERT(fixed()); 1107. THD *thd= current_thd; 1108. Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 1109. if ((null_value= !dt.is_valid_datetime())) 1110. return 0; #729 sql/item_timefunc.cc:1133: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1131. uint err; 1132. THD *thd= current_thd; 1133. Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 1134. 1135. if ((null_value= !dt.is_valid_datetime())) #730 sql/item_timefunc.cc:1133: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1131. uint err; 1132. THD *thd= current_thd; 1133. Datetime dt(thd, args[0], Datetime::Options(TIME_NO_ZEROS, thd)); ^ 1134. 1135. if ((null_value= !dt.is_valid_datetime())) #731 sql/item_timefunc.cc:1149: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1147. DBUG_ASSERT(fixed()); 1148. THD *thd= current_thd; 1149. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 1150. return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->year; 1151. } #732 sql/item_timefunc.cc:1149: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1147. DBUG_ASSERT(fixed()); 1148. THD *thd= current_thd; 1149. Datetime d(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 1150. return (null_value= !d.is_valid_datetime()) ? 0 : d.get_mysql_time()->year; 1151. } #733 sql/item_timefunc.cc:1182: error: Uninitialized Value `l_time2.time_type` is read without initialization during the call to `Datetime_from_temporal::Datetime_from_temporal()`. 1180. DBUG_ASSERT(fixed()); 1181. // val_int_endpoint() is cally only if args[0] is a temporal Item_field 1182. Datetime_from_temporal dt(current_thd, args[0], TIME_CONV_NONE); ^ 1183. if ((null_value= !dt.is_valid_datetime())) 1184. { #734 sql/item_timefunc.cc:1182: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime_from_temporal::Datetime_from_temporal()`. 1180. DBUG_ASSERT(fixed()); 1181. // val_int_endpoint() is cally only if args[0] is a temporal Item_field 1182. Datetime_from_temporal dt(current_thd, args[0], TIME_CONV_NONE); ^ 1183. if ((null_value= !dt.is_valid_datetime())) 1184. { #735 sql/item_timefunc.cc:1258: error: Uninitialized Value `second_part` is read without initialization. 1256. 1257. return seconds2my_decimal(seconds < 0, seconds < 0 ? -seconds : seconds, 1258. second_part, buf); ^ 1259. } 1260. #736 sql/item_timefunc.cc:1290: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 1288. DBUG_ASSERT(fixed()); 1289. THD *thd= current_thd; 1290. Time tm(thd, args[0], Time::Options_for_cast(thd)); ^ 1291. return ((null_value= !tm.is_valid_time())) ? 0 : tm.to_seconds(); 1292. } #737 sql/item_timefunc.cc:1299: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 1297. DBUG_ASSERT(fixed()); 1298. THD *thd= current_thd; 1299. Time tm(thd, args[0], Time::Options_for_cast(thd)); ^ 1300. if ((null_value= !tm.is_valid_time())) 1301. return 0; #738 sql/item_timefunc.cc:1327: error: Uninitialized Value `value` is read without initialization. 1325. { 1326. ulonglong array[5]; 1327. ulonglong UNINIT_VAR(value); ^ 1328. const char *UNINIT_VAR(str); 1329. size_t UNINIT_VAR(length); #739 sql/item_timefunc.cc:1328: error: Uninitialized Value `str` is read without initialization. 1326. ulonglong array[5]; 1327. ulonglong UNINIT_VAR(value); 1328. const char *UNINIT_VAR(str); ^ 1329. size_t UNINIT_VAR(length); 1330. CHARSET_INFO *UNINIT_VAR(cs); #740 sql/item_timefunc.cc:1329: error: Uninitialized Value `length` is read without initialization. 1327. ulonglong UNINIT_VAR(value); 1328. const char *UNINIT_VAR(str); 1329. size_t UNINIT_VAR(length); ^ 1330. CHARSET_INFO *UNINIT_VAR(cs); 1331. char buf[100]; #741 sql/item_timefunc.cc:1330: error: Uninitialized Value `cs` is read without initialization. 1328. const char *UNINIT_VAR(str); 1329. size_t UNINIT_VAR(length); 1330. CHARSET_INFO *UNINIT_VAR(cs); ^ 1331. char buf[100]; 1332. String str_value(buf, sizeof(buf), &my_charset_bin); #742 sql/item_timefunc.cc:2998: error: Uninitialized Value `this.hour` is read without initialization during the call to `Extract_source::Extract_source()`. 2996. DBUG_ASSERT(fixed()); 2997. THD *thd= current_thd; 2998. Extract_source dt(thd, args[0], m_date_mode); ^ 2999. if ((null_value= !dt.is_valid_extract_source())) 3000. return 0; #743 sql/item_timefunc.cc:3605: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 3603. DBUG_ASSERT(fixed()); 3604. THD *thd= current_thd; 3605. Time tm(thd, args[0], Time::Options_for_cast(thd)); ^ 3606. return ((null_value= !tm.is_valid_time())) ? 3607. 0 : tm.get_mysql_time()->second_part; #744 sql/item_timefunc.cc:3623: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 3621. null_value= 0; 3622. 3623. if (Datetime(thd, args[0], opt).copy_to_mysql_time(<ime1) || ^ 3624. Datetime(thd, args[1], opt).copy_to_mysql_time(<ime2)) 3625. goto null_date; #745 sql/item_timefunc.cc:3623: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 3621. null_value= 0; 3622. 3623. if (Datetime(thd, args[0], opt).copy_to_mysql_time(<ime1) || ^ 3624. Datetime(thd, args[1], opt).copy_to_mysql_time(<ime2)) 3625. goto null_date; #746 sql/item_timefunc.cc:3624: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 3622. 3623. if (Datetime(thd, args[0], opt).copy_to_mysql_time(<ime1) || 3624. Datetime(thd, args[1], opt).copy_to_mysql_time(<ime2)) ^ 3625. goto null_date; 3626. #747 sql/item_timefunc.cc:3624: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 3622. 3623. if (Datetime(thd, args[0], opt).copy_to_mysql_time(<ime1) || 3624. Datetime(thd, args[1], opt).copy_to_mysql_time(<ime2)) ^ 3625. goto null_date; 3626. #748 sql/item_timefunc.h:684: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 682. { 683. DBUG_ASSERT(!is_cond()); 684. return Time(this).to_longlong(); ^ 685. } 686. double val_real() override #749 sql/item_timefunc.h:684: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 682. { 683. DBUG_ASSERT(!is_cond()); 684. return Time(this).to_longlong(); ^ 685. } 686. double val_real() override #750 sql/item_timefunc.h:687: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 685. } 686. double val_real() override 687. { return Time(this).to_double(); } ^ 688. String *val_str(String *to) override 689. { return Time(this).to_string(to, decimals); } #751 sql/item_timefunc.h:687: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 685. } 686. double val_real() override 687. { return Time(this).to_double(); } ^ 688. String *val_str(String *to) override 689. { return Time(this).to_string(to, decimals); } #752 sql/item_timefunc.h:689: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 687. { return Time(this).to_double(); } 688. String *val_str(String *to) override 689. { return Time(this).to_string(to, decimals); } ^ 690. my_decimal *val_decimal(my_decimal *to) override 691. { return Time(this).to_decimal(to); } #753 sql/item_timefunc.h:689: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 687. { return Time(this).to_double(); } 688. String *val_str(String *to) override 689. { return Time(this).to_string(to, decimals); } ^ 690. my_decimal *val_decimal(my_decimal *to) override 691. { return Time(this).to_decimal(to); } #754 sql/item_timefunc.h:691: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 689. { return Time(this).to_string(to, decimals); } 690. my_decimal *val_decimal(my_decimal *to) override 691. { return Time(this).to_decimal(to); } ^ 692. bool val_native(THD *thd, Native *to) override 693. { return Time(thd, this).to_native(to, decimals); } #755 sql/item_timefunc.h:691: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 689. { return Time(this).to_string(to, decimals); } 690. my_decimal *val_decimal(my_decimal *to) override 691. { return Time(this).to_decimal(to); } ^ 692. bool val_native(THD *thd, Native *to) override 693. { return Time(thd, this).to_native(to, decimals); } #756 sql/item_timefunc.h:693: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 691. { return Time(this).to_decimal(to); } 692. bool val_native(THD *thd, Native *to) override 693. { return Time(thd, this).to_native(to, decimals); } ^ 694. }; 695. #757 sql/item_timefunc.h:1462: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1460. bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override 1461. { 1462. Datetime dt(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 1463. if (!dt.is_valid_datetime()) 1464. return (null_value= 1); #758 sql/item_timefunc.h:1462: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1460. bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override 1461. { 1462. Datetime dt(thd, args[0], Datetime::Options(TIME_CONV_NONE, thd)); ^ 1463. if (!dt.is_valid_datetime()) 1464. return (null_value= 1); #759 sql/item_timefunc.h:1742: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1740. { 1741. Datetime::Options opt(TIME_CONV_NONE, thd); 1742. Datetime dt(thd, item->arguments()[0], opt); ^ 1743. if (!dt.is_valid_datetime() || 1744. dt.check_date_with_warn(thd, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE)) #760 sql/item_timefunc.h:1742: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1740. { 1741. Datetime::Options opt(TIME_CONV_NONE, thd); 1742. Datetime dt(thd, item->arguments()[0], opt); ^ 1743. if (!dt.is_valid_datetime() || 1744. dt.check_date_with_warn(thd, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE)) #761 sql/item_timefunc.h:1774: error: Uninitialized Value `l_time2.time_type` is read without initialization during the call to `Date::Date()`. 1772. We don't need rounding here. 1773. */ 1774. Date d(thd, item->arguments()[0], TIME_CONV_NONE); ^ 1775. if (!d.is_valid_date() || 1776. d.check_date_with_warn(thd, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE)) #762 sql/item_timefunc.h:1800: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 1798. MYSQL_TIME *to, date_mode_t fuzzy) const override 1799. { 1800. Time t(thd, item->arguments()[0]); ^ 1801. if (!t.is_valid_time()) 1802. return (item->null_value= true); #763 sql/item_timefunc.h:1869: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 1867. DBUG_ASSERT(item->fixed()); 1868. Datetime::Options opt(TIME_CONV_NONE, thd); 1869. Datetime dt(thd, item->arguments()[0], opt); ^ 1870. if (!dt.is_valid_datetime()) 1871. return (item->null_value= true); #764 sql/item_timefunc.h:1869: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 1867. DBUG_ASSERT(item->fixed()); 1868. Datetime::Options opt(TIME_CONV_NONE, thd); 1869. Datetime dt(thd, item->arguments()[0], opt); ^ 1870. if (!dt.is_valid_datetime()) 1871. return (item->null_value= true); #765 sql/item_timefunc.h:1902: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 1900. { 1901. DBUG_ASSERT(item->fixed()); 1902. Time t(thd, item->arguments()[0]); ^ 1903. if (!t.is_valid_time()) 1904. return (item->null_value= true); #766 sql/json_table.cc:578: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_find_path()`. 576. 577. cur_step= jc->m_path.steps; 578. not_found= json_find_path(&je, &jc->m_path, &cur_step, array_counters) || ^ 579. json_read_value(&je); 580. #767 sql/json_table.cc:579: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 577. cur_step= jc->m_path.steps; 578. not_found= json_find_path(&je, &jc->m_path, &cur_step, array_counters) || 579. json_read_value(&je); ^ 580. 581. if (jc->m_column_type == Json_table_column::EXISTS_PATH) #768 sql/key.cc:649: error: Dead Store The value written to `&len` is never used. 647. { 648. const uchar *key1_end= key1 + tuple_length; 649. int UNINIT_VAR(len); ^ 650. int res; 651. for (;key1 < key1_end; key1 += len, key2 += len, part++) #769 sql/key.cc:649: error: Uninitialized Value `len` is read without initialization. 647. { 648. const uchar *key1_end= key1 + tuple_length; 649. int UNINIT_VAR(len); ^ 650. int res; 651. for (;key1 < key1_end; key1 += len, key2 += len, part++) #770 sql/key.cc:700: error: Uninitialized Value `cs` is read without initialization. 698. { 699. uchar *pos= (uchar*)key; 700. CHARSET_INFO *UNINIT_VAR(cs); ^ 701. size_t UNINIT_VAR(length), UNINIT_VAR(pack_length); 702. bool is_string= TRUE; #771 sql/key.cc:701: error: Uninitialized Value `length` is read without initialization. 699. uchar *pos= (uchar*)key; 700. CHARSET_INFO *UNINIT_VAR(cs); 701. size_t UNINIT_VAR(length), UNINIT_VAR(pack_length); ^ 702. bool is_string= TRUE; 703. #772 sql/key.cc:701: error: Uninitialized Value `pack_length` is read without initialization. 699. uchar *pos= (uchar*)key; 700. CHARSET_INFO *UNINIT_VAR(cs); 701. size_t UNINIT_VAR(length), UNINIT_VAR(pack_length); ^ 702. bool is_string= TRUE; 703. #773 sql/key.cc:804: error: Uninitialized Value `cs` is read without initialization. 802. uchar *pos1= (uchar*)key1; 803. uchar *pos2= (uchar*)key2; 804. CHARSET_INFO *UNINIT_VAR(cs); ^ 805. size_t UNINIT_VAR(length1), UNINIT_VAR(length2), UNINIT_VAR(pack_length); 806. bool is_string= TRUE; #774 sql/key.cc:805: error: Uninitialized Value `length1` is read without initialization. 803. uchar *pos2= (uchar*)key2; 804. CHARSET_INFO *UNINIT_VAR(cs); 805. size_t UNINIT_VAR(length1), UNINIT_VAR(length2), UNINIT_VAR(pack_length); ^ 806. bool is_string= TRUE; 807. #775 sql/key.cc:805: error: Uninitialized Value `length2` is read without initialization. 803. uchar *pos2= (uchar*)key2; 804. CHARSET_INFO *UNINIT_VAR(cs); 805. size_t UNINIT_VAR(length1), UNINIT_VAR(length2), UNINIT_VAR(pack_length); ^ 806. bool is_string= TRUE; 807. #776 sql/key.cc:805: error: Uninitialized Value `pack_length` is read without initialization. 803. uchar *pos2= (uchar*)key2; 804. CHARSET_INFO *UNINIT_VAR(cs); 805. size_t UNINIT_VAR(length1), UNINIT_VAR(length2), UNINIT_VAR(pack_length); ^ 806. bool is_string= TRUE; 807. #777 sql/lock.cc:638: error: Null Dereference `i` could be null (from the call to `thr_abort_locks_for_thread()` on line 638) and is dereferenced in the call to `thr_abort_locks_for_thread()`. 636. for (uint i=0; i < locked->lock_count; i++) 637. { 638. if (thr_abort_locks_for_thread(locked->locks[i]->lock, ^ 639. table->in_use->thread_id)) 640. result= TRUE; #778 sql/log.cc:1065: error: Dead Store The value written to `&log_name` is never used. 1063. TABLE_LIST table_list; 1064. TABLE *table; 1065. LEX_CSTRING *UNINIT_VAR(log_name); ^ 1066. int result; 1067. Open_tables_backup open_tables_backup; #779 sql/log.cc:1065: error: Uninitialized Value `log_name` is read without initialization. 1063. TABLE_LIST table_list; 1064. TABLE *table; 1065. LEX_CSTRING *UNINIT_VAR(log_name); ^ 1066. int result; 1067. Open_tables_backup open_tables_backup; #780 sql/log.cc:1597: error: Dead Store The value written to `&file_log` is never used. 1595. { 1596. my_bool *tmp_opt= 0; 1597. MYSQL_LOG *UNINIT_VAR(file_log); ^ 1598. 1599. switch (log_type) { #781 sql/log.cc:1597: error: Uninitialized Value `file_log` is read without initialization. 1595. { 1596. my_bool *tmp_opt= 0; 1597. MYSQL_LOG *UNINIT_VAR(file_log); ^ 1598. 1599. switch (log_type) { #782 sql/log.cc:2529: error: Dead Store The value written to `&error` is never used. 2527. static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv) 2528. { 2529. int error= 1; ^ 2530. DBUG_ENTER("binlog_savepoint_set"); 2531. #783 sql/log.cc:3670: error: Dead Store The value written to `&index_file_nr` is never used. 3668. const char *log_name, bool need_mutex) 3669. { 3670. File index_file_nr= -1; ^ 3671. DBUG_ASSERT(!my_b_inited(&index_file)); 3672. #784 sql/log.cc:4959: error: Dead Store The value written to `&file` is never used. 4957. { 4958. int error= 0; 4959. File file= -1; ^ 4960. 4961. DBUG_ENTER("MYSQL_BIN_LOG::open_purge_index_file"); #785 sql/log.cc:5444: error: Uninitialized Value `old_file` is read without initialization. 5442. uint close_flag; 5443. bool delay_close= false; 5444. File UNINIT_VAR(old_file); ^ 5445. DBUG_ENTER("MYSQL_BIN_LOG::new_file_impl"); 5446. #786 sql/log.cc:5459: error: Dead Store The value written to `&new_name_ptr` is never used. 5457. 5458. /* Reuse old name if not binlog and not update log */ 5459. new_name_ptr= name; ^ 5460. 5461. /* #787 sql/log.cc:6038: error: Dead Store The value written to `&cache_mngr` is never used. 6036. 6037. void THD::binlog_set_stmt_begin() { 6038. binlog_cache_mngr *cache_mngr= ^ 6039. (binlog_cache_mngr*) thd_get_ha_data(this, binlog_hton); 6040. #788 sql/log.cc:6687: error: Uninitialized Value `prev_binlog_id` is read without initialization. 6685. bool using_trans= event_info->use_trans_cache(); 6686. bool direct= event_info->use_direct_logging(); 6687. ulong UNINIT_VAR(prev_binlog_id); ^ 6688. DBUG_ENTER("MYSQL_BIN_LOG::write(Log_event *)"); 6689. #789 sql/log.cc:6748: error: Uninitialized Value `my_org_b_tell` is read without initialization. 6746. IF_WSREP(thd->wsrep_cs().mode() == wsrep::client_state::m_local, 0)) || is_open()) 6747. { 6748. my_off_t UNINIT_VAR(my_org_b_tell); ^ 6749. #ifdef HAVE_REPLICATION 6750. /* #790 sql/log.cc:7865: error: Uninitialized Value `orig_entry.next` is read without initialization during the call to `MYSQL_BIN_LOG::write_transaction_to_binlog_events()`. 7863. Incident_log_event inc_ev(thd, INCIDENT_LOST_EVENTS, &write_error_msg); 7864. entry.incident_event= &inc_ev; 7865. DBUG_RETURN(write_transaction_to_binlog_events(&entry)); ^ 7866. } 7867. else #791 sql/log.cc:7870: error: Uninitialized Value `orig_entry.next` is read without initialization during the call to `MYSQL_BIN_LOG::write_transaction_to_binlog_events()`. 7868. { 7869. entry.incident_event= NULL; 7870. DBUG_RETURN(write_transaction_to_binlog_events(&entry)); ^ 7871. } 7872. } #792 sql/log.cc:8390: error: Uninitialized Value `commit_offset` is read without initialization. 8388. { 8389. uint xid_count= 0; 8390. my_off_t UNINIT_VAR(commit_offset); ^ 8391. group_commit_entry *current, *last_in_queue; 8392. group_commit_entry *queue= NULL; #793 sql/log.cc:8394: error: Dead Store The value written to `&binlog_id` is never used. 8392. group_commit_entry *queue= NULL; 8393. bool check_purge= false; 8394. ulong UNINIT_VAR(binlog_id); ^ 8395. uint64 commit_id; 8396. DBUG_ENTER("MYSQL_BIN_LOG::trx_group_commit_leader"); #794 sql/log.cc:8394: error: Uninitialized Value `binlog_id` is read without initialization. 8392. group_commit_entry *queue= NULL; 8393. bool check_purge= false; 8394. ulong UNINIT_VAR(binlog_id); ^ 8395. uint64 commit_id; 8396. DBUG_ENTER("MYSQL_BIN_LOG::trx_group_commit_leader"); #795 sql/log.cc:9532: error: Uninitialized Value `is_group_commit_leader` is read without initialization. 9530. int cookie; 9531. struct commit_entry entry; 9532. bool UNINIT_VAR(is_group_commit_leader); ^ 9533. 9534. if (need_prepare_ordered) #796 sql/log.cc:10400: error: Dead Store The value written to `&error` is never used. 10398. int TC_LOG_BINLOG::open(const char *opt_name) 10399. { 10400. int error= 1; ^ 10401. DBUG_ENTER("TC_LOG_BINLOG::open"); 10402. #797 sql/log.cc:11123: error: Uninitialized Value `__param_0.domain_id` is read without initialization during the call to `rpl_gtid::operator=()`. 11121. binlog_truncate_file_name[0]= 0; 11122. binlog_unsafe_file_name [0]= 0; 11123. binlog_unsafe_gtid= truncate_gtid= truncate_gtid_1st_round= rpl_gtid(); ^ 11124. if (do_truncate) 11125. gtid_maybe_to_truncate= new Dynamic_array(16, 16); #798 sql/log.cc:11140: error: Uninitialized Value `__param_0.domain_id` is read without initialization during the call to `rpl_gtid::operator=()`. 11138. } 11139. binlog_truncate_coord= Binlog_offset(id_binlog, pos); 11140. truncate_gtid= rpl_gtid(); ^ 11141. truncate_reset_done= true; 11142. for (uint i= 0; i < gtid_maybe_to_truncate->elements(); i++) #799 sql/log.cc:11484: error: Uninitialized Value `this.last_gtid.seq_no` is read without initialization during the call to `Recovery_context::decide_or_assess()`. 11482. } 11483. #else 11484. if (ctx.decide_or_assess(member, round, fdle, linfo, ev->log_pos)) ^ 11485. goto err2; 11486. #endif #800 sql/log.cc:11834: error: Uninitialized Value `prev_binlog_id` is read without initialization. 11832. ulong value= *((ulong *)save); 11833. bool check_purge= false; 11834. ulong UNINIT_VAR(prev_binlog_id); ^ 11835. 11836. mysql_mutex_unlock(&LOCK_global_system_variables); #801 sql/log_event.cc:1531: error: Dead Store The value written to `&tmp` is never used. 1529. DBUG_PRINT("info", ("Query_log_event has status_vars_len: %u", 1530. (uint) status_vars_len)); 1531. tmp-= 2; ^ 1532. } 1533. else #802 sql/log_event.cc:2703: error: Dead Store The value written to `&buf` is never used. 2701. return; 2702. } 2703. extra_engines= *buf++; ^ 2704. 2705. DBUG_ASSERT(extra_engines > 0); #803 sql/log_event_client.cc:1839: error: Dead Store The value written to `&different_db` is never used. 1837. // TODO: print the catalog ?? 1838. char buff[64], *end; // Enough for SET TIMESTAMP 1839. bool different_db= 1; ^ 1840. uint32 tmp; 1841. #804 sql/log_event_old.cc:1056: error: Dead Store The value written to `&error` is never used. 1054. 1055. /* record[0] is the before image for the update */ 1056. error= unpack_row_old(rgi, ^ 1057. table, m_width, table->record[0], 1058. row_start, m_rows_end, #805 sql/log_event_old.cc:2044: error: Dead Store The value written to `&error` is never used. 2042. { 2043. restore_record(table,record[1]); 2044. error= unpack_current_row(rgi); ^ 2045. } 2046. #806 sql/log_event_old.cc:2152: error: Dead Store The value written to `&error` is never used. 2150. // TODO: shall we check and report errors here? 2151. prepare_record(table, m_width, FALSE /* don't check errors */); 2152. error= unpack_current_row(rgi); ^ 2153. 2154. #ifndef DBUG_OFF #807 sql/log_event_old.cc:2716: error: Dead Store The value written to `&error` is never used. 2714. 2715. m_curr_row= m_curr_row_end; 2716. error= unpack_current_row(rgi); // this also updates m_curr_row_end ^ 2717. 2718. /* #808 sql/log_event_server.cc:4264: error: Dead Store The value written to `&one_phase_byte` is never used. 4262. { 4263. uchar data[1 + 4 + 4 + 4]= {one_phase,}; 4264. uint8 one_phase_byte= one_phase; ^ 4265. 4266. int4store(data+1, static_cast(xid)->formatID); #809 sql/log_event_server.cc:4773: error: Dead Store The value written to `&fd` is never used. 4771. char fname_buf[FN_REFLEN]; 4772. char *ext; 4773. int fd = -1; ^ 4774. IO_CACHE file; 4775. Log_event_writer lew(&file, 0); #810 sql/log_event_server.cc:5822: error: Dead Store The value written to `&error` is never used. 5820. 5821. // Do event specific preparations 5822. error= do_before_row_operations(rli); ^ 5823. 5824. /* #811 sql/log_event_server.cc:7399: error: Dead Store The value written to `&keynum` is never used. 7397. TABLE *table= m_table; // pointer to event's table 7398. int error; 7399. int UNINIT_VAR(keynum); ^ 7400. const bool invoke_triggers= (m_table->triggers && do_invoke_trigger()); 7401. auto_afree_ptr key(NULL); #812 sql/log_event_server.cc:7399: error: Uninitialized Value `keynum` is read without initialization. 7397. TABLE *table= m_table; // pointer to event's table 7398. int error; 7399. int UNINIT_VAR(keynum); ^ 7400. const bool invoke_triggers= (m_table->triggers && do_invoke_trigger()); 7401. auto_afree_ptr key(NULL); #813 sql/log_event_server.cc:7577: error: Dead Store The value written to `&error` is never used. 7575. { 7576. restore_record(table,record[1]); 7577. error= unpack_current_row(rgi); ^ 7578. if (table->s->long_unique_table) 7579. table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE); #814 sql/log_event_server.cc:7633: error: Dead Store The value written to `&error` is never used. 7631. unlikely(process_triggers(TRG_EVENT_DELETE, TRG_ACTION_BEFORE, 7632. TRUE))) 7633. error= HA_ERR_GENERIC; // in case if error is not set yet ^ 7634. else 7635. { #815 sql/log_event_server.cc:7728: error: Dead Store The value written to `&message` is never used. 7726. "Write_rows_log_event::write_row() on table %c%.*s%c", 7727. quote_char, int(table_name.length), table_name.str, quote_char); 7728. message= msg; ^ 7729. int error; 7730. #816 sql/log_event_server.cc:7853: error: Uninitialized Value `best_key` is read without initialization. 7851. { 7852. uint i, best_key_nr, last_part; 7853. KEY *key, *UNINIT_VAR(best_key); ^ 7854. ulong UNINIT_VAR(best_rec_per_key), tmp; 7855. DBUG_ENTER("Rows_log_event::find_key"); #817 sql/log_event_server.cc:7854: error: Uninitialized Value `best_rec_per_key` is read without initialization. 7852. uint i, best_key_nr, last_part; 7853. KEY *key, *UNINIT_VAR(best_key); 7854. ulong UNINIT_VAR(best_rec_per_key), tmp; ^ 7855. DBUG_ENTER("Rows_log_event::find_key"); 7856. DBUG_ASSERT(m_table); #818 sql/log_event_server.cc:8028: error: Dead Store The value written to `&error` is never used. 8026. 8027. prepare_record(table, m_width, FALSE); 8028. error= unpack_current_row(rgi); ^ 8029. 8030. m_vers_from_plain= false; #819 sql/log_event_server.cc:8371: error: Dead Store The value written to `&message` is never used. 8369. "Delete_rows_log_event::find_row() on table %c%.*s%c", 8370. quote_char, int(table_name.length), table_name.str, quote_char); 8371. message= msg; ^ 8372. const bool invoke_triggers= (m_table->triggers && do_invoke_trigger()); 8373. DBUG_ASSERT(m_table != NULL); #820 sql/log_event_server.cc:8394: error: Dead Store The value written to `&message` is never used. 8392. quote_char, int(table_name.length), table_name.str, 8393. quote_char); 8394. message= msg; ^ 8395. #ifdef WSREP_PROC_INFO 8396. snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, #821 sql/log_event_server.cc:8534: error: Dead Store The value written to `&message` is never used. 8532. "Update_rows_log_event::find_row() on table %c%.*s%c", 8533. quote_char, int(table_name.length), table_name.str, quote_char); 8534. message= msg; ^ 8535. 8536. #ifdef WSREP_PROC_INFO #822 sql/log_event_server.cc:8587: error: Dead Store The value written to `&message` is never used. 8585. "Update_rows_log_event::unpack_current_row() on table %c%.*s%c", 8586. quote_char, int(table_name.length), table_name.str, quote_char); 8587. message= msg; ^ 8588. #ifdef WSREP_PROC_INFO 8589. my_snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, #823 sql/log_event_server.cc:8620: error: Dead Store The value written to `&message` is never used. 8618. "Update_rows_log_event::ha_update_row() on table %c%.*s%c", 8619. quote_char, int(table_name.length), table_name.str, quote_char); 8620. message= msg; ^ 8621. #ifdef WSREP_PROC_INFO 8622. my_snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, #824 sql/mdl.cc:773: error: Dead Store The value written to `&res` is never used. 771. */ 772. mysql_prlock_rdlock(&lock->m_rwlock); 773. bool res= std::any_of(lock->m_granted.begin(), lock->m_granted.end(), ^ 774. [arg](MDL_ticket &ticket) { 775. return arg->callback(&ticket, arg->argument, true); #825 sql/mem_root_array.h:114: error: Dead Store The value written to `&p` is never used. 112. for (size_t ix= pos; ix < m_size; ++ix) 113. { 114. Element_type *p= &m_array[ix]; ^ 115. p->~Element_type(); // Destroy discarded element. 116. } #826 sql/multi_range_read.cc:1060: error: Uninitialized Value `key_buff_elem_size` is read without initialization. 1058. int res; 1059. Key_parameters keypar; 1060. uint UNINIT_VAR(key_buff_elem_size); /* set/used when do_sort_keys==TRUE */ ^ 1061. handler *h_idx; 1062. Mrr_ordered_rndpos_reader *disk_strategy= NULL; #827 sql/mysqld.cc:1354: error: Static Initialization Order Fiasco Initializer of buffered_logs accesses global variable from a different translation unit: end_of_list|. 1352. 1353. /** Logs reported before a logger is available. */ 1354. static Buffered_logs buffered_logs; ^ 1355. 1356. struct my_rnd_struct sql_rand; ///< used by sql_class.cc:THD::THD() #828 sql/mysqld.cc:7325: error: Static Initialization Order Fiasco Initializer of status_vars accesses global variable from a different translation unit: binlog_dump_thread_count|. 7323. */ 7324. 7325. SHOW_VAR status_vars[]= { ^ 7326. {"Aborted_clients", (char*) &aborted_threads, SHOW_LONG}, 7327. {"Aborted_connects", (char*) &aborted_connects, SHOW_LONG}, #829 sql/opt_range.cc:2727: error: Dead Store The value written to `&scan_time` is never used. 2725. { 2726. DEBUG_SYNC(thd, "in_forced_range_optimize"); 2727. scan_time= read_time= DBL_MAX; ^ 2728. } 2729. else #830 sql/opt_range.cc:3032: error: Dead Store The value written to `&new_conj_trp` is never used. 3030. /* Try creating index_merge/ROR-union scan. */ 3031. SEL_IMERGE *imerge; 3032. TABLE_READ_PLAN *best_conj_trp= NULL, ^ 3033. *UNINIT_VAR(new_conj_trp); /* no empty index_merge lists possible */ 3034. DBUG_PRINT("info",("No range reads possible," #831 sql/opt_range.cc:3080: error: Dead Store The value written to `&best_read_time` is never used. 3078. grp_summary.add("chosen", true); 3079. best_trp= group_trp; 3080. best_read_time= best_trp->read_cost; ^ 3081. } 3082. else #832 sql/opt_range.cc:3627: error: Uninitialized Value `_.n_bits` is read without initialization. 3625. MY_BITMAP cols_for_indexes; 3626. (void) my_bitmap_init(&cols_for_indexes, used_fields_buff, table->s->fields, 0); 3627. bitmap_clear_all(&cols_for_indexes); ^ 3628. 3629. uint column_no= 0; // Start looping from the first column. #833 sql/opt_range.cc:7047: error: Dead Store The value written to `&selectivity_mult` is never used. 7045. bool is_cpk_scan) 7046. { 7047. double selectivity_mult= 1.0; ^ 7048. 7049. DBUG_ENTER("ror_intersect_add"); #834 sql/opt_range.cc:7574: error: Uninitialized Value `best_idx` is read without initialization. 7572. double read_time) 7573. { 7574. uint idx, UNINIT_VAR(best_idx); ^ 7575. SEL_ARG *key_to_read= NULL; 7576. ha_rows UNINIT_VAR(best_records); /* protected by key_to_read */ #835 sql/opt_range.cc:7576: error: Uninitialized Value `best_records` is read without initialization. 7574. uint idx, UNINIT_VAR(best_idx); 7575. SEL_ARG *key_to_read= NULL; 7576. ha_rows UNINIT_VAR(best_records); /* protected by key_to_read */ ^ 7577. uint UNINIT_VAR(best_mrr_flags), /* protected by key_to_read */ 7578. UNINIT_VAR(best_buf_size); /* protected by key_to_read */ #836 sql/opt_range.cc:7577: error: Uninitialized Value `best_mrr_flags` is read without initialization. 7575. SEL_ARG *key_to_read= NULL; 7576. ha_rows UNINIT_VAR(best_records); /* protected by key_to_read */ 7577. uint UNINIT_VAR(best_mrr_flags), /* protected by key_to_read */ ^ 7578. UNINIT_VAR(best_buf_size); /* protected by key_to_read */ 7579. TRP_RANGE* read_plan= NULL; #837 sql/opt_range.cc:7578: error: Uninitialized Value `best_buf_size` is read without initialization. 7576. ha_rows UNINIT_VAR(best_records); /* protected by key_to_read */ 7577. uint UNINIT_VAR(best_mrr_flags), /* protected by key_to_read */ 7578. UNINIT_VAR(best_buf_size); /* protected by key_to_read */ ^ 7579. TRP_RANGE* read_plan= NULL; 7580. DBUG_ENTER("get_key_scans_params"); #838 sql/opt_range.cc:9570: error: Unnecessary Copy Assignment `&merges` is copy assigned into field `merges` but is not modified afterwards. Rather than copying into the field, move into it instead. 9568. } 9569. } 9570. tree->merges= merges; ^ 9571. } 9572. #839 sql/opt_range.cc:11215: error: Uninitialized Value `par` is read without initialization. 11213. SEL_ARG::insert(SEL_ARG *key) 11214. { 11215. SEL_ARG *element,**UNINIT_VAR(par),*UNINIT_VAR(last_element); ^ 11216. 11217. for (element= this; element != &null_element ; ) #840 sql/opt_range.cc:11215: error: Uninitialized Value `last_element` is read without initialization. 11213. SEL_ARG::insert(SEL_ARG *key) 11214. { 11215. SEL_ARG *element,**UNINIT_VAR(par),*UNINIT_VAR(last_element); ^ 11216. 11217. for (element= this; element != &null_element ; ) #841 sql/opt_split.cc:961: error: Uninitialized Value `best_key_keyuse_ext_start` is read without initialization. 959. spl_opt_info->tables_usable_for_splitting; 960. KEYUSE_EXT *keyuse_ext= &join->ext_keyuses_for_splitting->at(0); 961. KEYUSE_EXT *UNINIT_VAR(best_key_keyuse_ext_start); ^ 962. TABLE *best_table= 0; 963. double best_rec_per_key= DBL_MAX; #842 sql/opt_subselect.cc:2891: error: Uninitialized Value `prev_dups_producing_tables` is read without initialization. 2889. */ 2890. remaining_tables &= ~new_join_tab->table->map; 2891. table_map dups_producing_tables, UNINIT_VAR(prev_dups_producing_tables), ^ 2892. UNINIT_VAR(prev_sjm_lookup_tables); 2893. #843 sql/opt_subselect.cc:2892: error: Uninitialized Value `prev_sjm_lookup_tables` is read without initialization. 2890. remaining_tables &= ~new_join_tab->table->map; 2891. table_map dups_producing_tables, UNINIT_VAR(prev_dups_producing_tables), 2892. UNINIT_VAR(prev_sjm_lookup_tables); ^ 2893. 2894. if (idx == join->const_tables) #844 sql/opt_subselect.cc:3883: error: Uninitialized Value `first` is read without initialization. 3881. POSITION *pos= join->best_positions + tablenr; 3882. JOIN_TAB *s= pos->table; 3883. uint UNINIT_VAR(first); // Set by every branch except SJ_OPT_NONE which doesn't use it ^ 3884. 3885. if ((handled_tabs & s->table->map) || pos->sj_strategy == SJ_OPT_NONE) #845 sql/opt_subselect.cc:4749: error: Dead Store The value written to `&null_count` is never used. 4747. share->null_bytes= null_pack_length; 4748. } 4749. null_count=1; ^ 4750. 4751. { #846 sql/opt_subselect.cc:4766: error: Dead Store The value written to `&pos` is never used. 4764. 4765. length=field->pack_length(); 4766. pos+= length; ^ 4767. 4768. /* Make entry for create table */ #847 sql/opt_subselect.cc:6099: error: Uninitialized Value `cond_equal.max_members` is read without initialization during the call to `COND_EQUAL::copy()`. 6097. { 6098. and_cond= new (thd->mem_root) Item_cond_and(thd); 6099. and_cond->m_cond_equal.copy(new_cond_equal); ^ 6100. inherited= &and_cond->m_cond_equal; 6101. } #848 sql/opt_subselect.cc:6856: error: Null Dereference `Item::get_IN_subquery()` could be null (from the call to `Item::get_IN_subquery()` on line 6856) and is dereferenced. 6854. return 6855. get_corresponding_field_pair(this, 6856. ((Item *)arg)->get_IN_subquery()-> ^ 6857. corresponding_fields); 6858. } #849 sql/opt_subselect.cc:6867: error: Const Refable Parameter Function parameter `pair_list` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 6865. */ 6866. 6867. Field_pair *find_matching_field_pair(Item *item, List pair_list) ^ 6868. { 6869. Field_pair *field_pair= get_corresponding_field_pair(item, pair_list); #850 sql/opt_subselect.cc:6869: error: Unnecessary Copy Intermediate variable `pair_list` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 6867. Field_pair *find_matching_field_pair(Item *item, List pair_list) 6868. { 6869. Field_pair *field_pair= get_corresponding_field_pair(item, pair_list); ^ 6870. if (field_pair) 6871. return field_pair; #851 sql/opt_subselect.cc:6997: error: Null Dereference `subq_pred` could be null (from the call to `Item::get_IN_subquery()` on line 6996) and is dereferenced in the call to `get_corresponding_item()`. 6995. { 6996. Item_in_subselect *subq_pred= ((Item *)arg)->get_IN_subquery(); 6997. Item *producing_item= get_corresponding_item(thd, this, subq_pred); ^ 6998. if (producing_item) 6999. return producing_item->build_clone(thd); #852 sql/opt_trace.cc:74: error: Static Initialization Order Fiasco Initializer of Show::optimizer_trace_info accesses global variable from a different translation unit: type_handler_stiny|. 72. 73. 74. ST_FIELD_INFO optimizer_trace_info[]= ^ 75. { 76. Column("QUERY", Longtext(65535), NOT_NULL), #853 sql/partition_info.cc:1571: error: Uninitialized Value `field_buf` is read without initialization. 1569. while ((field= *(ptr++))) 1570. { 1571. uchar *UNINIT_VAR(field_buf); ^ 1572. 1573. if (!field_is_partition_charset(field)) #854 sql/rpl_gtid.cc:126: error: Uninitialized Value `thd` is read without initialization. 124. bool did_enter_cond= false; 125. PSI_stage_info old_stage; 126. THD *UNINIT_VAR(thd); ^ 127. Relay_log_info *rli= rgi->rli; 128. #855 sql/rpl_gtid.cc:2707: error: Uninitialized Value `elem.queue_idx` is read without initialization during the call to `gtid_waiting::remove_from_wait_queue()`. 2705. { 2706. mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state); 2707. remove_from_wait_queue(he, &elem); ^ 2708. promote_new_waiter(he); 2709. if (did_enter_cond) #856 sql/rpl_record.cc:88: error: Dead Store The value written to `&offset` is never used. 86. if (field->is_null(rec_offset)) 87. { 88. offset= def_offset; ^ 89. null_bits |= null_mask; 90. } #857 sql/rpl_record.cc:133: error: Dead Store The value written to `&null_ptr` is never used. 131. { 132. DBUG_ASSERT(null_ptr < row_data + null_byte_count); 133. *null_ptr++ = null_bits; ^ 134. } 135. #858 sql/rpl_rli.cc:1579: error: Uninitialized Value `table` is read without initialization. 1577. { 1578. TABLE_LIST tlist; 1579. TABLE *UNINIT_VAR(table); ^ 1580. bool table_opened= false; 1581. bool table_scanned= false; #859 sql/signal_handler.cc:79: error: Dead Store The value written to `&endline` is never used. 77. #endif 78. { 79. char *endline= buff; ^ 80. ssize_t remain_len= len= read(fd, buff, sizeof(buff)); 81. close(fd); #860 sql/signal_handler.cc:232: error: Dead Store The value written to `&kreason` is never used. 230. if (thd) 231. { 232. const char *kreason= "UNKNOWN"; ^ 233. switch (thd->killed) { 234. case NOT_KILLED: #861 sql/slave.cc:394: error: Uninitialized Value `err` is read without initialization. 392. { 393. THD *thd= NULL; 394. int UNINIT_VAR(err); ^ 395. plugin_ref engine= NULL, *auto_engines; 396. rpl_slave_state::gtid_pos_table *entry; #862 sql/slave.cc:4516: error: Uninitialized Value `temp_err` is read without initialization. 4514. if (slave_trans_retries) 4515. { 4516. int UNINIT_VAR(temp_err); ^ 4517. if (unlikely(exec_res) && (temp_err= has_temporary_error(thd))) 4518. { #863 sql/slave.cc:5406: error: Uninitialized Value `saved_log_pos` is read without initialization. 5404. char saved_master_log_name[FN_REFLEN]; 5405. bool thd_initialized= 0; 5406. my_off_t UNINIT_VAR(saved_log_pos); ^ 5407. my_off_t UNINIT_VAR(saved_master_log_pos); 5408. String saved_skip_gtid_pos; #864 sql/slave.cc:5407: error: Uninitialized Value `saved_master_log_pos` is read without initialization. 5405. bool thd_initialized= 0; 5406. my_off_t UNINIT_VAR(saved_log_pos); 5407. my_off_t UNINIT_VAR(saved_master_log_pos); ^ 5408. String saved_skip_gtid_pos; 5409. my_off_t saved_skip= 0; #865 sql/sp.cc:2165: error: Null Dereference `cp` could be null (from the call to `Sp_handler::get_cache()` on line 2162) and is dereferenced in the call to `sp_cache_lookup()`. 2163. sp_head *sp; 2164. 2165. if ((sp= sp_cache_lookup(cp, name))) ^ 2166. DBUG_RETURN(sp_clone_and_link_routine(thd, name, sp)); 2167. if (!cache_only) #866 sql/sp.cc:2542: error: Uninitialized Value `_.length` is read without initialization. 2540. DBUG_ASSERT(pkgstr.length); 2541. LEX_CSTRING tmpname; // Non-qualified m_name 2542. tmpname.str= caller->m_name.str + pkgstr.length + 1; ^ 2543. tmpname.length= caller->m_name.length - pkgstr.length - 1; 2544. #867 sql/sp.cc:2822: error: Null Dereference `spc` could be null (from the call to `Sp_handler::get_cache()` on line 2816) and is dereferenced in the call to `sp_cache_lookup()`. 2820. DBUG_ASSERT(spc); 2821. 2822. *sp= sp_cache_lookup(spc, name); ^ 2823. 2824. if (*sp) #868 sql/sp_head.cc:1231: error: Uninitialized Value `saved_creation_ctx` is read without initialization. 1229. MEM_ROOT *user_var_events_alloc_saved= 0; 1230. Reprepare_observer *save_reprepare_observer= thd->m_reprepare_observer; 1231. Object_creation_ctx *UNINIT_VAR(saved_creation_ctx); ^ 1232. Diagnostics_area *da= thd->get_stmt_da(); 1233. Warning_info sp_wi(da->warning_info_id(), false, true); #869 sql/sp_head.cc:2049: error: Uninitialized Value `binlog_save_options` is read without initialization. 2047. Query_arena *call_arena) 2048. { 2049. ulonglong UNINIT_VAR(binlog_save_options); ^ 2050. bool need_binlog_call= FALSE; 2051. uint arg_no; #870 sql/sp_head.cc:2809: error: Dead Store The value written to `&n` is never used. 2807. // update count of cpop 2808. static_cast(bp->instr)->update_count(n); 2809. n= 1; ^ 2810. } 2811. li.remove(); #871 sql/sp_head.cc:2826: error: Dead Store The value written to `&n` is never used. 2824. // update count of cpop 2825. static_cast(bp->instr)->update_count(n); 2826. n= 1; ^ 2827. } 2828. li.remove(); #872 sql/sp_rcontext.cc:683: error: Null Dereference `ptable` could be null (from the call to `Field::virtual_tmp_table_addr()` on line 680) and is dereferenced. 681. DBUG_ASSERT(ptable); 682. DBUG_ASSERT(ptable[0]); 683. return ptable[0]; ^ 684. } 685. #873 sql/spatial.cc:1161: error: Uninitialized Value `num_of_points2` is read without initialization. 1159. g->num_geometries(&num_of_points2); 1160. DBUG_ASSERT(num_of_points2 >= 1); 1161. if (num_of_points2 == 1) ^ 1162. { 1163. *result= this->calculate_haversine(g, r, err); #874 sql/spatial.cc:1478: error: Uninitialized Value `prev_x` is read without initialization. 1476. uint32 n_points; 1477. double x, y; 1478. double UNINIT_VAR(prev_x), UNINIT_VAR(prev_y); ^ 1479. int first_point= 1; 1480. const char *data= m_data; #875 sql/spatial.cc:1478: error: Uninitialized Value `prev_y` is read without initialization. 1476. uint32 n_points; 1477. double x, y; 1478. double UNINIT_VAR(prev_x), UNINIT_VAR(prev_y); ^ 1479. int first_point= 1; 1480. const char *data= m_data; #876 sql/spatial.cc:1909: error: Uninitialized Value `res_area` is read without initialization. 1907. { 1908. uint32 n_linear_rings; 1909. double UNINIT_VAR(res_area); ^ 1910. double UNINIT_VAR(res_cx), UNINIT_VAR(res_cy); 1911. const char *data= m_data; #877 sql/spatial.cc:1910: error: Uninitialized Value `res_cx` is read without initialization. 1908. uint32 n_linear_rings; 1909. double UNINIT_VAR(res_area); 1910. double UNINIT_VAR(res_cx), UNINIT_VAR(res_cy); ^ 1911. const char *data= m_data; 1912. bool first_loop= 1; #878 sql/spatial.cc:1910: error: Uninitialized Value `res_cy` is read without initialization. 1908. uint32 n_linear_rings; 1909. double UNINIT_VAR(res_area); 1910. double UNINIT_VAR(res_cx), UNINIT_VAR(res_cy); ^ 1911. const char *data= m_data; 1912. bool first_loop= 1; #879 sql/spatial.cc:2373: error: Uninitialized Value `num_of_points2` is read without initialization. 2371. return 1; 2372. // Optimization for single Multipoint 2373. if (num_of_points2 == 1) ^ 2374. { 2375. *result= static_cast(temp)->calculate_haversine(g, r, err); #880 sql/sql_acl.cc:216: error: Uninitialized Value `dst` is read without initialization. 214. &dauth, sizeof(AUTH)*nauth, NULL)) 215. return 0; 216. *dst= *this; ^ 217. dst->user= safe_lexcstrdup_root(root, user); 218. dst->ssl_cipher= safe_strdup_root(root, ssl_cipher); #881 sql/sql_acl.cc:221: error: Uninitialized Value `dauth` is read without initialization. 219. dst->x509_issuer= safe_strdup_root(root, x509_issuer); 220. dst->x509_subject= safe_strdup_root(root, x509_subject); 221. dst->auth= dauth; ^ 222. for (uint i=0; i < nauth; i++, dauth++) 223. { #882 sql/sql_acl.cc:2338: error: Dead Store The value written to `&res` is never used. 2336. bool unlock_plugin= false; 2337. plugin_ref plugin= get_auth_plugin(thd, auth->plugin, &unlock_plugin); 2338. int res= 1; ^ 2339. 2340. mysql_mutex_assert_owner(&acl_cache->lock); #883 sql/sql_acl.cc:3307: error: Uninitialized Value `acl_user` is read without initialization. 3305. ACL_ROLE *role; 3306. ACL_USER_BASE *acl_user_base; 3307. ACL_USER *UNINIT_VAR(acl_user); ^ 3308. bool is_granted= FALSE; 3309. int result= 0; #884 sql/sql_acl.cc:4229: error: Dead Store The value written to `&save_binlog_format` is never used. 4227. bool clear_role= FALSE; 4228. char buff[512]; 4229. enum_binlog_format save_binlog_format= thd->get_current_stmt_binlog_format(); ^ 4230. const CSET_STRING query_save __attribute__((unused)) = thd->query_string; 4231. #885 sql/sql_acl.cc:8291: error: Dead Store The value written to `&sctx` is never used. 8289. TABLE_LIST *tl; 8290. TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table(); 8291. Security_context *sctx= thd->security_ctx; ^ 8292. uint i; 8293. privilege_t original_want_access(want_access); #886 sql/sql_acl.cc:8649: error: Uninitialized Value `grant_table` is read without initialization. 8647. const char* db_name= NULL; 8648. GRANT_INFO *grant; 8649. GRANT_TABLE *UNINIT_VAR(grant_table); ^ 8650. GRANT_TABLE *UNINIT_VAR(grant_table_role); 8651. /* #887 sql/sql_acl.cc:8650: error: Uninitialized Value `grant_table_role` is read without initialization. 8648. GRANT_INFO *grant; 8649. GRANT_TABLE *UNINIT_VAR(grant_table); 8650. GRANT_TABLE *UNINIT_VAR(grant_table_role); ^ 8651. /* 8652. Flag that gets set if privilege checking has to be performed on column #888 sql/sql_acl.cc:8785: error: Uninitialized Value `len2` is read without initialization. 8783. char helping [SAFE_NAME_LEN + USERNAME_LENGTH+2], *end; 8784. char helping2 [SAFE_NAME_LEN + USERNAME_LENGTH+2], *tmp_db; 8785. uint len, UNINIT_VAR(len2); ^ 8786. bool error= TRUE; 8787. #889 sql/sql_acl.cc:9167: error: Dead Store The value written to `&ssl_options` is never used. 9165. if (acl_user->ssl_cipher) 9166. { 9167. if (ssl_options++) ^ 9168. result->append(' '); 9169. result->append(STRING_WITH_LEN("CIPHER '")); #890 sql/sql_acl.cc:9460: error: Uninitialized Value `acl_user` is read without initialization. 9458. { 9459. int error = -1; 9460. ACL_USER *UNINIT_VAR(acl_user); ^ 9461. ACL_ROLE *acl_role= NULL; 9462. char buff[1024]; #891 sql/sql_acl.cc:9954: error: Null Dereference `hash` could be null (from the call to `Sp_handler::get_priv_hash()` on line 9952) and is dereferenced. 9952. HASH *hash= sph->get_priv_hash(); 9953. /* Add routine access */ 9954. for (index=0 ; index < hash->records ; index++) ^ 9955. { 9956. const char *user, *host; #892 sql/sql_acl.cc:10395: error: Uninitialized Value `user` is read without initialization. 10393. int elements; 10394. bool restart; 10395. const char *UNINIT_VAR(user); ^ 10396. const char *UNINIT_VAR(host); 10397. ACL_USER *acl_user= NULL; #893 sql/sql_acl.cc:10396: error: Uninitialized Value `host` is read without initialization. 10394. bool restart; 10395. const char *UNINIT_VAR(user); 10396. const char *UNINIT_VAR(host); ^ 10397. ACL_USER *acl_user= NULL; 10398. ACL_ROLE *acl_role= NULL; #894 sql/sql_acl.cc:10402: error: Uninitialized Value `role_grant_pair` is read without initialization. 10400. ACL_PROXY_USER *acl_proxy_user= NULL; 10401. GRANT_NAME *grant_name= NULL; 10402. ROLE_GRANT_PAIR *UNINIT_VAR(role_grant_pair); ^ 10403. HASH *grant_name_hash= NULL; 10404. HASH *roles_mappings_hash= NULL; #895 sql/sql_acl.cc:11417: error: Null Dereference `hash` could be null (from the call to `Sp_handler::get_priv_hash()` on line 11416) and is dereferenced. 11415. do { 11416. HASH *hash= sph->get_priv_hash(); 11417. for (counter= 0, revoked= 0 ; counter < hash->records ; ) ^ 11418. { 11419. const char *user,*host; #896 sql/sql_acl.cc:14375: error: Dead Store The value written to `&res` is never used. 14373. bool acl_authenticate(THD *thd, uint com_change_user_pkt_len) 14374. { 14375. int res= CR_OK; ^ 14376. MPVIO_EXT mpvio; 14377. enum enum_server_command command= com_change_user_pkt_len ? COM_CHANGE_USER #897 sql/sql_alter.cc:356: error: Dead Store The value written to `&it_rename_field` is never used. 354. { 355. List_iterator it_drop_field(drop_stat_fields); 356. List_iterator it_rename_field(rename_stat_fields); ^ 357. List_iterator it_drop_index(drop_stat_indexes); 358. List_iterator it_rename_index(rename_stat_indexes); #898 sql/sql_alter.cc:358: error: Dead Store The value written to `&it_rename_index` is never used. 356. List_iterator it_rename_field(rename_stat_fields); 357. List_iterator it_drop_index(drop_stat_indexes); 358. List_iterator it_rename_index(rename_stat_indexes); ^ 359. 360. while (Field *field= it_drop_field++) #899 sql/sql_audit.cc:335: error: Dead Store The value written to `&data` is never used. 333. static my_bool calc_class_mask(THD *thd, plugin_ref plugin, void *arg) 334. { 335. st_mysql_audit *data= plugin_data(plugin, struct st_mysql_audit *); ^ 336. if ((data= plugin_data(plugin, struct st_mysql_audit *))) 337. add_audit_mask((unsigned long *) arg, data->class_mask); #900 sql/sql_base.cc:2431: error: Uninitialized Value `_.str` is read without initialization. 2429. } 2430. 2431. memcpy((char*) db.str, table->s->db.str, db.length + 1); ^ 2432. memcpy((char*) table_name.str, table->s->table_name.str, 2433. table_name.length + 1); #901 sql/sql_base.cc:2432: error: Uninitialized Value `_.str` is read without initialization. 2430. 2431. memcpy((char*) db.str, table->s->db.str, db.length + 1); 2432. memcpy((char*) table_name.str, table->s->table_name.str, ^ 2433. table_name.length + 1); 2434. memcpy((char*) alias.str, table->alias.c_ptr(), alias.length + 1); #902 sql/sql_base.cc:2434: error: Uninitialized Value `_.str` is read without initialization. 2432. memcpy((char*) table_name.str, table->s->table_name.str, 2433. table_name.length + 1); 2434. memcpy((char*) alias.str, table->alias.c_ptr(), alias.length + 1); ^ 2435. dst_table_list->init_one_table(&db, &table_name, 2436. &alias, table->reginfo.lock_type); #903 sql/sql_base.cc:2435: error: Uninitialized Value `dst_table_list` is read without initialization. 2433. table_name.length + 1); 2434. memcpy((char*) alias.str, table->alias.c_ptr(), alias.length + 1); 2435. dst_table_list->init_one_table(&db, &table_name, ^ 2436. &alias, table->reginfo.lock_type); 2437. dst_table_list->table= table; #904 sql/sql_base.cc:3055: error: Dead Store The value written to `&err` is never used. 3053. TABLE not_used; 3054. TABLE_SHARE *share; 3055. bool err= TRUE; ^ 3056. 3057. if (!(share= tdc_acquire_share(thd, table_list, GTS_VIEW))) #905 sql/sql_base.cc:6009: error: Dead Store The value written to `&found_field` is never used. 6007. field_it(*(table_ref->join_columns)); 6008. Natural_join_column *nj_col, *curr_nj_col; 6009. Field *UNINIT_VAR(found_field); ^ 6010. Query_arena *UNINIT_VAR(arena), backup; 6011. DBUG_ENTER("find_field_in_natural_join"); #906 sql/sql_base.cc:6009: error: Uninitialized Value `found_field` is read without initialization. 6007. field_it(*(table_ref->join_columns)); 6008. Natural_join_column *nj_col, *curr_nj_col; 6009. Field *UNINIT_VAR(found_field); ^ 6010. Query_arena *UNINIT_VAR(arena), backup; 6011. DBUG_ENTER("find_field_in_natural_join"); #907 sql/sql_base.cc:6010: error: Uninitialized Value `arena` is read without initialization. 6008. Natural_join_column *nj_col, *curr_nj_col; 6009. Field *UNINIT_VAR(found_field); 6010. Query_arena *UNINIT_VAR(arena), backup; ^ 6011. DBUG_ENTER("find_field_in_natural_join"); 6012. DBUG_PRINT("enter", ("field name: '%s', ref %p", #908 sql/sql_base.cc:7325: error: Dead Store The value written to `&result` is never used. 7323. Natural_join_column *nj_col_1, *nj_col_2; 7324. Query_arena *arena, backup; 7325. bool result= TRUE; ^ 7326. List *non_join_columns; 7327. List *join_columns; #909 sql/sql_base.cc:8965: error: Dead Store The value written to `&tbl_list` is never used. 8963. { 8964. List_iterator_fast v(values); 8965. List tbl_list; ^ 8966. Item *value; 8967. Field *field; #910 sql/sql_base.cc:9190: error: Dead Store The value written to `&lj` is never used. 9188. { 9189. List_iterator li(*(select_lex->ftfunc_list)), 9190. lj(*(select_lex->ftfunc_list)); ^ 9191. Item_func_match *ftf; 9192. #911 sql/sql_bootstrap.cc:82: error: Null Dereference `len` could be null (null value originating from line 44) and is dereferenced. 80. all the time before reading line[x], in the code below. 81. */ 82. line_buffer[len]= '\0'; ^ 83. 84. /* Skip blank lines */ #912 sql/sql_bootstrap.cc:82: error: Null Dereference `line_buffer` could be null (null value originating from line 44) and is dereferenced. 80. all the time before reading line[x], in the code below. 81. */ 82. line_buffer[len]= '\0'; ^ 83. 84. /* Skip blank lines */ #913 sql/sql_cache.cc:3750: error: Dead Store The value written to `&i` is never used. 3748. else 3749. { 3750. uint i = start + 1; ^ 3751. /* bins[mem_bin_num].number contains 1 for easy end test */ 3752. for (i= start+1 ; bins[i].number == 0 ; i++) ; #914 sql/sql_cache.cc:4259: error: Dead Store The value written to `&ok` is never used. 4257. Query_cache_block *before = 0; 4258. size_t gap = 0; 4259. my_bool ok = 1; ^ 4260. Query_cache_block *block = first_block; 4261. DUMP(this); #915 sql/sql_connect.cc:133: error: Dead Store The value written to `&error` is never used. 131. int check_for_max_user_connections(THD *thd, USER_CONN *uc) 132. { 133. int error= 1; ^ 134. Host_errors errors; 135. DBUG_ENTER("check_for_max_user_connections"); #916 sql/sql_connect.cc:1230: error: Deadlock Potential self deadlock. `prepare_new_connection_state` locks `&(this->LOCK_thd_data.m_mutex)` in `class THD` twice. Additional report(s) on the same line were suppressed. 1228. !(sctx->master_access & PRIV_IGNORE_INIT_CONNECT)) 1229. { 1230. execute_init_command(thd, &opt_init_connect, &LOCK_sys_init_connect); ^ 1231. if (unlikely(thd->is_error())) 1232. { #917 sql/sql_connect.cc:1319: error: Deadlock Potential self deadlock. `thd_prepare_connection` locks `&(this->LOCK_thd_data.m_mutex)` in `class THD` twice. Additional report(s) on the same line were suppressed. 1317. (char *) thd->security_ctx->host_or_ip); 1318. 1319. prepare_new_connection_state(thd); ^ 1320. #ifdef WITH_WSREP 1321. thd->wsrep_client_thread= true; #918 sql/sql_cte.cc:1690: error: Dead Store The value written to `&li` is never used. 1688. if (column_list.elements) 1689. { 1690. List_iterator_fast li(column_list); ^ 1691. str->append('('); 1692. list_strlex_print(thd, str, &column_list); #919 sql/sql_cte.h:222: error: Unnecessary Copy Intermediate `list` is copied into field `column_list` but is not modified afterwards. Rather than copying into the field, move into it instead. 220. next_mutually_recursive(NULL), references(0), 221. referenced(false), is_used_in_query(false), 222. head(h), column_list(list), cycle_list(0), spec(unit), ^ 223. is_recursive(false), rec_outer_references(0), with_anchor(false), 224. level(0), rec_result(NULL) #920 sql/sql_db.cc:691: error: Uninitialized Value `create.schema_comment` is read without initialization during the call to `load_db_opt_by_name()`. 689. return thd->db_charset; 690. 691. load_db_opt_by_name(thd, db_name, &db_info); ^ 692. 693. /* #921 sql/sql_db.cc:1708: error: Dead Store The value written to `&db_access` is never used. 1706. 1707. Security_context *sctx= thd->security_ctx; 1708. privilege_t db_access(sctx->db_access); ^ 1709. CHARSET_INFO *db_default_cl; 1710. DBUG_ENTER("mysql_change_db"); #922 sql/sql_digest.cc:446: error: Dead Store The value written to `&token` is never used. 444. TOK_GENERIC_VALUE := (UNARY_PLUS | UNARY_MINUS) TOK_GENERIC_VALUE 445. */ 446. token= TOK_GENERIC_VALUE; ^ 447. digest_storage->m_byte_count-= SIZE_OF_A_TOKEN; 448. found_unary= true; #923 sql/sql_explain.cc:614: error: Dead Store The value written to `&guard` is never used. 612. Json_writer *writer, bool is_analyze) 613. { 614. Json_writer_nesting_guard guard(writer); ^ 615. char table_name_buffer[SAFE_NAME_LEN]; 616. #924 sql/sql_explain.cc:726: error: Dead Store The value written to `&guard` is never used. 724. bool is_analyze) 725. { 726. Json_writer_nesting_guard guard(writer); ^ 727. 728. bool started= false; #925 sql/sql_explain.cc:945: error: Dead Store The value written to `&guard` is never used. 943. Json_writer *writer, bool is_analyze) 944. { 945. Json_writer_nesting_guard guard(writer); ^ 946. 947. bool started_cache= print_explain_json_cache(writer, is_analyze); #926 sql/sql_explain.cc:1142: error: Dead Store The value written to `&guard` is never used. 1140. bool is_analyze) 1141. { 1142. Json_writer_nesting_guard guard(writer); ^ 1143. for (uint i=0; i< n_join_tabs; i++) 1144. { #927 sql/sql_explain.cc:1713: error: Dead Store The value written to `&guard` is never used. 1711. bool is_analyze) 1712. { 1713. Json_writer_nesting_guard guard(writer); ^ 1714. writer->add_member("rowid_filter").start_object(); 1715. quick->print_json(writer); #928 sql/sql_explain.cc:1759: error: Dead Store The value written to `&guard` is never used. 1757. bool is_analyze) 1758. { 1759. Json_writer_nesting_guard guard(writer); ^ 1760. 1761. if (pre_join_sort) #929 sql/sql_explain.cc:2324: error: Dead Store The value written to `&guard` is never used. 2322. bool is_analyze) 2323. { 2324. Json_writer_nesting_guard guard(writer); ^ 2325. 2326. if (deleting_all_rows) #930 sql/sql_explain.cc:2442: error: Dead Store The value written to `&guard` is never used. 2440. bool is_analyze) 2441. { 2442. Json_writer_nesting_guard guard(writer); ^ 2443. 2444. writer->add_member("query_block").start_object(); #931 sql/sql_explain.cc:2651: error: Dead Store The value written to `&guard` is never used. 2649. Json_writer *writer, bool is_analyze) 2650. { 2651. Json_writer_nesting_guard guard(writer); ^ 2652. 2653. writer->add_member("query_block").start_object(); #932 sql/sql_get_diagnostics.cc:117: error: Null Dereference `srp` could be null (from the call to `Item::get_settable_routine_parameter()` on line 109) and is dereferenced. 115. 116. /* Set variable/parameter value. */ 117. rv= srp->set_value(thd, thd->spcont, value); ^ 118. 119. DBUG_RETURN(rv); #933 sql/sql_handler.cc:785: error: Uninitialized Value `key` is read without initialization. 783. int error, keyno; 784. uint num_rows; 785. uchar *UNINIT_VAR(key); ^ 786. MDL_deadlock_and_lock_abort_error_handler sql_handler_lock_error; 787. DBUG_ENTER("mysql_ha_read"); #934 sql/sql_insert.cc:376: error: Uninitialized Value `autoinc_mark` is read without initialization. 374. { 375. TABLE *table= insert_table_list->table; 376. my_bool UNINIT_VAR(autoinc_mark); ^ 377. 378. table->next_number_field_updated= FALSE; #935 sql/sql_insert.cc:2137: error: Dead Store The value written to `&insert_id_for_cur_row` is never used. 2135. */ 2136. prev_insert_id_for_cur_row= table->file->insert_id_for_cur_row; 2137. insert_id_for_cur_row= table->file->insert_id_for_cur_row= 0; ^ 2138. trg_error= (table->triggers && 2139. table->triggers->process_triggers(thd, TRG_EVENT_UPDATE, #936 sql/sql_insert.cc:2885: error: Uninitialized Value `copy_tmp` is read without initialization. 2883. 2884. /* Copy the TABLE object. */ 2885. copy= new (copy_tmp) TABLE; ^ 2886. *copy= *table; 2887. copy->vcol_refix_list.empty(); #937 sql/sql_insert.cc:2893: error: Uninitialized Value `field` is read without initialization. 2891. /* We don't need to change the file handler here */ 2892. /* Assign the pointers for the field pointers array and the record. */ 2893. copy->field= field; ^ 2894. copy->record[0]= record; 2895. memcpy((char*) copy->record[0], (char*) table->record[0], share->reclength); #938 sql/sql_insert.cc:2894: error: Uninitialized Value `record` is read without initialization. 2892. /* Assign the pointers for the field pointers array and the record. */ 2893. copy->field= field; 2894. copy->record[0]= record; ^ 2895. memcpy((char*) copy->record[0], (char*) table->record[0], share->reclength); 2896. if (share->default_fields || share->default_expressions) #939 sql/sql_insert.cc:2897: error: Uninitialized Value `default_fields` is read without initialization. 2895. memcpy((char*) copy->record[0], (char*) table->record[0], share->reclength); 2896. if (share->default_fields || share->default_expressions) 2897. copy->default_field= default_fields; ^ 2898. if (share->virtual_fields) 2899. copy->vfield= virtual_fields; #940 sql/sql_insert.cc:2899: error: Uninitialized Value `virtual_fields` is read without initialization. 2897. copy->default_field= default_fields; 2898. if (share->virtual_fields) 2899. copy->vfield= virtual_fields; ^ 2900. 2901. copy->expr_arena= NULL; #941 sql/sql_insert.cc:2963: error: Uninitialized Value `bitmap` is read without initialization. 2961. 2962. /* Adjust bitmaps */ 2963. copy->def_read_set.bitmap= (my_bitmap_map*) bitmap; ^ 2964. copy->def_write_set.bitmap= ((my_bitmap_map*) 2965. (bitmap + share->column_bitmap_size)); #942 sql/sql_insert.cc:3979: error: Dead Store The value written to `&arena` is never used. 3977. { 3978. /* Back up leaf_tables list. */ 3979. Query_arena *arena= thd->stmt_arena, backup; ^ 3980. arena= thd->activate_stmt_arena_if_needed(&backup); // For easier test 3981. #943 sql/sql_insert.cc:5119: error: Uninitialized Value `_.used_fields` is read without initialization. 5117. create_info.set(DDL_options_st::OPT_OR_REPLACE); 5118. /* Ensure we write ENGINE=xxx and CHARSET=... to binary log */ 5119. create_info.used_fields|= (HA_CREATE_USED_ENGINE | ^ 5120. HA_CREATE_USED_DEFAULT_CHARSET); 5121. /* Ensure we write all engine options to binary log */ #944 sql/sql_lex.cc:291: error: Uninitialized Value `rh` is read without initialization. 289. 290. item= new (thd->mem_root) 291. Item_splocal(thd, rh, &name, spvar->offset, spvar->type_handler(), ^ 292. pos_in_q, len_in_q); 293. #945 sql/sql_lex.cc:2021: error: Uninitialized Value `c` is read without initialization. 2019. int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd) 2020. { 2021. uchar UNINIT_VAR(c); ^ 2022. bool comment_closed; 2023. int tokval; #946 sql/sql_lex.cc:5373: error: Dead Store The value written to `&embedding` is never used. 5371. if (tl->table && !tl->is_view_or_derived()) 5372. { 5373. TABLE_LIST *embedding= tl->embedding; ^ 5374. for (embedding= tl->embedding; embedding; embedding=embedding->embedding) 5375. { #947 sql/sql_lex.cc:5809: error: Dead Store The value written to `&arena` is never used. 5807. return FALSE; 5808. 5809. Query_arena *arena= thd->stmt_arena, backup; ^ 5810. arena= thd->activate_stmt_arena_if_needed(&backup); 5811. //It is used for DETETE/UPDATE so top level has only one SELECT #948 sql/sql_lex.cc:7450: error: Use After Lifetime accessing `sp` that is the address of a stack variable `own_root` whose lifetime has ended during the call to `sp_head::create()` on line 7448. 7448. if (likely((sp= sp_head::create(package, sph, agg_type)))) 7449. { 7450. sp->reset_thd_mem_root(thd); ^ 7451. sp->init(this); 7452. if (name) #949 sql/sql_lex.cc:7646: error: Dead Store The value written to `&ip` is never used. 7644. if ((n= spcont->diff_cursors(ctx, exclusive))) 7645. { 7646. sp_instr_cpop *cpop= new (thd->mem_root) sp_instr_cpop(ip++, spcont, n); ^ 7647. if (unlikely(cpop == NULL) || unlikely(sphead->add_instr(cpop))) 7648. return true; #950 sql/sql_lex.cc:11063: error: Dead Store The value written to `&equalities` is never used. 11061. st_select_lex::build_pushable_cond_for_having_pushdown(THD *thd, Item *cond) 11062. { 11063. List equalities; ^ 11064. 11065. /* Condition can't be pushed */ #951 sql/sql_lex.cc:11168: error: Const Refable Parameter Function parameter `pair_list` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 11166. */ 11167. 11168. Field_pair *get_corresponding_field_pair(Item *item, ^ 11169. List pair_list) 11170. { #952 sql/sql_parse.cc:968: error: Deadlock Potential self deadlock. `execute_init_command` locks `&(this->LOCK_thd_data.m_mutex)` in `class THD` twice. Additional report(s) on the same line were suppressed. 966. thd->net.vio= 0; 967. thd->clear_error(1); 968. dispatch_command(COM_QUERY, thd, buf, (uint)len); ^ 969. thd->client_capabilities= save_client_capabilities; 970. thd->net.vio= save_vio; #953 sql/sql_parse.cc:1421: error: Deadlock Potential self deadlock. `do_command` locks `&(this->LOCK_thd_data.m_mutex)` in `class THD` twice. Additional report(s) on the same line were suppressed. 1419. 1420. resume: 1421. return_value= dispatch_command(command, thd, packet+1, ^ 1422. (uint) (packet_length-1), blocking); 1423. if (return_value == DISPATCH_COMMAND_WOULDBLOCK) #954 sql/sql_parse.cc:1700: error: Uninitialized Value `new_db_name.length` is read without initialization during the call to `mysql_change_db()`. 1698. thd->charset(), packet, packet_length))) 1699. break; 1700. if (!mysql_change_db(thd, &tmp, FALSE)) ^ 1701. { 1702. general_log_write(thd, command, thd->db.str, thd->db.length); #955 sql/sql_parse.cc:2256: error: Dead Store The value written to `&level` is never used. 2254. thd->lex->is_shutdown_wait_for_slaves= false; // "deferred" cleanup 2255. if (level == SHUTDOWN_DEFAULT) 2256. level= SHUTDOWN_WAIT_ALL_BUFFERS; // soon default will be configurable ^ 2257. else if (level != SHUTDOWN_WAIT_ALL_BUFFERS) 2258. { #956 sql/sql_parse.cc:8442: error: Dead Store The value written to `&previous_table_ref` is never used. 8440. } 8441. /* Store the table reference preceding the current one. */ 8442. TABLE_LIST *UNINIT_VAR(previous_table_ref); /* The table preceding the current one. */ ^ 8443. if (table_list.elements > 0 && likely(!ptr->sequence)) 8444. { #957 sql/sql_parse.cc:8442: error: Uninitialized Value `previous_table_ref` is read without initialization. 8440. } 8441. /* Store the table reference preceding the current one. */ 8442. TABLE_LIST *UNINIT_VAR(previous_table_ref); /* The table preceding the current one. */ ^ 8443. if (table_list.elements > 0 && likely(!ptr->sequence)) 8444. { #958 sql/sql_partition.cc:169: error: Const Refable Parameter Function parameter `list_names` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 167. */ 168. 169. static bool is_name_in_list(const char *name, List list_names) ^ 170. { 171. List_iterator names_it(list_names); #959 sql/sql_partition.cc:1298: error: Uninitialized Value `current_largest_col_val` is read without initialization. 1296. { 1297. part_column_list_val *loc_range_col_array; 1298. part_column_list_val *UNINIT_VAR(current_largest_col_val); ^ 1299. uint num_column_values= part_info->part_field_list.elements; 1300. uint size_entries= sizeof(part_column_list_val) * num_column_values; #960 sql/sql_partition.cc:1333: error: Uninitialized Value `current_largest` is read without initialization. 1331. else 1332. { 1333. longlong UNINIT_VAR(current_largest); ^ 1334. longlong part_range_value; 1335. bool signed_flag= !part_info->part_expr->unsigned_flag; #961 sql/sql_partition.cc:1408: error: Uninitialized Value `prev_value` is read without initialization. 1406. longlong type_add, calc_value; 1407. void *curr_value; 1408. void *UNINIT_VAR(prev_value); ^ 1409. partition_element* part_def; 1410. bool found_null= FALSE; #962 sql/sql_partition.cc:2101: error: Const Refable Parameter Function parameter `field_list` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 2099. */ 2100. 2101. static int add_part_field_list(THD *thd, String *str, List field_list) ^ 2102. { 2103. int err= 0; #963 sql/sql_partition.cc:3196: error: Uninitialized Value `part_func_value` is read without initialization. 3194. goto notfound; 3195. } 3196. *func_value= part_func_value; ^ 3197. if (unsigned_flag) 3198. part_func_value-= 0x8000000000000000ULL; #964 sql/sql_partition.cc:3494: error: Uninitialized Value `part_func_value` is read without initialization. 3492. DBUG_RETURN(0); 3493. } 3494. *func_value= part_func_value; ^ 3495. if (unsigned_flag) 3496. part_func_value-= 0x8000000000000000ULL; #965 sql/sql_partition.cc:3770: error: Uninitialized Value `func_value` is read without initialization during the call to `get_part_id_hash()`. 3768. { 3769. longlong func_value; 3770. return get_part_id_hash(part_info->num_subparts, part_info->subpart_expr, ^ 3771. part_id, &func_value); 3772. } #966 sql/sql_partition.cc:3779: error: Uninitialized Value `func_value` is read without initialization during the call to `get_part_id_linear_hash()`. 3777. { 3778. longlong func_value; 3779. return get_part_id_linear_hash(part_info, part_info->num_subparts, ^ 3780. part_info->subpart_expr, part_id, 3781. &func_value); #967 sql/sql_partition.cc:6127: error: Dead Store The value written to `&part_it` is never used. 6125. char path[FN_REFLEN+1]; 6126. partition_info *part_info= lpt->table->part_info; 6127. List_iterator part_it(part_info->partitions); ^ 6128. int error; 6129. DBUG_ENTER("mysql_drop_partitions"); #968 sql/sql_partition.cc:8041: error: Dead Store The value written to `&get_col_endpoint` is never used. 8039. bool can_match_multiple_values; 8040. uint32 nparts; 8041. get_col_endpoint_func UNINIT_VAR(get_col_endpoint); ^ 8042. uint full_length= 0; 8043. DBUG_ENTER("get_part_iter_for_interval_cols_via_map"); #969 sql/sql_partition.cc:8041: error: Uninitialized Value `get_col_endpoint` is read without initialization. 8039. bool can_match_multiple_values; 8040. uint32 nparts; 8041. get_col_endpoint_func UNINIT_VAR(get_col_endpoint); ^ 8042. uint full_length= 0; 8043. DBUG_ENTER("get_part_iter_for_interval_cols_via_map"); #970 sql/sql_partition.cc:8166: error: Dead Store The value written to `&max_endpoint_val` is never used. 8164. { 8165. Field *field= part_info->part_field_array[0]; 8166. uint32 UNINIT_VAR(max_endpoint_val); ^ 8167. get_endpoint_func UNINIT_VAR(get_endpoint); 8168. bool can_match_multiple_values; /* is not '=' */ #971 sql/sql_partition.cc:8166: error: Uninitialized Value `max_endpoint_val` is read without initialization. 8164. { 8165. Field *field= part_info->part_field_array[0]; 8166. uint32 UNINIT_VAR(max_endpoint_val); ^ 8167. get_endpoint_func UNINIT_VAR(get_endpoint); 8168. bool can_match_multiple_values; /* is not '=' */ #972 sql/sql_partition.cc:8167: error: Dead Store The value written to `&get_endpoint` is never used. 8165. Field *field= part_info->part_field_array[0]; 8166. uint32 UNINIT_VAR(max_endpoint_val); 8167. get_endpoint_func UNINIT_VAR(get_endpoint); ^ 8168. bool can_match_multiple_values; /* is not '=' */ 8169. uint field_len= field->pack_length_in_rec(); #973 sql/sql_partition.cc:8167: error: Uninitialized Value `get_endpoint` is read without initialization. 8165. Field *field= part_info->part_field_array[0]; 8166. uint32 UNINIT_VAR(max_endpoint_val); 8167. get_endpoint_func UNINIT_VAR(get_endpoint); ^ 8168. bool can_match_multiple_values; /* is not '=' */ 8169. uint field_len= field->pack_length_in_rec(); #974 sql/sql_plugin.cc:1490: error: Dead Store The value written to `&ret` is never used. 1488. int *argc, char **argv, bool options_only) 1489. { 1490. int ret= 1; ^ 1491. DBUG_ENTER("plugin_initialize"); 1492. #975 sql/sql_plugin.cc:2736: error: Uninitialized Value `optp.block_size` is read without initialization during the call to `getopt_ll_limit_value()`. 2734. if ((fixed1= (value->is_unsigned(value) && val < 0))) 2735. val=LONGLONG_MAX; 2736. *(int *)save= (int) getopt_ll_limit_value(val, &options, &fixed2); ^ 2737. } 2738. #976 sql/sql_plugin.cc:2765: error: Uninitialized Value `optp.block_size` is read without initialization during the call to `getopt_ll_limit_value()`. 2763. if ((fixed1= (value->is_unsigned(value) && val < 0))) 2764. val=LONGLONG_MAX; 2765. *(long *)save= (long) getopt_ll_limit_value(val, &options, &fixed2); ^ 2766. } 2767. #977 sql/sql_plugin.cc:2794: error: Uninitialized Value `optp.block_size` is read without initialization during the call to `getopt_ll_limit_value()`. 2792. if ((fixed1= (value->is_unsigned(value) && val < 0))) 2793. val=LONGLONG_MAX; 2794. *(longlong *)save= getopt_ll_limit_value(val, &options, &fixed2); ^ 2795. } 2796. #978 sql/sql_plugin.cc:3842: error: Uninitialized Value `offset` is read without initialization. 3840. char *optname; 3841. 3842. int index= 0, UNINIT_VAR(offset); ^ 3843. st_mysql_sys_var *opt, **plugin_option; 3844. st_bookmark *v; #979 sql/sql_plugin.cc:4401: error: Null Dereference `pvar` could be null (from the call to `sys_var::cast_pluginvar()` on line 4400) and is dereferenced. 4399. { 4400. sys_var_pluginvar *pvar=var->cast_pluginvar(); 4401. if (pvar->plugin_var == plugin_var) ^ 4402. return var; 4403. } #980 sql/sql_prepare.cc:585: error: Uninitialized Value `__param_0.time_type` is read without initialization during the call to `Item_param::set_time()`. 583. else 584. set_zero_time(&tm, MYSQL_TIMESTAMP_TIME); 585. set_time(&tm, MYSQL_TIMESTAMP_TIME, MAX_TIME_FULL_WIDTH); ^ 586. *pos+= length; 587. } #981 sql/sql_prepare.cc:615: error: Uninitialized Value `__param_0.time_type` is read without initialization during the call to `Item_param::set_time()`. 613. else 614. set_zero_time(&tm, MYSQL_TIMESTAMP_DATETIME); 615. set_time(&tm, MYSQL_TIMESTAMP_DATETIME, MAX_DATETIME_WIDTH); ^ 616. *pos+= length; 617. } #982 sql/sql_prepare.cc:639: error: Uninitialized Value `__param_0.time_type` is read without initialization during the call to `Item_param::set_time()`. 637. else 638. set_zero_time(&tm, MYSQL_TIMESTAMP_DATE); 639. set_time(&tm, MYSQL_TIMESTAMP_DATE, MAX_DATE_WIDTH); ^ 640. *pos+= length; 641. } #983 sql/sql_profile.cc:65: error: Static Initialization Order Fiasco Initializer of Show::query_profile_statistics_info accesses global variable from a different translation unit: type_handler_varchar|. 63. namespace Show { 64. 65. ST_FIELD_INFO query_profile_statistics_info[]= ^ 66. { 67. Column("QUERY_ID", SLong(20), NOT_NULL, "Query_id"), #984 sql/sql_profile.cc:232: error: Dead Store The value written to `&cursor` is never used. 230. strcpy(cursor, file_arg); 231. file= cursor; 232. cursor+= sizes[2]; ^ 233. } 234. else #985 sql/sql_rename.cc:342: error: Dead Store The value written to `&rc` is never used. 340. bool skip_error, bool *force_if_exists) 341. { 342. int rc= 1; ^ 343. handlerton *hton; 344. LEX_CSTRING *old_alias, *new_alias; #986 sql/sql_repl.cc:2069: error: Dead Store The value written to `&file` is never used. 2067. { 2068. IO_CACHE log; 2069. File file= -1; ^ 2070. 2071. /** check that requested position is inside of file */ #987 sql/sql_repl.cc:4824: error: Dead Store The value written to `&res` is never used. 4822. 4823. int compare_log_name(const char *log_1, const char *log_2) { 4824. int res= 1; ^ 4825. const char *ext1_str= strrchr(log_1, '.'); 4826. const char *ext2_str= strrchr(log_2, '.'); #988 sql/sql_select.cc:3592: error: Dead Store The value written to `&keep_row_order` is never used. 3590. bool distinct= false; 3591. const bool has_group_by= this->group; 3592. bool keep_row_order= thd->lex->with_rownum && (group_list || order); ^ 3593. bool is_having_added_as_table_cond= false; 3594. DBUG_ENTER("JOIN::make_aggr_tables_info"); #989 sql/sql_select.cc:5397: error: Dead Store The value written to `&table` is never used. 5395. { 5396. int error= 0; 5397. TABLE *UNINIT_VAR(table); /* inited in all loops */ ^ 5398. uint i,table_count,const_count,key; 5399. table_map found_const_table_map, all_table_map; #990 sql/sql_select.cc:5397: error: Uninitialized Value `table` is read without initialization. 5395. { 5396. int error= 0; 5397. TABLE *UNINIT_VAR(table); /* inited in all loops */ ^ 5398. uint i,table_count,const_count,key; 5399. table_map found_const_table_map, all_table_map; #991 sql/sql_select.cc:5432: error: Uninitialized Value `stat` is read without initialization. 5430. 5431. /* The following should be optimized to only clear critical things */ 5432. bzero((void*)stat, sizeof(JOIN_TAB)* table_count); ^ 5433. join->top_join_tab_count= table_count; 5434. #992 sql/sql_select.cc:5439: error: Uninitialized Value `stat_vector` is read without initialization. 5437. (void) new ((char*) (join->positions + i)) POSITION; 5438. 5439. join->best_ref= stat_vector; ^ 5440. 5441. stat_end=stat+table_count; #993 sql/sql_select.cc:5442: error: Dead Store The value written to `&found_const_table_map` is never used. 5440. 5441. stat_end=stat+table_count; 5442. found_const_table_map= all_table_map=0; ^ 5443. const_count=0; 5444. #994 sql/sql_select.cc:5449: error: Uninitialized Value `table_vector` is read without initialization. 5447. TABLE_LIST *embedding= tables->embedding; 5448. stat_vector[i]=s; 5449. table_vector[i]=s->table=table=tables->table; ^ 5450. s->tab_list= tables; 5451. table->pos_in_table_list= tables; #995 sql/sql_select.cc:6096: error: Uninitialized Value `stat_ref` is read without initialization. 6094. join->join_tab=stat; 6095. join->top_join_tab_count= table_count; 6096. join->map2table=stat_ref; ^ 6097. join->table= table_vector; 6098. join->const_tables=const_count; #996 sql/sql_select.cc:6097: error: Uninitialized Value `table_vector` is read without initialization. 6095. join->top_join_tab_count= table_count; 6096. join->map2table=stat_ref; 6097. join->table= table_vector; ^ 6098. join->const_tables=const_count; 6099. join->found_const_table_map=found_const_table_map; #997 sql/sql_select.cc:10603: error: Uninitialized Value `best_key_parts` is read without initialization. 10601. */ 10602. int best_key= -1; 10603. uint UNINIT_VAR(best_key_parts); ^ 10604. uint saved_best_key_parts= 0; 10605. int best_key_direction= 0; #998 sql/sql_select.cc:11835: error: Dead Store The value written to `&aggr_tables` is never used. 11833. 11834. if (aggr_tables > 2) 11835. aggr_tables= 2; ^ 11836. 11837. full_join=0; #999 sql/sql_select.cc:15782: error: Uninitialized Value `first_table` is read without initialization. 15780. 15781. ORDER *order,**prev_ptr, *tmp_order; 15782. table_map UNINIT_VAR(first_table); /* protected by first_is_base_table */ ^ 15783. table_map not_const_tables= ~join->const_table_map; 15784. table_map ref; #1000 sql/sql_select.cc:16791: error: Uninitialized Value `cond_equal.max_members` is read without initialization during the call to `COND_EQUAL::copy()`. 16789. } 16790. 16791. m_cond_equal.copy(cond_equal); ^ 16792. cond_equal.current_level= m_cond_equal.current_level; 16793. inherited= &m_cond_equal; #1001 sql/sql_select.cc:19288: error: Dead Store The value written to `&cond` is never used. 19286. return this; 19287. 19288. COND *cond= this; ^ 19289. if (field->table->pos_in_table_list->is_inner_table_of_outer_join()) 19290. { #1002 sql/sql_select.cc:19549: error: Dead Store The value written to `&new_field` is never used. 19547. Field *Item_sum::create_tmp_field(MEM_ROOT *root, bool group, TABLE *table) 19548. { 19549. Field *UNINIT_VAR(new_field); ^ 19550. 19551. switch (cmp_type()) { #1003 sql/sql_select.cc:19549: error: Uninitialized Value `new_field` is read without initialization. 19547. Field *Item_sum::create_tmp_field(MEM_ROOT *root, bool group, TABLE *table) 19548. { 19549. Field *UNINIT_VAR(new_field); ^ 19550. 19551. switch (cmp_type()) { #1004 sql/sql_select.cc:20087: error: Uninitialized Value `tmpname` is read without initialization. 20085. DBUG_RETURN(NULL); /* purecov: inspected */ 20086. } 20087. strmov(tmpname, path); ^ 20088. /* make table according to fields */ 20089. #1005 sql/sql_select.cc:20090: error: Uninitialized Value `table` is read without initialization. 20088. /* make table according to fields */ 20089. 20090. bzero((char*) table,sizeof(*table)); ^ 20091. bzero((char*) reg_field, sizeof(Field*) * (field_count+1)); 20092. bzero((char*) m_default_field, sizeof(Field*) * (field_count)); #1006 sql/sql_select.cc:20091: error: Uninitialized Value `reg_field` is read without initialization. 20089. 20090. bzero((char*) table,sizeof(*table)); 20091. bzero((char*) reg_field, sizeof(Field*) * (field_count+1)); ^ 20092. bzero((char*) m_default_field, sizeof(Field*) * (field_count)); 20093. bzero((char*) m_from_field, sizeof(Field*) * field_count); #1007 sql/sql_select.cc:20095: error: Uninitialized Value `const_key_parts` is read without initialization. 20093. bzero((char*) m_from_field, sizeof(Field*) * field_count); 20094. /* const_key_parts is used in sort_and_filter_keyuse */ 20095. bzero((char*) const_key_parts, sizeof(*const_key_parts)); ^ 20096. 20097. table->mem_root= own_root; #1008 sql/sql_select.cc:20114: error: Uninitialized Value `share` is read without initialization. 20112. table->expr_arena= thd; 20113. 20114. table->s= share; ^ 20115. init_tmp_table_share(thd, share, "", 0, "(temporary)", tmpname); 20116. share->blob_field= blob_field; #1009 sql/sql_select.cc:20116: error: Uninitialized Value `blob_field` is read without initialization. 20114. table->s= share; 20115. init_tmp_table_share(thd, share, "", 0, "(temporary)", tmpname); 20116. share->blob_field= blob_field; ^ 20117. share->table_charset= param->table_charset; 20118. share->primary_key= MAX_KEY; // Indicate no primary key #1010 sql/sql_select.cc:20915: error: Uninitialized Value `this.m_default_field` is read without initialization during the call to `Create_tmp_table::start()`. 20913. Create_tmp_table maker(group, distinct, save_sum_fields, select_options, 20914. rows_limit); 20915. if (!(table= maker.start(thd, param, table_alias)) || ^ 20916. maker.add_fields(thd, table, param, fields) || 20917. maker.finalize(thd, table, param, do_not_open, keep_row_order)) #1011 sql/sql_select.cc:20916: error: Uninitialized Value `maker.m_from_field` is read without initialization during the call to `Create_tmp_table::add_fields()`. 20914. rows_limit); 20915. if (!(table= maker.start(thd, param, table_alias)) || 20916. maker.add_fields(thd, table, param, fields) || ^ 20917. maker.finalize(thd, table, param, do_not_open, keep_row_order)) 20918. { #1012 sql/sql_select.cc:20967: error: Uninitialized Value `blob_field` is read without initialization. 20965. DBUG_RETURN(true); 20966. s->reset(); 20967. s->blob_field= blob_field; ^ 20968. setup_tmp_table_column_bitmaps(this, bitmaps, field_count); 20969. m_alloced_field_count= field_count; #1013 sql/sql_select.cc:20968: error: Uninitialized Value `bitmaps` is read without initialization. 20966. s->reset(); 20967. s->blob_field= blob_field; 20968. setup_tmp_table_column_bitmaps(this, bitmaps, field_count); ^ 20969. m_alloced_field_count= field_count; 20970. DBUG_RETURN(false); #1014 sql/sql_select.cc:25339: error: Uninitialized Value `ref_key_parts` is read without initialization. 25337. { 25338. int ref_key; 25339. uint UNINIT_VAR(ref_key_parts); ^ 25340. int order_direction= 0; 25341. uint used_key_parts= 0; #1015 sql/sql_select.cc:25559: error: Uninitialized Value `best_key_parts` is read without initialization. 25557. */ 25558. { 25559. uint UNINIT_VAR(best_key_parts); ^ 25560. uint saved_best_key_parts= 0; 25561. int best_key_direction= 0; #1016 sql/sql_select.cc:28039: error: Uninitialized Value `cond_copy` is read without initialization. 28037. if (join_tab->select) 28038. { 28039. Item *UNINIT_VAR(cond_copy); ^ 28040. if (join_tab->select->pre_idx_push_select_cond) 28041. cond_copy= cond->copy_andor_structure(thd); #1017 sql/sql_select.cc:30550: error: Uninitialized Value `array.malloc_flags` is read without initialization during the call to `delete_dynamic()`. 30548. ~outer_join, select_lex, &sargables)) 30549. { 30550. delete_dynamic(&added_keyuse); ^ 30551. return REOPT_ERROR; 30552. } #1018 sql/sql_sequence.cc:56: error: Static Initialization Order Fiasco Initializer of sequence_structure accesses global variable from a different translation unit: type_handler_slonglong|. 54. #define FL (NOT_NULL_FLAG | NO_DEFAULT_VALUE_FLAG) 55. 56. static Field_definition sequence_structure[]= ^ 57. { 58. {"next_not_cached_value", 21, &type_handler_slonglong, #1019 sql/sql_servers.cc:336: error: Dead Store The value written to `&return_val` is never used. 334. { 335. TABLE_LIST tables[1]; 336. bool return_val= TRUE; ^ 337. DBUG_ENTER("servers_reload"); 338. #1020 sql/sql_servers.cc:659: error: Dead Store The value written to `&error` is never used. 657. { 658. table->file->print_error(error, MYF(0)); 659. error= 1; ^ 660. } 661. /* store each field to be inserted */ #1021 sql/sql_show.cc:554: error: Dead Store The value written to `&privilege` is never used. 552. DBUG_RETURN(TRUE); 553. 554. show_privileges_st *privilege= sys_privileges; ^ 555. for (privilege= sys_privileges; privilege->privilege ; privilege++) 556. { #1022 sql/sql_show.cc:666: error: Uninitialized Value `new_elt` is read without initialization. 664. NullS)) 665. return true; 666. new_elt->str= new_elt_buffer; ^ 667. memcpy(new_elt_buffer, path, path_len); 668. new_elt_buffer[path_len]= 0; #1023 sql/sql_show.cc:666: error: Uninitialized Value `new_elt_buffer` is read without initialization. 664. NullS)) 665. return true; 666. new_elt->str= new_elt_buffer; ^ 667. memcpy(new_elt_buffer, path, path_len); 668. new_elt_buffer[path_len]= 0; #1024 sql/sql_show.cc:748: error: Uninitialized Value `new_entry_buf` is read without initialization. 746. return; 747. 748. memcpy(new_entry_buf, dirname_arg, len+1); ^ 749. new_entry->str = new_entry_buf; 750. new_entry->length= len; #1025 sql/sql_show.cc:749: error: Uninitialized Value `new_entry` is read without initialization. 747. 748. memcpy(new_entry_buf, dirname_arg, len+1); 749. new_entry->str = new_entry_buf; ^ 750. new_entry->length= len; 751. #1026 sql/sql_show.cc:1322: error: Dead Store The value written to `&archive` is never used. 1320. MDL_savepoint mdl_savepoint= thd->mdl_context.mdl_savepoint(); 1321. 1322. TABLE_LIST archive; ^ 1323. 1324. if (mysqld_show_create_get_fields(thd, table_list, &field_list, &buffer)) #1027 sql/sql_show.cc:1437: error: Uninitialized Value `create.schema_comment` is read without initialization during the call to `load_db_opt_by_name()`. 1435. } 1436. 1437. load_db_opt_by_name(thd, dbname->str, &create); ^ 1438. } 1439. #1028 sql/sql_show.cc:2074: error: Dead Store The value written to `&field_list` is never used. 2072. enum_with_db_name with_db_name) 2073. { 2074. List field_list; ^ 2075. char tmp[MAX_FIELD_WIDTH], *for_str, def_value_buf[MAX_FIELD_WIDTH]; 2076. LEX_CSTRING alias; #1029 sql/sql_show.cc:5502: error: Uninitialized Value `create.schema_comment` is read without initialization during the call to `load_db_opt_by_name()`. 5500. #endif 5501. { 5502. load_db_opt_by_name(thd, db_name->str, &create); ^ 5503. if (store_schema_schemata(thd, table, db_name, 5504. create.default_table_charset, #1030 sql/sql_show.cc:9201: error: Static Initialization Order Fiasco Initializer of Show::schema_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9199. namespace Show { 9200. 9201. ST_FIELD_INFO schema_fields_info[]= ^ 9202. { 9203. Column("CATALOG_NAME", Catalog(), NOT_NULL), #1031 sql/sql_show.cc:9213: error: Static Initialization Order Fiasco Initializer of Show::tables_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9211. 9212. 9213. ST_FIELD_INFO tables_fields_info[]= ^ 9214. { 9215. Column("TABLE_CATALOG", Catalog(), NOT_NULL), #1032 sql/sql_show.cc:9248: error: Static Initialization Order Fiasco Initializer of Show::columns_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9246. 9247. 9248. ST_FIELD_INFO columns_fields_info[]= ^ 9249. { 9250. Column("TABLE_CATALOG", Catalog(), NOT_NULL, OPEN_FRM_ONLY), #1033 sql/sql_show.cc:9279: error: Static Initialization Order Fiasco Initializer of Show::charsets_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9277. 9278. 9279. ST_FIELD_INFO charsets_fields_info[]= ^ 9280. { 9281. Column("CHARACTER_SET_NAME", CSName(), NOT_NULL, "Charset"), #1034 sql/sql_show.cc:9289: error: Static Initialization Order Fiasco Initializer of Show::collation_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9287. 9288. 9289. ST_FIELD_INFO collation_fields_info[]= ^ 9290. { 9291. Column("COLLATION_NAME", CSName(), NOT_NULL, "Collation"), #1035 sql/sql_show.cc:9301: error: Static Initialization Order Fiasco Initializer of Show::applicable_roles_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9299. 9300. 9301. ST_FIELD_INFO applicable_roles_fields_info[]= ^ 9302. { 9303. Column("GRANTEE", Userhost(), NOT_NULL), #1036 sql/sql_show.cc:9311: error: Static Initialization Order Fiasco Initializer of Show::enabled_roles_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9309. 9310. 9311. ST_FIELD_INFO enabled_roles_fields_info[]= ^ 9312. { 9313. Column("ROLE_NAME", Varchar(USERNAME_CHAR_LENGTH), NULLABLE), #1037 sql/sql_show.cc:9317: error: Static Initialization Order Fiasco Initializer of Show::keywords_field_info accesses global variable from a different translation unit: type_handler_varchar|. 9315. }; 9316. 9317. ST_FIELD_INFO keywords_field_info[]= ^ 9318. { 9319. Column("WORD", Varchar(KEYWORD_SIZE), NULLABLE), #1038 sql/sql_show.cc:9323: error: Static Initialization Order Fiasco Initializer of Show::sql_functions_field_info accesses global variable from a different translation unit: type_handler_varchar|. 9321. }; 9322. 9323. ST_FIELD_INFO sql_functions_field_info[]= ^ 9324. { 9325. Column("FUNCTION", Varchar(KEYWORD_SIZE), NULLABLE), #1039 sql/sql_show.cc:9330: error: Static Initialization Order Fiasco Initializer of Show::engines_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9328. 9329. 9330. ST_FIELD_INFO engines_fields_info[]= ^ 9331. { 9332. Column("ENGINE", Varchar(64), NOT_NULL, "Engine"), #1040 sql/sql_show.cc:9342: error: Static Initialization Order Fiasco Initializer of Show::events_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9340. 9341. 9342. ST_FIELD_INFO events_fields_info[]= ^ 9343. { 9344. // QQ: shouldn't EVENT_CATALOG be Catalog() like in all other places? #1041 sql/sql_show.cc:9374: error: Static Initialization Order Fiasco Initializer of Show::coll_charset_app_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9372. 9373. 9374. ST_FIELD_INFO coll_charset_app_fields_info[]= ^ 9375. { 9376. Column("COLLATION_NAME", CSName(), NOT_NULL), #1042 sql/sql_show.cc:9382: error: Static Initialization Order Fiasco Initializer of Show::proc_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9380. 9381. 9382. ST_FIELD_INFO proc_fields_info[]= ^ 9383. { 9384. Column("SPECIFIC_NAME", Name(), NOT_NULL), #1043 sql/sql_show.cc:9419: error: Static Initialization Order Fiasco Initializer of Show::stat_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9417. 9418. 9419. ST_FIELD_INFO stat_fields_info[]= ^ 9420. { 9421. Column("TABLE_CATALOG", Catalog(), NOT_NULL, OPEN_FRM_ONLY), #1044 sql/sql_show.cc:9443: error: Static Initialization Order Fiasco Initializer of Show::view_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9441. 9442. 9443. ST_FIELD_INFO view_fields_info[]= ^ 9444. { 9445. Column("TABLE_CATALOG", Catalog(), NOT_NULL, OPEN_FRM_ONLY), #1045 sql/sql_show.cc:9460: error: Static Initialization Order Fiasco Initializer of Show::user_privileges_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9458. 9459. 9460. ST_FIELD_INFO user_privileges_fields_info[]= ^ 9461. { 9462. Column("GRANTEE", Userhost(), NOT_NULL), #1046 sql/sql_show.cc:9470: error: Static Initialization Order Fiasco Initializer of Show::schema_privileges_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9468. 9469. 9470. ST_FIELD_INFO schema_privileges_fields_info[]= ^ 9471. { 9472. Column("GRANTEE", Userhost(), NOT_NULL), #1047 sql/sql_show.cc:9481: error: Static Initialization Order Fiasco Initializer of Show::table_privileges_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9479. 9480. 9481. ST_FIELD_INFO table_privileges_fields_info[]= ^ 9482. { 9483. Column("GRANTEE", Userhost(), NOT_NULL), #1048 sql/sql_show.cc:9493: error: Static Initialization Order Fiasco Initializer of Show::column_privileges_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9491. 9492. 9493. ST_FIELD_INFO column_privileges_fields_info[]= ^ 9494. { 9495. Column("GRANTEE", Userhost(), NOT_NULL), #1049 sql/sql_show.cc:9506: error: Static Initialization Order Fiasco Initializer of Show::table_constraints_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9504. 9505. 9506. ST_FIELD_INFO table_constraints_fields_info[]= ^ 9507. { 9508. Column("CONSTRAINT_CATALOG", Catalog(), NOT_NULL, OPEN_FULL_TABLE), #1050 sql/sql_show.cc:9518: error: Static Initialization Order Fiasco Initializer of Show::key_column_usage_fields_info accesses global variable from a different translation unit: type_handler_slonglong|. 9516. 9517. 9518. ST_FIELD_INFO key_column_usage_fields_info[]= ^ 9519. { 9520. Column("CONSTRAINT_CATALOG", Catalog(), NOT_NULL, OPEN_FULL_TABLE), #1051 sql/sql_show.cc:9536: error: Static Initialization Order Fiasco Initializer of Show::table_names_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9534. 9535. 9536. ST_FIELD_INFO table_names_fields_info[]= ^ 9537. { 9538. Column("TABLE_CATALOG", Catalog(), NOT_NULL), #1052 sql/sql_show.cc:9547: error: Static Initialization Order Fiasco Initializer of Show::open_tables_fields_info accesses global variable from a different translation unit: type_handler_slonglong|. 9545. 9546. 9547. ST_FIELD_INFO open_tables_fields_info[]= ^ 9548. { 9549. Column("Database", Name(), NOT_NULL, "Database"), #1053 sql/sql_show.cc:9557: error: Static Initialization Order Fiasco Initializer of Show::triggers_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9555. 9556. 9557. ST_FIELD_INFO triggers_fields_info[]= ^ 9558. { 9559. Column("TRIGGER_CATALOG", Catalog(), NOT_NULL, OPEN_FRM_ONLY), #1054 sql/sql_show.cc:9589: error: Static Initialization Order Fiasco Initializer of Show::partitions_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9587. 9588. 9589. ST_FIELD_INFO partitions_fields_info[]= ^ 9590. { 9591. Column("TABLE_CATALOG", Catalog(), NOT_NULL, OPEN_FULL_TABLE), #1055 sql/sql_show.cc:9620: error: Static Initialization Order Fiasco Initializer of Show::variables_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9618. 9619. 9620. ST_FIELD_INFO variables_fields_info[]= ^ 9621. { 9622. Column("VARIABLE_NAME", Varchar(64), NOT_NULL, "Variable_name"), #1056 sql/sql_show.cc:9628: error: Static Initialization Order Fiasco Initializer of Show::sysvars_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9626. 9627. 9628. ST_FIELD_INFO sysvars_fields_info[]= ^ 9629. { 9630. Column("VARIABLE_NAME", Name(), NOT_NULL), #1057 sql/sql_show.cc:9649: error: Static Initialization Order Fiasco Initializer of Show::processlist_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9647. 9648. 9649. ST_FIELD_INFO processlist_fields_info[]= ^ 9650. { 9651. Column("ID", SLonglong(4), NOT_NULL, "Id"), #1058 sql/sql_show.cc:9675: error: Static Initialization Order Fiasco Initializer of Show::plugin_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9673. 9674. 9675. ST_FIELD_INFO plugin_fields_info[]= ^ 9676. { 9677. Column("PLUGIN_NAME", Name(), NOT_NULL, "Name"), #1059 sql/sql_show.cc:9693: error: Static Initialization Order Fiasco Initializer of Show::files_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9691. }; 9692. 9693. ST_FIELD_INFO files_fields_info[]= ^ 9694. { 9695. Column("FILE_ID", SLonglong(4), NOT_NULL), #1060 sql/sql_show.cc:9752: error: Static Initialization Order Fiasco Initializer of Show::referential_constraints_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9750. namespace Show { 9751. 9752. ST_FIELD_INFO referential_constraints_fields_info[]= ^ 9753. { 9754. Column("CONSTRAINT_CATALOG", Catalog(), NOT_NULL, OPEN_FULL_TABLE), #1061 sql/sql_show.cc:9769: error: Static Initialization Order Fiasco Initializer of Show::parameters_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9767. 9768. 9769. ST_FIELD_INFO parameters_fields_info[]= ^ 9770. { 9771. Column("SPECIFIC_CATALOG", Catalog(), NOT_NULL, OPEN_FULL_TABLE), #1062 sql/sql_show.cc:9791: error: Static Initialization Order Fiasco Initializer of Show::tablespaces_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9789. 9790. 9791. ST_FIELD_INFO tablespaces_fields_info[]= ^ 9792. { 9793. Column("TABLESPACE_NAME", Name(), NOT_NULL), #1063 sql/sql_show.cc:9806: error: Static Initialization Order Fiasco Initializer of Show::keycache_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9804. 9805. 9806. ST_FIELD_INFO keycache_fields_info[]= ^ 9807. { 9808. Column("KEY_CACHE_NAME",Varchar(NAME_LEN),NOT_NULL), #1064 sql/sql_show.cc:9824: error: Static Initialization Order Fiasco Initializer of Show::show_explain_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9822. 9823. 9824. ST_FIELD_INFO show_explain_fields_info[]= ^ 9825. { 9826. Column("id", SLonglong(3), NULLABLE, "id"), #1065 sql/sql_show.cc:9840: error: Static Initialization Order Fiasco Initializer of Show::check_constraints_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 9838. 9839. 9840. ST_FIELD_INFO check_constraints_fields_info[]= ^ 9841. { 9842. Column("CONSTRAINT_CATALOG", Catalog(), NOT_NULL, OPEN_FULL_TABLE), #1066 sql/sql_signal.cc:366: error: Dead Store The value written to `&result` is never used. 364. bool Sql_cmd_signal::execute(THD *thd) 365. { 366. bool result= TRUE; ^ 367. DBUG_ASSERT(m_cond); 368. Sql_condition cond(thd->mem_root, m_cond->get_user_condition_identity()); #1067 sql/sql_statistics.cc:2179: error: Uninitialized Value `histogram` is read without initialization. 2177. 2178. if (hist_size > 0) 2179. bzero(histogram, hist_size * fields); ^ 2180. else 2181. histogram= 0; #1068 sql/sql_statistics.cc:2183: error: Uninitialized Value `table_stats` is read without initialization. 2181. histogram= 0; 2182. 2183. table->collected_stats= table_stats; ^ 2184. table_stats->column_stats= column_stats; 2185. table_stats->index_stats= index_stats; #1069 sql/sql_statistics.cc:2184: error: Uninitialized Value `column_stats` is read without initialization. 2182. 2183. table->collected_stats= table_stats; 2184. table_stats->column_stats= column_stats; ^ 2185. table_stats->index_stats= index_stats; 2186. table_stats->idx_avg_frequency= idx_avg_frequency; #1070 sql/sql_statistics.cc:2185: error: Uninitialized Value `index_stats` is read without initialization. 2183. table->collected_stats= table_stats; 2184. table_stats->column_stats= column_stats; 2185. table_stats->index_stats= index_stats; ^ 2186. table_stats->idx_avg_frequency= idx_avg_frequency; 2187. table_stats->histograms= histogram; #1071 sql/sql_statistics.cc:2186: error: Uninitialized Value `idx_avg_frequency` is read without initialization. 2184. table_stats->column_stats= column_stats; 2185. table_stats->index_stats= index_stats; 2186. table_stats->idx_avg_frequency= idx_avg_frequency; ^ 2187. table_stats->histograms= histogram; 2188. #1072 sql/sql_statistics.cc:2293: error: Uninitialized Value `column_stats` is read without initialization. 2291. /* Zero variables but not the gaps between them */ 2292. bzero(table_stats, sizeof(Table_statistics)); 2293. bzero(column_stats, sizeof(Column_statistics) * fields); ^ 2294. bzero(index_stats, sizeof(Index_statistics) * keys); 2295. bzero(idx_avg_frequency, sizeof(idx_avg_frequency) * key_parts); #1073 sql/sql_statistics.cc:2294: error: Uninitialized Value `index_stats` is read without initialization. 2292. bzero(table_stats, sizeof(Table_statistics)); 2293. bzero(column_stats, sizeof(Column_statistics) * fields); 2294. bzero(index_stats, sizeof(Index_statistics) * keys); ^ 2295. bzero(idx_avg_frequency, sizeof(idx_avg_frequency) * key_parts); 2296. #1074 sql/sql_statistics.cc:2295: error: Uninitialized Value `idx_avg_frequency` is read without initialization. 2293. bzero(column_stats, sizeof(Column_statistics) * fields); 2294. bzero(index_stats, sizeof(Index_statistics) * keys); 2295. bzero(idx_avg_frequency, sizeof(idx_avg_frequency) * key_parts); ^ 2296. 2297. stats_cb->table_stats= table_stats; #1075 sql/sql_statistics.cc:3298: error: Dead Store The value written to `&open_tables_backup` is never used. 3296. TABLE *stat_table; 3297. TABLE_LIST tables[STATISTICS_TABLES]; 3298. Open_tables_backup open_tables_backup; ^ 3299. int rc= 0; 3300. DBUG_ENTER("delete_statistics_for_table"); #1076 sql/sql_string.cc:787: error: Null Dereference The call to `Binary_string::qs_append` ends up calling `dtoa` (after 1 more call) and may trigger the following issue: `d` could be null (from the call to `Binary_string::qs_append()` on line 787) and is dereferenced in the call to `Binary_string::qs_append()`. 785. double ld; 786. float8get(ld, (const char*) d); 787. qs_append(ld); ^ 788. } 789. #1077 sql/sql_string.cc:787: error: Null Dereference The call to `Binary_string::qs_append` ends up calling `dtoa` (after 1 more call) and may trigger the following issue: `res` could be null (from the call to `Binary_string::qs_append()` on line 787) and is dereferenced in the call to `Binary_string::qs_append()`. 785. double ld; 786. float8get(ld, (const char*) d); 787. qs_append(ld); ^ 788. } 789. #1078 sql/sql_table.cc:801: error: Dead Store The value written to `&error` is never used. 799. { 800. mysql_file_delete(key_file_frm, shadow_frm_name, MYF(0)); 801. error= 1; ^ 802. goto end; 803. } #1079 sql/sql_table.cc:1313: error: Dead Store The value written to `&error` is never used. 1311. unknown_tables.append(&table_name); 1312. unknown_tables.append(','); 1313. error= ENOENT; ^ 1314. continue; 1315. } #1080 sql/sql_table.cc:1322: error: Dead Store The value written to `&error` is never used. 1320. table_creation_was_logged= table->table->s->table_creation_was_logged; 1321. if (thd->drop_temporary_table(table->table, &is_trans, true)) 1322. error= 1; ^ 1323. else 1324. { #1081 sql/sql_table.cc:1396: error: Dead Store The value written to `&error` is never used. 1394. unknown_tables.append(&table_name); 1395. unknown_tables.append(','); 1396. error= ENOENT; ^ 1397. continue; 1398. } #1082 sql/sql_table.cc:1425: error: Dead Store The value written to `&error` is never used. 1423. if (ddl_log_drop_table_init(thd, ddl_log_state, current_db, &comment)) 1424. { 1425. error= 1; ^ 1426. goto err; 1427. } #1083 sql/sql_table.cc:1456: error: Dead Store The value written to `&error` is never used. 1454. if (!wsrep_should_replicate_ddl(thd, ht)) 1455. { 1456. error= 1; ^ 1457. goto err; 1458. } #1084 sql/sql_table.cc:1467: error: Dead Store The value written to `&error` is never used. 1465. if (wait_while_table_is_used(thd, table->table, HA_EXTRA_NOT_USED)) 1466. { 1467. error= -1; ^ 1468. goto err; 1469. } #1085 sql/sql_table.cc:1497: error: Dead Store The value written to `&error` is never used. 1495. if (res) 1496. { 1497. error= -1; ^ 1498. goto err; 1499. } #1086 sql/sql_table.cc:1514: error: Dead Store The value written to `&error` is never used. 1512. if (thd->is_killed()) 1513. { 1514. error= -1; ^ 1515. goto err; 1516. } #1087 sql/sql_table.cc:1574: error: Dead Store The value written to `&error` is never used. 1572. &table_name)) 1573. { 1574. error= -1; ^ 1575. goto err; 1576. } #1088 sql/sql_table.cc:1653: error: Dead Store The value written to `&error` is never used. 1651. if (unknown_tables.append(tbl_name) || unknown_tables.append(',')) 1652. { 1653. error= 1; ^ 1654. goto err; 1655. } #1089 sql/sql_table.cc:3904: error: Uninitialized Value `create.schema_comment` is read without initialization during the call to `load_db_opt_by_name()`. 3902. Schema_specification_st db_info; 3903. 3904. load_db_opt_by_name(thd, db.str, &db_info); ^ 3905. 3906. create_info->default_table_charset= db_info.default_table_charset; #1090 sql/sql_table.cc:7562: error: Dead Store The value written to `&ot_ctx` is never used. 7560. Alter_table_ctx *alter_ctx) 7561. { 7562. Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN | MYSQL_OPEN_IGNORE_KILLED); ^ 7563. handlerton *db_type= table->s->db_type(); 7564. Alter_info *alter_info= ha_alter_info->alter_info; #1091 sql/sql_table.cc:9873: error: Dead Store The value written to `&no_ha_table` is never used. 9871. { 9872. bool engine_changed, error, frm_is_created= false, error_handler_pushed= false; 9873. bool no_ha_table= true; /* We have not created table in storage engine yet */ ^ 9874. TABLE *table, *new_table= nullptr; 9875. DDL_LOG_STATE ddl_log_state; #1092 sql/sql_table.cc:9899: error: Dead Store The value written to `&new_db_type` is never used. 9897. bool binlog_as_create_select= 0, log_if_exists= 0; 9898. uint tables_opened; 9899. handlerton *new_db_type= create_info->db_type, *old_db_type; ^ 9900. ha_rows copied=0, deleted=0; 9901. LEX_CUSTRING frm= {0,0}; #1093 sql/sql_table.cc:9980: error: Dead Store The value written to `&error` is never used. 9978. table_list->mdl_request.type= MDL_EXCLUSIVE; 9979. /* This will only drop the .frm file and local tables, not shared ones */ 9980. error= mysql_rm_table(thd, table_list, 1, 0, 0, 1); ^ 9981. DBUG_RETURN(log_and_ok(thd)); 9982. } #1094 sql/sql_table.cc:10660: error: Dead Store The value written to `&error` is never used. 10658. thd->query(), thd->query_length())) 10659. { 10660. error= 1; ^ 10661. goto err_cleanup; 10662. } #1095 sql/sql_tablespace.cc:27: error: Dead Store The value written to `&error` is never used. 25. int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info) 26. { 27. int error= HA_ADMIN_NOT_IMPLEMENTED; ^ 28. handlerton *hton= ts_info->storage_engine; 29. #1096 sql/sql_time.cc:602: error: Dead Store The value written to `&position` is never used. 600. if (*ptr == '%' && ptr+1 != end) 601. { 602. uint UNINIT_VAR(position); ^ 603. switch (*++ptr) { 604. case 'y': // Year #1097 sql/sql_time.cc:602: error: Uninitialized Value `position` is read without initialization. 600. if (*ptr == '%' && ptr+1 != end) 601. { 602. uint UNINIT_VAR(position); ^ 603. switch (*++ptr) { 604. case 'y': // Year #1098 sql/sql_trigger.cc:772: error: Dead Store The value written to `&add_if_exists_to_binlog` is never used. 770. mysql_file_delete(key_file_trg, trn_path_buff, MYF(0)); 771. result= thd->is_error(); 772. add_if_exists_to_binlog= 1; ^ 773. action_executed= 1; // Ensure query is binlogged 774. stmt_query.set(thd->query(), thd->query_length(), system_charset_info); #1099 sql/sql_tvc.cc:1022: error: Unnecessary Copy Intermediate variable `&values` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 1020. if (!(tvc_select->tvc= 1021. new (thd->mem_root) 1022. table_value_constr(values, ^ 1023. tvc_select, 1024. tvc_select->options))) #1100 sql/sql_tvc.h:52: error: Unnecessary Copy Intermediate `tvc_values` is copied into field `lists_of_values` but is not modified afterwards. Rather than copying into the field, move into it instead. 50. table_value_constr(List tvc_values, SELECT_LEX *sl, 51. ulonglong select_options_arg) : 52. lists_of_values(tvc_values), result(0), select_lex(sl), type_holders(0), ^ 53. have_query_plan(QEP_NOT_PRESENT_YET), explain(0), 54. select_options(select_options_arg) #1101 sql/sql_type.cc:1008: error: Uninitialized Value `l_time1.day` is read without initialization during the call to `time_to_datetime_with_warn()`. 1006. { 1007. MYSQL_TIME tmp; 1008. if (time_to_datetime_with_warn(thd, this, &tmp, flags)) ^ 1009. time_type= MYSQL_TIMESTAMP_NONE; 1010. else #1102 sql/sql_type.cc:5352: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 5350. */ 5351. THD *thd= current_thd; 5352. Time tm(thd, item); ^ 5353. DBUG_ASSERT(!tm.is_valid_time() == item->null_value); 5354. if (!tm.is_valid_time()) #1103 sql/sql_type.cc:6042: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 6040. Item_func_min_max_val_str(Item_func_min_max *func, String *str) const 6041. { 6042. return Time(func).to_string(str, func->decimals); ^ 6043. } 6044. #1104 sql/sql_type.cc:6042: error: Uninitialized Value `this.year` is read without initialization during the call to `Time::Time()`. 6040. Item_func_min_max_val_str(Item_func_min_max *func, String *str) const 6041. { 6042. return Time(func).to_string(str, func->decimals); ^ 6043. } 6044. #1105 sql/sql_type.cc:6111: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 6109. Item_func_min_max_val_real(Item_func_min_max *func) const 6110. { 6111. return Time(current_thd, func).to_double(); ^ 6112. } 6113. #1106 sql/sql_type.cc:6155: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 6153. Item_func_min_max_val_int(Item_func_min_max *func) const 6154. { 6155. return Time(current_thd, func).to_longlong(); ^ 6156. } 6157. #1107 sql/sql_type.cc:6209: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 6207. my_decimal *dec) const 6208. { 6209. return Time(current_thd, func).to_decimal(dec); ^ 6210. } 6211. #1108 sql/sql_type.cc:8784: error: Null Dereference `va` could be null (from the call to `Item_const::const_ptr_double()` on line 8782) and is dereferenced. 8782. const double *va= a->const_ptr_double(); 8783. const double *vb= b->const_ptr_double(); 8784. return va[0] == vb[0]; ^ 8785. } 8786. #1109 sql/sql_type.cc:8794: error: Null Dereference `va` could be null (from the call to `Item_const::const_ptr_longlong()` on line 8792) and is dereferenced. 8792. const longlong *va= a->const_ptr_longlong(); 8793. const longlong *vb= b->const_ptr_longlong(); 8794. bool res= va[0] == vb[0] && ^ 8795. (va[0] >= 0 || 8796. (a->get_type_all_attributes_from_const()->unsigned_flag == #1110 sql/sql_type.cc:8822: error: Null Dereference `da` could be null (from the call to `Item_const::const_ptr_my_decimal()` on line 8820) and is dereferenced. 8820. const my_decimal *da= a->const_ptr_my_decimal(); 8821. const my_decimal *db= b->const_ptr_my_decimal(); 8822. return !da->cmp(db) && ^ 8823. (!binary_cmp || 8824. a->get_type_all_attributes_from_const()->decimals == #1111 sql/sql_type.cc:8836: error: Null Dereference `tb` could be null (from the call to `Item_const::const_ptr_mysql_time()` on line 8834) and is dereferenced in the call to `my_time_compare()`. 8834. const MYSQL_TIME *ta= a->const_ptr_mysql_time(); 8835. const MYSQL_TIME *tb= b->const_ptr_mysql_time(); 8836. return !my_time_compare(ta, tb) && ^ 8837. (!binary_cmp || 8838. a->get_type_all_attributes_from_const()->decimals == #1112 sql/sql_type.cc:8985: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 8983. { 8984. MYSQL_TIME field_time, item_time, item_time2, *item_time_cmp= &item_time; 8985. field->get_date(&field_time, Datetime::Options(TIME_INVALID_DATES, thd)); ^ 8986. item->get_date(thd, &item_time, Datetime::Options(TIME_INVALID_DATES, thd)); 8987. if (item_time.time_type == MYSQL_TIMESTAMP_TIME && #1113 sql/sql_type.cc:8988: error: Uninitialized Value `l_time1.year` is read without initialization during the call to `time_to_datetime()`. 8986. item->get_date(thd, &item_time, Datetime::Options(TIME_INVALID_DATES, thd)); 8987. if (item_time.time_type == MYSQL_TIMESTAMP_TIME && 8988. time_to_datetime(thd, &item_time, item_time_cmp= &item_time2)) ^ 8989. return 1; 8990. return my_time_compare(&field_time, item_time_cmp); #1114 sql/sql_type.cc:8999: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 8997. { 8998. MYSQL_TIME field_time, item_time; 8999. field->get_date(&field_time, Time::Options(thd)); ^ 9000. item->get_date(thd, &item_time, Time::Options(thd)); 9001. return my_time_compare(&field_time, &item_time); #1115 sql/sql_type.cc:9095: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Temporal_hybrid::Temporal_hybrid()`. 9093. Temporal::Warn st; 9094. Item_literal *item= NULL; 9095. Temporal_hybrid tmp(thd, &st, str, length, cs, Temporal_hybrid::Options(thd)); ^ 9096. if (tmp.is_valid_temporal() && 9097. tmp.get_mysql_time()->time_type == MYSQL_TIMESTAMP_DATE && #1116 sql/sql_type.cc:9117: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Temporal_hybrid::Temporal_hybrid()`. 9115. Temporal::Warn st; 9116. Item_literal *item= NULL; 9117. Temporal_hybrid tmp(thd, &st, str, length, cs, Temporal_hybrid::Options(thd)); ^ 9118. if (tmp.is_valid_temporal() && 9119. tmp.get_mysql_time()->time_type == MYSQL_TIMESTAMP_DATETIME && #1117 sql/sql_type.cc:9140: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 9138. Item_literal *item= NULL; 9139. Time::Options opt(TIME_TIME_ONLY, thd, Time::DATETIME_TO_TIME_DISALLOW); 9140. Time tmp(thd, &st, str, length, cs, opt); ^ 9141. if (tmp.is_valid_time() && 9142. !have_important_literal_warnings(&st)) #1118 sql/sql_type.cc:9157: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 9155. &type_handler_time2) 9156. return item->val_native(thd, to); 9157. return Time(thd, item).to_native(to, item->time_precision(thd)); ^ 9158. } 9159. #1119 sql/sql_type.cc:9216: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 9214. &type_handler_timestamp2) 9215. return item->val_native(thd, to); 9216. Datetime dt(thd, item, Datetime::Options(TIME_NO_ZERO_IN_DATE, thd)); ^ 9217. return 9218. !dt.is_valid_datetime() || #1120 sql/sql_type.cc:9216: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 9214. &type_handler_timestamp2) 9215. return item->val_native(thd, to); 9216. Datetime dt(thd, item, Datetime::Options(TIME_NO_ZERO_IN_DATE, thd)); ^ 9217. return 9218. !dt.is_valid_datetime() || #1121 sql/sql_type.cc:9316: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Time::Time()`. 9314. Native *to) const 9315. { 9316. return Time(thd, item).to_native(to, item->decimals); ^ 9317. } 9318. #1122 sql/sql_type.h:2243: error: Uninitialized Value `from.neg` is read without initialization during the call to `Date::Date()`. 2241. { } 2242. Date(THD *thd, Item *item) 2243. :Temporal_with_date(Date(thd, item, Options(thd, TIME_FRAC_TRUNCATE))) ^ 2244. { } 2245. Date(Item *item) #1123 sql/sql_type.h:2278: error: Uninitialized Value `dummy` is read without initialization during the call to `Date::check_date()`. 2276. { 2277. int dummy; /* unused */ 2278. return check_date(flags, &dummy); ^ 2279. } 2280. bool check_date(THD *thd) const #1124 sql/sql_type.h:2283: error: Uninitialized Value `dummy` is read without initialization during the call to `Date::check_date()`. 2281. { 2282. int dummy; 2283. return check_date(Temporal::sql_mode_for_dates(thd), &dummy); ^ 2284. } 2285. const MYSQL_TIME *get_mysql_time() const #1125 sql/sql_type.h:2449: error: Uninitialized Value `from.neg` is read without initialization during the call to `Datetime::Datetime()`. 2447. } 2448. Datetime(THD *thd, Item *item) 2449. :Temporal_with_date(Datetime(thd, item, Options(thd))) ^ 2450. { } 2451. Datetime(Item *item) #1126 sql/sql_type.h:2449: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Datetime::Datetime()`. 2447. } 2448. Datetime(THD *thd, Item *item) 2449. :Temporal_with_date(Datetime(thd, item, Options(thd))) ^ 2450. { } 2451. Datetime(Item *item) #1127 sql/sql_type.h:2554: error: Uninitialized Value `dummy` is read without initialization during the call to `Datetime::check_date()`. 2552. { 2553. int dummy; /* unused */ 2554. return check_date(flags, &dummy); ^ 2555. } 2556. bool check_date(THD *thd) const #1128 sql/sql_type.h:2949: error: Uninitialized Value `__param_0.year` is read without initialization during the call to `Datetime::Datetime()`. 2947. Datetime to_datetime(THD *thd) const 2948. { 2949. return is_null() ? Datetime() : ^ 2950. Timestamp_or_zero_datetime_native::to_datetime(thd); 2951. } #1129 sql/sql_udf.cc:526: error: Dead Store The value written to `&tables` is never used. 524. bool new_dl=0; 525. TABLE *table; 526. TABLE_LIST tables; ^ 527. udf_func *u_d; 528. DBUG_ENTER("mysql_create_function"); #1130 sql/sql_update.cc:1571: error: Const Refable Parameter Function parameter `leaves` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 1569. false otherwise. 1570. */ 1571. static ^ 1572. bool unsafe_key_update(List leaves, table_map tables_for_update) 1573. { #1131 sql/sql_view.cc:1295: error: Dead Store The value written to `&view_select` is never used. 1293. { 1294. SELECT_LEX_NODE *end; 1295. SELECT_LEX *UNINIT_VAR(view_select); ^ 1296. LEX *old_lex, *lex; 1297. Query_arena *arena, backup; #1132 sql/sql_view.cc:1295: error: Uninitialized Value `view_select` is read without initialization. 1293. { 1294. SELECT_LEX_NODE *end; 1295. SELECT_LEX *UNINIT_VAR(view_select); ^ 1296. LEX *old_lex, *lex; 1297. Query_arena *arena, backup; #1133 sql/sql_view.cc:1299: error: Dead Store The value written to `&parse_status` is never used. 1297. Query_arena *arena, backup; 1298. TABLE_LIST *top_view= table->top_table(); 1299. bool UNINIT_VAR(parse_status); ^ 1300. bool result, view_is_mergeable; 1301. TABLE_LIST *UNINIT_VAR(view_main_select_tables); #1134 sql/sql_view.cc:1299: error: Uninitialized Value `parse_status` is read without initialization. 1297. Query_arena *arena, backup; 1298. TABLE_LIST *top_view= table->top_table(); 1299. bool UNINIT_VAR(parse_status); ^ 1300. bool result, view_is_mergeable; 1301. TABLE_LIST *UNINIT_VAR(view_main_select_tables); #1135 sql/sql_view.cc:1301: error: Uninitialized Value `view_main_select_tables` is read without initialization. 1299. bool UNINIT_VAR(parse_status); 1300. bool result, view_is_mergeable; 1301. TABLE_LIST *UNINIT_VAR(view_main_select_tables); ^ 1302. DBUG_ENTER("mysql_make_view"); 1303. DBUG_PRINT("info", ("table: %p (%s)", table, table->table_name.str)); #1136 sql/sql_view.cc:1793: error: Dead Store The value written to `&ti` is never used. 1791. DBUG_ASSERT(view_main_select_tables != 0); 1792. 1793. List_iterator_fast ti(view_select->top_join_list); ^ 1794. 1795. table->derived_type= VIEW_ALGORITHM_MERGE; #1137 sql/sql_view.cc:2380: error: Dead Store The value written to `&ptr` is never used. 2378. memcpy(key, old_db->str, old_db->length); 2379. ptr= key+ old_db->length; 2380. *ptr++= 0; ^ 2381. memcpy(key, old_name->str, old_name->length); 2382. ptr= key+ old_db->length; #1138 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:2961: error: Dead Store The value written to `&lip` is never used. 2959. 8726, 8725, 8733, 8733, 8742, 8743, 8748, 8749, 8759, 8758, 2960. 8773, 8772, 8791, 8790, 8807, 8805, 8826, 8827, 8832, 8831, 2961. 8845, 8854, 8844, 8864, 8876, 8940, 8945, 8960, 8961, 8976, ^ 2962. 8975, 8991, 8990, 9003, 9005, 9020, 9028, 9026, 9041, 9059, 2963. 9061, 9071, 9075, 9116, 9125, 9135, 9136, 9140, 9144, 9150, #1139 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:2961: error: Dead Store The value written to `&lip` is never used. 2959. 5791, 5796, 5802, 5801, 5827, 5828, 5829, 5834, 5839, 5844, 2960. 5846, 5848, 5850, 5856, 5861, 5866, 5875, 5884, 5890, 5896, 2961. 5901, 5904, 5906, 5910, 5929, 5937, 5952, 5962, 5973, 5974, ^ 2962. 5975, 5976, 5977, 5978, 5979, 5983, 5984, 5985, 5989, 5990, 2963. 5991, 5992, 5997, 6004, 6011, 6012, 6016, 6017, 6018, 6019, #1140 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:3370: error: Dead Store The value written to `&sp` is never used. 3368. "SONAME_SYM", "SOUNDS_SYM", "SOURCE_SYM", "SQL_BUFFER_RESULT", 3369. "SQL_CACHE_SYM", "SQL_CALC_FOUND_ROWS", "SQL_NO_CACHE_SYM", "SQL_THREAD", 3370. "STAGE_SYM", "STARTS_SYM", "START_SYM", "STATEMENT_SYM", "STATUS_SYM", ^ 3371. "STOP_SYM", "STORAGE_SYM", "STORED_SYM", "STRING_SYM", 3372. "SUBCLASS_ORIGIN_SYM", "SUBDATE_SYM", "SUBJECT_SYM", "SUBPARTITIONS_SYM", #1141 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:3370: error: Dead Store The value written to `&sp` is never used. 3368. "ANY_SYM", "ASCII_SYM", "AT_SYM", "ATOMIC_SYM", "AUTHORS_SYM", 3369. "AUTOEXTEND_SIZE_SYM", "AUTO_INC", "AVG_ROW_LENGTH", "AVG_SYM", 3370. "BACKUP_SYM", "BEGIN_MARIADB_SYM", "BEGIN_ORACLE_SYM", "BINLOG_SYM", ^ 3371. "BIT_SYM", "BLOCK_SYM", "BOOL_SYM", "BOOLEAN_SYM", "BTREE_SYM", 3372. "BYTE_SYM", "CACHE_SYM", "CASCADED", "CATALOG_NAME_SYM", "CHAIN_SYM", #1142 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:4064: error: Dead Store The value written to `&sp` is never used. 4062. -5302, 23877, 23877, 23877, -5302, 23877, 3550, 23877, 3742, 23877, 4063. 3862, 23877, -5302, 27707, -5302, 3910, -5302, -5302, 23877, 23877, 4064. -5302, 23877, 23877, 23877, -5302, -5302, -5302, 23877, -5302, 4466, ^ 4065. 23877, -5302, -5302, -5302, -5302, -5302, -5302, -5302, -5302, 23877, 4066. -5302, 387, 28473, -5302, 23877, 23877, 23877, -5302, -5302, 23877, #1143 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:4064: error: Dead Store The value written to `&sp` is never used. 4062. -5723, -5723, -5723, -5723, -5723, 48554, 54513, -5723, -5723, -5723, 4063. 3431, -5723, -5723, -5723, 3441, 29826, 29826, -5723, 4181, 4181, 4064. 4181, 23698, 3002, 1716, 3814, 23698, 23698, 23698, 2618, 3459, ^ 4065. -5723, -5723, -5723, 440, -5723, 23698, 23698, 38174, 3466, 175, 4066. 3475, 23698, 4141, 4141, -5723, 23698, 23698, 16804, 4297, 23698, #1144 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:4080: error: Dead Store The value written to `&sp` is never used. 4078. -5302, 268, 268, 18515, -5302, 11228, -5302, -5302, 623, 4233, 4079. 4504, -5302, -5302, 93830, 1230, 93830, -5302, 50927, 50927, 88664, 4080. 7, -5302, -5302, -5302, -5302, -5302, -5302, -5302, -5302, -5302, ^ 4081. -5302, -5302, 3973, -5302, -5302, -5302, 4708, -5302, -5302, 4324, 4082. 2571, 479, -5302, -5302, 39097, 537, -5302, -5302, -5302, 20047, #1145 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:4080: error: Dead Store The value written to `&sp` is never used. 4078. 2422, 32124, 32124, 32124, 32124, 32124, 32124, 32124, 32890, 33656, 4079. 32124, 32124, 32124, 32124, -5723, 81885, 29826, 50768, 3508, 4152, 4080. -5723, 78933, -5723, 1937, 1235, -5723, 2640, 4361, 35188, -5723, ^ 4081. 3510, -5723, 4006, 48554, -5723, 3518, 4171, 76719, 73767, 1959, 4082. 3532, -5723, 1415, 266, -5723, 78195, 95169, -5723, -5723, -5723, #1146 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:5053: error: Dead Store The value written to `&part_info` is never used. 5051. -4692, -5302, -5302, -5302, -5302, -5302, 1470, -2176, -616, 364, 5052. 47, -5302, -77, -5302, -5302, -5302, -5302, -5302, -5302, -5302, 5053. 32, -5302, -5302, -5302, -161, 750, -4612, -5302, -5302, -5302, ^ 5054. -5302, 2490, -5302, 2000, -5302, -2293, 3786, -5302, -5302, -5302, 5055. -5302, -5302, -5302, 2303, -3093, -5302, -5302, -5302, 1031, -5302, #1147 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:5053: error: Dead Store The value written to `&part_info` is never used. 5051. 0, 3644, 0, 0, 3660, 0, 3660, 0, 0, 1811, 5052. 1810, 0, 0, 0, 0, 0, 0, 1896, 0, 1895, 5053. 0, 1901, 1905, 0, 0, 0, 0, 2471, 2473, 0, ^ 5054. 2105, 1957, 1966, 1964, 2001, 2013, 0, 2093, 2091, 0, 5055. 3571, 3567, 2053, 2052, 0, 1121, 0, 1120, 1125, 1084, #1148 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:5113: error: Dead Store The value written to `&lex` is never used. 5111. -5302, -5302, -5302, -5302, -5302, -5302, -5302, -5302, -5302, -5302, 5112. -5302, -5302, -5302, -5302, 3942, -1609, -5302, -5302, 4081, -5302, 5113. 1858, -5302, 882, -5302, -5302, 794, -5302, -2857, -5302, -5302, ^ 5114. -5302, -5302, -5302, -1613, -668, -5302, 4084, -5302, 4098, -1249, 5115. -4435, -1779, -447, -5302, -228, -5302, -5302, -5302, -5302, -5302, #1149 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:5113: error: Dead Store The value written to `&lex` is never used. 5111. 0, 0, 3593, 3591, 0, 2142, 1868, 2003, 1617, 1593, 5112. 1677, 0, 1984, 0, 0, 1982, 1981, 0, 1976, 1983, 5113. 669, 0, 0, 614, 630, 626, 0, 628, 629, 651, ^ 5114. 2147, 0, 0, 2171, 2173, 3774, 2421, 3427, 0, 1079, 5115. 0, 1080, 0, 3427, 3427, 0, 0, 0, 1084, 1053, #1150 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:5186: error: Dead Store The value written to `&p_elem` is never used. 5184. 2089, 3412, 1456, 2090, 2788, 2789, 5008, 5009, 5377, 5358, 5185. 5359, 5360, 5361, 5362, 4570, 5001, 4575, 2923, 2095, 5180, 5186. 5172, 5173, 4774, 3514, 3515, 4781, 3516, 5193, 5198, 3480, ^ 5187. 3481, 4234, 3517, 5501, 5502, 5503, 669, 1144, 5504, 80, 5188. 81, 670, 678, 671, 1141, 2462, 1142, 82, 83, 1925, #1151 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:5186: error: Dead Store The value written to `&p_elem` is never used. 5184. -5723, -5723, -5723, -5723, 1883, -5723, -5723, -5723, -5723, -5723, 5185. -5723, -5723, -5723, 2514, -5723, -5723, -5723, -5723, -5723, -5723, 5186. -5723, 1604, -5723, 233, -5723, 238, -5723, 237, -3601, -634, ^ 5187. 4317, -5723, -5723, -5723, -5723, -5723, -5723, -5723, -5723, -5723, 5188. -5723, -5723, -5723, -5723, -5723, -5723, -5723, -5723, -5723, -5723, #1152 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:6155: error: Dead Store The value written to `&lex` is never used. 6153. 1209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6154. 0, 0, 0, 4531, 11, 12, 0, 0, 0, 0, 6155. 0, 0, 0, 1124, 0, 1124, 0, 0, 0, 0, ^ 6156. 0, 0, 0, 0, 0, 4532, 2051, 0, 0, 0, 6157. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #1153 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:6155: error: Dead Store The value written to `&lex` is never used. 6153. 0, 0, 0, 0, 0, 1170, 0, 0, 0, 0, 6154. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6155. 0, 974, 0, 0, 0, 0, 4946, 0, 4947, 0, ^ 6156. 0, 0, 0, 0, 0, 0, -1944, 4823, 0, 4948, 6157. -1944, 0, 0, 0, -1944, 0, 0, 0, 0, 0, #1154 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:7908: error: Dead Store The value written to `&lex` is never used. 7906. 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 7907. 399, 400, 1058, 402, 403, 404, 405, 406, 1059, 408, 7908. 409, 410, 411, 412, 413, 414, 415, 1060, 1061, 418, ^ 7909. 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 7910. 429, 430, 431, 0, 432, 433, 434, 435, 436, 437, #1155 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:7908: error: Dead Store The value written to `&lex` is never used. 7906. 395, 600, 397, 398, 601, 400, 401, 402, 403, 1115, 7907. 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 7908. 415, 416, 417, 418, 419, 420, 421, 422, 1116, 1117, ^ 7909. 1118, 1119, 427, 428, 429, 430, 1120, 1121, 433, 434, 7910. 435, 436, 437, 438, 439, 440, 603, 442, 443, 444, #1156 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:7918: error: Dead Store The value written to `&lex` is never used. 7916. 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 7917. 498, 499, 500, 501, 502, 1065, 504, 505, 506, 507, 7918. 508, 509, 1066, 511, 512, 513, 514, 515, 516, 1067, ^ 7919. 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 7920. 528, 529, 530, 531, 532, 533, 534, 0, 535, 536, #1157 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:7918: error: Dead Store The value written to `&lex` is never used. 7916. 0, 0, 1133, 1012, 1013, 0, 1014, 1015, 1016, 1017, 7917. 1018, 1019, 1020, 1021, 1022, 1023, 1024, 0, 0, 0, 7918. 0, 0, 0, 0, 1025, 0, 0, 0, 0, 0, ^ 7919. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7920. 0, 1026, 1027, 1028, 1029, 0, 0, 0, 0, 0, #1158 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:7929: error: Dead Store The value written to `&lex` is never used. 7927. 597, 598, 599, 600, 601, 1077, 603, 1078, 605, 606, 7928. 607, 0, 608, 609, 610, 1079, 0, 0, 0, 0, 7929. 0, 0, 0, 0, 1080, 1081, 0, 0, 962, 0, ^ 7930. 1082, 0, 0, 963, 964, 1083, 0, 0, 0, 1084, 7931. 1085, 0, 0, 1086, 965, 966, 0, 967, 968, 969, #1159 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:7929: error: Dead Store The value written to `&lex` is never used. 7927. 0, 0, 0, 0, 0, 0, 1048, 1049, 1050, 22, 7928. 0, 0, 0, 0, 0, 1051, 0, 0, 568, 0, 7929. 0, 0, 0, 0, 1052, 0, 0, 1053, 0, 0, ^ 7930. 0, 0, 0, 0, 0, 0, 1054, 0, 1055, 0, 7931. 1056, 0, 0, 0, 0, 0, 0, 0, 0, 0, #1160 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:7939: error: Dead Store The value written to `&lex` is never used. 7937. 0, 0, 0, 986, 987, 0, 0, 988, 989, 990, 7938. 991, 0, 992, 177, 0, 993, 994, 0, 0, 0, 7939. 0, 0, 0, 0, 995, 0, 0, 996, 0, 0, ^ 7940. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7941. 0, 178, 0, 0, 0, 997, 998, 999, 0, 1000, #1161 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:7939: error: Dead Store The value written to `&lex` is never used. 7937. 0, 0, 0, 0, 1071, 0, 0, 0, 0, 0, 7938. 0, 0, 0, 0, 0, 1072, 0, 0, 0, 0, 7939. 0, 0, 0, 1073, 1074, 0, 0, 0, 0, 0, ^ 7940. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7941. 0, 0, 1075, 0, 0, 0, 0, 0, 0, 1076, #1162 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:7950: error: Dead Store The value written to `&lex` is never used. 7948. 0, 0, 1013, 181, 0, 0, 0, 1014, 0, 0, 7949. 182, 1015, 0, 1016, 1017, 1018, 1019, 0, 0, 0, 7950. 0, 0, 183, 0, 0, 0, 0, 0, 0, 0, ^ 7951. 0, 0, 0, 184, 1020, 1021, 1022, 0, 1023, 0, 7952. 0, 0, 0, 0, 0, 1024, 0, 0, 0, 0, #1163 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:7950: error: Dead Store The value written to `&lex` is never used. 7948. 66, 67, 68, 69, 70, 1091, 72, 73, 74, 75, 7949. 76, 77, 1092, 570, 0, 571, 572, 83, 84, 85, 7950. 86, 87, 88, 573, 90, 91, 92, 93, 1093, 94, ^ 7951. 575, 96, 97, 98, 99, 100, 576, 101, 102, 103, 7952. 104, 1094, 106, 1095, 1096, 1097, 0, 110, 111, 112, #1164 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:7979: error: Dead Store The value written to `&lex` is never used. 7977. 333, 1055, 335, 336, 337, 338, 339, 340, 341, 342, 7978. 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 7979. 353, 354, 355, 1056, 1057, 358, 359, 360, 361, 362, ^ 7980. 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 7981. 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, #1165 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:7979: error: Dead Store The value written to `&lex` is never used. 7977. 340, 341, 595, 343, 344, 345, 596, 347, 348, 349, 7978. 350, 351, 352, 353, 354, 355, 597, 357, 358, 359, 7979. 1112, 361, 362, 363, 598, 365, 366, 1113, 368, 369, ^ 7980. 370, 371, 372, 373, 1114, 375, 599, 377, 378, 379, 7981. 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, #1166 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:8013: error: Dead Store The value written to `&lex` is never used. 8011. 0, 0, 0, 0, 0, 0, 0, 0, 979, 980, 8012. 981, 982, 0, 0, 0, 0, 0, 0, 0, 983, 8013. 984, 0, 985, 0, 0, 0, 0, 0, 0, 986, ^ 8014. 987, 0, 0, 988, 989, 990, 991, 0, 992, 177, 8015. 0, 993, 994, 0, 0, 0, 0, 0, 0, 0, #1167 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:8013: error: Dead Store The value written to `&lex` is never used. 8011. 1065, 1066, 0, 0, 0, 0, 0, 31, 0, 0, 8012. 0, 0, 0, 0, 0, 0, 0, 0, 34, 1067, 8013. 1068, 1069, 0, 1070, 0, 0, 0, 0, 0, 0, ^ 8014. 1071, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8015. 0, 1072, 0, 0, 0, 0, 0, 0, 0, 1073, #1168 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:9927: error: Dead Store The value written to `&lex` is never used. 9925. 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 9926. 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 9927. 274, 0, 275, 276, 277, 278, 279, 280, 281, 282, ^ 9928. 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 9929. 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, #1169 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:9927: error: Dead Store The value written to `&lex` is never used. 9925. 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 9926. 583, 584, 177, 0, 178, 179, 180, 585, 182, 183, 9927. 184, 586, 186, 187, 587, 189, 190, 588, 0, 192, ^ 9928. 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 9929. 203, 204, 589, 206, 207, 208, 209, 210, 211, 212, #1170 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:13541: error: Dead Store The value written to `&lex` is never used. 13539. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13540. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13541. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ^ 13542. 0, 185, 0, 0, 0, 0, 0, 0, 0, 0, 13543. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #1171 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:13541: error: Dead Store The value written to `&lex` is never used. 13539. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13540. 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 13541. 569, 55, 56, 57, 58, 59, 0, 0, 0, 0, ^ 13542. 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 13543. 71, 72, 73, 74, 75, 76, 77, 78, 570, 0, #1172 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:14672: error: Dead Store The value written to `&value` is never used. 14670. 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 14671. 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 14672. 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, ^ 14673. 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 14674. 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, #1173 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:14672: error: Dead Store The value written to `&value` is never used. 14670. 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 14671. 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 14672. 279, 280, 281, 282, 591, 283, 284, 285, 286, 287, ^ 14673. 288, 289, 290, 0, 291, 292, 293, 294, 592, 295, 14674. 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, #1174 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:14854: error: Dead Store The value written to `&lex` is never used. 14852. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14853. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14854. 0, 0, 178, 0, 0, 0, 0, 0, 0, 0, ^ 14855. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14856. 0, 179, 0, 0, 0, 0, 0, 0, 0, 0, #1175 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:14854: error: Dead Store The value written to `&lex` is never used. 14852. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14853. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14854. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ^ 14855. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14856. 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, #1176 /home/dan/repos/build-mariadb-server-rebase/sql/yy_mariadb.cc:15266: error: Dead Store The value written to `&lex` is never used. 15264. 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 15265. 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 15266. 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, ^ 15267. 412, 413, 414, 415, 3244, 417, 418, 419, 420, 421, 15268. 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, #1177 /home/dan/repos/build-mariadb-server-rebase/sql/yy_oracle.cc:15266: error: Dead Store The value written to `&lex` is never used. 15264. 293, 294, 592, 295, 296, 297, 298, 299, 300, 301, 15265. 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 15266. 593, 312, 594, 314, 315, 316, 317, 318, 319, 320, ^ 15267. 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 15268. 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, #1178 sql/sys_vars.cc:5261: error: Dead Store The value written to `&newvalptr` is never used. 5259. { 5260. bool res; 5261. my_bool *UNINIT_VAR(newvalptr), newval, UNINIT_VAR(oldval); ^ 5262. uint UNINIT_VAR(log_type); 5263. #1179 sql/sys_vars.cc:5261: error: Dead Store The value written to `&oldval` is never used. 5259. { 5260. bool res; 5261. my_bool *UNINIT_VAR(newvalptr), newval, UNINIT_VAR(oldval); ^ 5262. uint UNINIT_VAR(log_type); 5263. #1180 sql/sys_vars.cc:5261: error: Uninitialized Value `newvalptr` is read without initialization. 5259. { 5260. bool res; 5261. my_bool *UNINIT_VAR(newvalptr), newval, UNINIT_VAR(oldval); ^ 5262. uint UNINIT_VAR(log_type); 5263. #1181 sql/sys_vars.cc:5261: error: Uninitialized Value `oldval` is read without initialization. 5259. { 5260. bool res; 5261. my_bool *UNINIT_VAR(newvalptr), newval, UNINIT_VAR(oldval); ^ 5262. uint UNINIT_VAR(log_type); 5263. #1182 sql/sys_vars.cc:5262: error: Dead Store The value written to `&log_type` is never used. 5260. bool res; 5261. my_bool *UNINIT_VAR(newvalptr), newval, UNINIT_VAR(oldval); 5262. uint UNINIT_VAR(log_type); ^ 5263. 5264. if (type != OPT_GLOBAL) #1183 sql/sys_vars.cc:5262: error: Uninitialized Value `log_type` is read without initialization. 5260. bool res; 5261. my_bool *UNINIT_VAR(newvalptr), newval, UNINIT_VAR(oldval); 5262. uint UNINIT_VAR(log_type); ^ 5263. 5264. if (type != OPT_GLOBAL) #1184 sql/table.cc:356: error: Uninitialized Value `share` is read without initialization. 354. NULL)) 355. { 356. bzero((char*) share, sizeof(*share)); ^ 357. 358. share->set_table_cache_key(key_buff, key, key_length); #1185 sql/table.cc:358: error: Uninitialized Value `key_buff` is read without initialization. 356. bzero((char*) share, sizeof(*share)); 357. 358. share->set_table_cache_key(key_buff, key, key_length); ^ 359. 360. share->path.str= path_buff; #1186 sql/table.cc:360: error: Uninitialized Value `path_buff` is read without initialization. 358. share->set_table_cache_key(key_buff, key, key_length); 359. 360. share->path.str= path_buff; ^ 361. share->path.length= path_length; 362. strmov(path_buff, path); #1187 sql/table.cc:401: error: Uninitialized Value `share` is read without initialization. 399. unlikely((share->table_map_id & MAX_TABLE_MAP_ID) == UINT_MAX32)); 400. } 401. DBUG_RETURN(share); ^ 402. } 403. #1188 sql/table.cc:1330: error: Dead Store The value written to `&vcol` is never used. 1328. expr_str.append_ulonglong(field->decimals()); 1329. expr_str.append(')'); 1330. vcol= unpack_vcol_info_from_frm(thd, table, &expr_str, ^ 1331. &((*field_ptr)->default_value), 1332. error_reported); #1189 sql/table.cc:1781: error: Uninitialized Value `mysql57_vcol_null_bit_pos` is read without initialization. 1779. uint total_typelib_value_count; 1780. uint db_create_options, keys, key_parts, n_length; 1781. uint com_length, null_bit_pos, UNINIT_VAR(mysql57_vcol_null_bit_pos), bitmap_count; ^ 1782. uint i, hash_fields= 0; 1783. bool use_hash, mysql57_null_bits= 0; #1190 sql/table.cc:1788: error: Uninitialized Value `mysql57_vcol_null_pos` is read without initialization. 1786. const uchar *forminfo; 1787. const uchar *frm_image_end = frm_image + frm_length; 1788. uchar *record, *null_flags, *null_pos, *UNINIT_VAR(mysql57_vcol_null_pos); ^ 1789. const uchar *disk_buff, *strpos; 1790. ulong pos, record_offset; #1191 sql/table.cc:1853: error: Uninitialized Value `section.application_period.str` is read without initialization during the call to `read_extra2()`. 1851. len = uint2korr(frm_image+4); 1852. 1853. if (read_extra2(frm_image, len, &extra2)) ^ 1854. goto err; 1855. #1192 sql/table.cc:1853: error: Uninitialized Value `section.field_data_type_info.str` is read without initialization during the call to `read_extra2()`. 1851. len = uint2korr(frm_image+4); 1852. 1853. if (read_extra2(frm_image, len, &extra2)) ^ 1854. goto err; 1855. #1193 sql/table.cc:1853: error: Uninitialized Value `section.index_flags.str` is read without initialization during the call to `read_extra2()`. 1851. len = uint2korr(frm_image+4); 1852. 1853. if (read_extra2(frm_image, len, &extra2)) ^ 1854. goto err; 1855. #1194 sql/table.cc:1853: error: Uninitialized Value `section.without_overlaps.str` is read without initialization during the call to `read_extra2()`. 1851. len = uint2korr(frm_image+4); 1852. 1853. if (read_extra2(frm_image, len, &extra2)) ^ 1854. goto err; 1855. #1195 sql/table.cc:2152: error: Dead Store The value written to `&next_chunk` is never used. 2150. options.length= uint4korr(next_chunk); 2151. options.str= next_chunk + 4; 2152. next_chunk+= options.length + 4; ^ 2153. } 2154. DBUG_ASSERT(next_chunk <= buff_end); #1196 sql/table.cc:4065: error: Uninitialized Value `key_info` is read without initialization. 4063. return 1; 4064. 4065. outparam->key_info= key_info; ^ 4066. 4067. memcpy(key_info, share->key_info, sizeof(*key_info)*share->keys); #1197 sql/table.cc:4068: error: Uninitialized Value `key_part` is read without initialization. 4066. 4067. memcpy(key_info, share->key_info, sizeof(*key_info)*share->keys); 4068. memcpy(key_part, key_info->key_part, sizeof(*key_part)*share->ext_key_parts); ^ 4069. 4070. my_ptrdiff_t adjust_ptrs= PTR_BYTE_DIFF(key_part, key_info->key_part); #1198 sql/table.cc:6149: error: Dead Store The value written to `&arena` is never used. 6147. { 6148. TABLE_LIST *tbl= this; 6149. Query_arena *arena= thd->stmt_arena, backup; ^ 6150. arena= thd->activate_stmt_arena_if_needed(&backup); // For easier test 6151. #1199 sql/table.cc:6295: error: Dead Store The value written to `&arena` is never used. 6293. if (check_opt_type && !check_option_processed) 6294. { 6295. Query_arena *arena= thd->stmt_arena, backup; ^ 6296. arena= thd->activate_stmt_arena_if_needed(&backup); // For easier test 6297. #1200 sql/table.cc:6663: error: Uninitialized Value `cur_table_ref` is read without initialization. 6661. TABLE_LIST *TABLE_LIST::first_leaf_for_name_resolution() 6662. { 6663. TABLE_LIST *UNINIT_VAR(cur_table_ref); ^ 6664. NESTED_JOIN *cur_nested_join; 6665. #1201 sql/table.cc:7426: error: Uninitialized Value `field_count` is read without initialization. 7424. Natural_join_column *nj_col; 7425. bool is_created= TRUE; 7426. uint UNINIT_VAR(field_count); ^ 7427. TABLE_LIST *add_table_ref= parent_table_ref ? 7428. parent_table_ref : table_ref; #1202 sql/table.cc:8298: error: Uninitialized Value `new_key_info` is read without initialization. 8296. if (s->keys) 8297. { 8298. memmove(new_key_info, s->key_info, sizeof(*key_info) * s->keys); ^ 8299. memmove(new_const_key_parts, const_key_parts, 8300. s->keys * sizeof(const_key_parts)); #1203 sql/table.cc:8299: error: Uninitialized Value `new_const_key_parts` is read without initialization. 8297. { 8298. memmove(new_key_info, s->key_info, sizeof(*key_info) * s->keys); 8299. memmove(new_const_key_parts, const_key_parts, ^ 8300. s->keys * sizeof(const_key_parts)); 8301. } #1204 sql/table.cc:8302: error: Uninitialized Value `new_key_info` is read without initialization. 8300. s->keys * sizeof(const_key_parts)); 8301. } 8302. s->key_info= key_info= new_key_info; ^ 8303. const_key_parts= new_const_key_parts; 8304. bzero((char*) (const_key_parts + s->keys), #1205 sql/table.cc:8303: error: Uninitialized Value `new_const_key_parts` is read without initialization. 8301. } 8302. s->key_info= key_info= new_key_info; 8303. const_key_parts= new_const_key_parts; ^ 8304. bzero((char*) (const_key_parts + s->keys), 8305. sizeof(*const_key_parts) * key_count); #1206 sql/thread_pool_info.cc:28: error: Static Initialization Order Fiasco Initializer of Show::groups_fields_info accesses global variable from a different translation unit: type_handler_stiny|. 26. namespace Show { 27. 28. static ST_FIELD_INFO groups_fields_info[] = ^ 29. { 30. Column("GROUP_ID", SLong(6), NOT_NULL), #1207 sql/thread_pool_info.cc:90: error: Static Initialization Order Fiasco Initializer of Show::queues_field_info accesses global variable from a different translation unit: type_handler_ulonglong|. 88. namespace Show { 89. 90. static ST_FIELD_INFO queues_field_info[] = ^ 91. { 92. Column("GROUP_ID", SLong(6), NOT_NULL), #1208 sql/thread_pool_info.cc:163: error: Static Initialization Order Fiasco Initializer of Show::stats_fields_info accesses global variable from a different translation unit: type_handler_slonglong|. 161. namespace Show { 162. 163. static ST_FIELD_INFO stats_fields_info[] = ^ 164. { 165. Column("GROUP_ID", SLong(6), NOT_NULL), #1209 sql/thread_pool_info.cc:239: error: Static Initialization Order Fiasco Initializer of Show::waits_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 237. namespace Show { 238. 239. static ST_FIELD_INFO waits_fields_info[] = ^ 240. { 241. Column("REASON", Varchar(16), NOT_NULL), #1210 sql/threadpool_common.cc:438: error: Deadlock Potential self deadlock. `threadpool_process_request` locks `&(this->LOCK_thd_data.m_mutex)` in `class THD` twice. Additional report(s) on the same line were suppressed. 436. 437. resume: 438. retval= do_command(thd, false); ^ 439. switch(retval) 440. { #1211 sql/tztime.cc:330: error: Uninitialized Value `end_l` is read without initialization. 328. { 329. my_time_t cur_t= MY_TIME_T_MIN; 330. my_time_t cur_l, end_t, UNINIT_VAR(end_l); ^ 331. my_time_t cur_max_seen_l= MY_TIME_T_MIN; 332. long cur_offset, cur_corr, cur_off_and_corr; #1212 sql/unireg.cc:619: error: Dead Store The value written to `&pos` is never used. 617. pos+=2; 618. memcpy(pos, create_info->comment.str, create_info->comment.length); 619. pos+= create_info->comment.length; ^ 620. } 621. #1213 sql/wsrep_mysqld.cc:3163: error: Dead Store The value written to `&client_state` is never used. 3161. if (wsrep_debug) 3162. { 3163. wsrep::client_state& client_state(thd->wsrep_cs()); ^ 3164. WSREP_DEBUG("%s TO END: %lld: %s", 3165. is_replaying_connection(thd) ? "Replay" : "Apply", #1214 sql/wsrep_sst.cc:251: error: Dead Store The value written to `&ptr` is never used. 249. 250. if (my_defaults_group_suffix) 251. ptr= strxnmov(ptr, end - ptr, ^ 252. WSREP_SST_OPT_CONF_SUFFIX, " '", my_defaults_group_suffix, "' ", NULL); 253. } #1215 sql/wsrep_sst.cc:1386: error: Dead Store The value written to `&addr_len` is never used. 1384. addr_in = ip_buf; 1385. 1386. ssize_t addr_len= -ENOSYS; ^ 1387. method = wsrep_sst_method; 1388. if (!strcmp(method, WSREP_SST_MYSQLDUMP)) #1216 sql/wsrep_sst.cc:1756: error: Dead Store The value written to `&err` is never used. 1754. WSREP_INFO("Running: '%s'", arg->cmd); 1755. 1756. int err= 1; ^ 1757. bool locked= false; 1758. #1217 sql/wsrep_var.cc:845: error: Dead Store The value written to `&ret` is never used. 843. return false; 844. } 845. int ret= 1; ^ 846. if (new_wsrep_desync) { 847. ret= Wsrep_server_state::instance().provider().desync(); #1218 sql/xa.cc:824: error: Dead Store The value written to `&res` is never used. 822. { 823. my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only"); 824. res= 1; ^ 825. goto _end_external_xid; 826. } #1219 storage/archive/ha_archive.cc:288: error: Uninitialized Value `s.file` is read without initialization during the call to `azopen()`. 286. DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); 287. 288. if (!(azopen(&frm_stream, az_file, O_RDONLY|O_BINARY))) ^ 289. { 290. if (errno == EROFS || errno == EACCES) #1220 storage/archive/ha_archive.cc:522: error: Uninitialized Value `s.file` is read without initialization during the call to `azopen()`. 520. compression writes). 521. */ 522. if (!(azopen(&archive_tmp, tmp_share->data_file_name, O_RDONLY|O_BINARY))) ^ 523. { 524. delete tmp_share; #1221 storage/archive/ha_archive.cc:845: error: Uninitialized Value `s.file` is read without initialization during the call to `azopen()`. 843. */ 844. my_errno= 0; 845. if (!(azopen(&create_stream, name_buff, O_CREAT|O_RDWR|O_BINARY))) ^ 846. { 847. error= errno; #1222 storage/archive/ha_archive.cc:1540: error: Uninitialized Value `s.file` is read without initialization during the call to `azopen()`. 1538. MY_REPLACE_EXT | MY_UNPACK_FILENAME); 1539. 1540. if (!(azopen(&writer, writer_filename, O_CREAT|O_RDWR|O_BINARY))) ^ 1541. { 1542. mysql_mutex_unlock(&share->mutex); #1223 storage/connect/array.cpp:572: error: Null Dereference null (null value originating from line 572) is dereferenced in the call to `MBVALS::MBVALS()`. 570. 571. Type = k; // k is the new type 572. Valblk = new(g) MBVALS; ^ 573. 574. switch (Type) { #1224 storage/connect/bson.cpp:212: error: Dead Store The value written to `&vlp` is never used. 210. PBVAL vlp, firstvlp, lastvlp; 211. 212. vlp = firstvlp = lastvlp = NULL; ^ 213. 214. for (; i < len; i++) #1225 storage/connect/bson.cpp:270: error: Dead Store The value written to `&bpp` is never used. 268. PBPR bpp, firstbpp, lastbpp; 269. 270. bpp = firstbpp = lastbpp = NULL; ^ 271. 272. for (; i < len; i++) #1226 storage/connect/bson.cpp:595: error: Dead Store The value written to `&err` is never used. 593. { 594. PSZ str = NULL; 595. bool b = false, err = true; ^ 596. FILE* fs = NULL; 597. #1227 storage/connect/bsonudf.cpp:197: error: Dead Store The value written to `&dg` is never used. 195. { 196. int n = (int)strlen(p); 197. my_bool dg = true, b = false; ^ 198. PJNODE jnp = &Nodes[i]; 199. #1228 storage/connect/bsonudf.cpp:747: error: Dead Store The value written to `&err` is never used. 745. if (Nodes[n].CncVal) { 746. val[0] = Nodes[n].CncVal; 747. err = vp->Compute(g, val, 1, op); ^ 748. } // endif CncVal 749. #1229 storage/connect/bsonudf.cpp:1088: error: Dead Store The value written to `&err` is never used. 1086. { 1087. PSZ str = NULL; 1088. my_bool err = true; ^ 1089. 1090. g->Message[0] = 0; #1230 storage/connect/bsonudf.cpp:1209: error: Dead Store The value written to `&err` is never used. 1207. { 1208. PSZ str = NULL; 1209. my_bool err = true; ^ 1210. PJPN jnp; 1211. #1231 storage/connect/bsonudf.cpp:1510: error: Dead Store The value written to `&len` is never used. 1508. } // endif sap 1509. 1510. len = strlen(sap); ^ 1511. } // endif n 1512. #1232 storage/connect/bsonudf.cpp:4499: error: Dead Store The value written to `&pretty` is never used. 4497. PUSH_WARNING("File pretty format doesn't match the specified pretty value"); 4498. else if (pretty == 3) 4499. pretty = pty; ^ 4500. 4501. // Check whether a path was specified #1233 storage/connect/connect.cc:316: error: Dead Store The value written to `&colp` is never used. 314. else for (p = c2; *p; p += n) { 315. // Allocate only used column blocks 316. colp = utp->ColDB(g, p, 0); ^ 317. n = strlen(p) + 1; 318. } // endfor p #1234 storage/connect/csort.cpp:374: error: Dead Store The value written to `&hi` is never used. 372. /*******************************************************************/ 373. him = mid = i = base + (lo >> 1); 374. hi = rc = 0; ^ 375. 376. #ifdef DEBTRACE #1235 storage/connect/filamap.h:31: error: Null Dereference null (null value originating from line 31) is dereferenced in the call to `MAPFAM::MAPFAM()`. 29. int GetNextPos(void) override; 30. PTXF Duplicate(PGLOBAL g) override 31. {return (PTXF)new(g) MAPFAM(this);} ^ 32. 33. // Methods #1236 storage/connect/filamap.h:74: error: Null Dereference null (null value originating from line 74) is dereferenced in the call to `MBKFAM::MBKFAM()`. 72. // Implementation 73. PTXF Duplicate(PGLOBAL g) override 74. {return (PTXF)new(g) MBKFAM(this);} ^ 75. 76. // Methods #1237 storage/connect/filamap.h:102: error: Null Dereference null (null value originating from line 102) is dereferenced in the call to `MPXFAM::MPXFAM()`. 100. int GetPos(void) override; 101. PTXF Duplicate(PGLOBAL g) override 102. {return (PTXF)new(g) MPXFAM(this);} ^ 103. 104. // Methods #1238 storage/connect/filamdbf.h:60: error: Null Dereference null (null value originating from line 60) is dereferenced in the call to `DBFFAM::DBFFAM()`. 58. AMT GetAmType(void) override {return TYPE_AM_DBF;} 59. PTXF Duplicate(PGLOBAL g) override 60. {return (PTXF)new(g) DBFFAM(this);} ^ 61. 62. // Methods #1239 storage/connect/filamdbf.h:93: error: Null Dereference null (null value originating from line 93) is dereferenced in the call to `DBMFAM::DBMFAM()`. 91. AMT GetAmType(void) override {return TYPE_AM_DBF;} 92. PTXF Duplicate(PGLOBAL g) override 93. {return (PTXF)new(g) DBMFAM(this);} ^ 94. int GetDelRows(void) override; 95. #1240 storage/connect/filamfix.cpp:985: error: Dead Store The value written to `&card` is never used. 983. if (g) { 984. char filename[_MAX_PATH]; 985. int card = -1; ^ 986. BIGINT fsize; 987. #1241 storage/connect/filamfix.h:30: error: Null Dereference null (null value originating from line 30) is dereferenced in the call to `FIXFAM::FIXFAM()`. 28. AMT GetAmType(void) override {return TYPE_AM_FIX;} 29. PTXF Duplicate(PGLOBAL g) override 30. {return (PTXF)new(g) FIXFAM(this);} ^ 31. 32. // Methods #1242 storage/connect/filamfix.h:68: error: Null Dereference null (null value originating from line 68) is dereferenced in the call to `BGXFAM::BGXFAM()`. 66. // Implementation 67. PTXF Duplicate(PGLOBAL g) override 68. {return (PTXF)new(g) BGXFAM(this);} ^ 69. 70. // Methods #1243 storage/connect/filamgz.cpp:1395: error: Dead Store The value written to `&rc` is never used. 1393. 1394. if (Tdbp->GetMode() == MODE_READ) 1395. rc = inflateEnd(Zstream); ^ 1396. else 1397. rc = deflateEnd(Zstream); #1244 storage/connect/filamgz.cpp:1397: error: Dead Store The value written to `&rc` is never used. 1395. rc = inflateEnd(Zstream); 1396. else 1397. rc = deflateEnd(Zstream); ^ 1398. 1399. } // end of CloseTableFile #1245 storage/connect/filamgz.h:35: error: Null Dereference null (null value originating from line 35) is dereferenced in the call to `GZFAM::GZFAM()`. 33. int GetNextPos(void) override; 34. PTXF Duplicate(PGLOBAL g) override 35. {return (PTXF)new(g) GZFAM(this);} ^ 36. 37. // Methods #1246 storage/connect/filamgz.h:77: error: Null Dereference null (null value originating from line 77) is dereferenced in the call to `ZBKFAM::ZBKFAM()`. 75. int GetNextPos(void) override {return 0;} 76. PTXF Duplicate(PGLOBAL g) override 77. {return (PTXF)new(g) ZBKFAM(this);} ^ 78. 79. // Methods #1247 storage/connect/filamgz.h:113: error: Null Dereference null (null value originating from line 113) is dereferenced in the call to `GZXFAM::GZXFAM()`. 111. int GetNextPos(void) override {return 0;} 112. PTXF Duplicate(PGLOBAL g) override 113. {return (PTXF)new(g) GZXFAM(this);} ^ 114. 115. // Methods #1248 storage/connect/filamgz.h:147: error: Null Dereference null (null value originating from line 147) is dereferenced in the call to `ZLBFAM::ZLBFAM()`. 145. int GetNextPos(void) override; 146. PTXF Duplicate(PGLOBAL g) override 147. {return (PTXF)new(g) ZLBFAM(this);} ^ 148. inline void SetOptimized(bool b) {Optimized = b;} 149. #1249 storage/connect/filamtxt.cpp:1221: error: Dead Store The value written to `&rc` is never used. 1219. 1220. // Delete the old file and rename the new temp file. 1221. rc = RenameTempFile(g); // Also close all files ^ 1222. } else { 1223. rc = PlugCloseFile(g, To_Fb); #1250 storage/connect/filamtxt.cpp:1630: error: Dead Store The value written to `&rc` is never used. 1628. 1629. // Delete the old file and rename the new temp file. 1630. rc = RenameTempFile(g); // Also close all files ^ 1631. } else { 1632. // Closing is True if last Write was in error #1251 storage/connect/filamtxt.h:142: error: Null Dereference null (null value originating from line 142) is dereferenced in the call to `DOSFAM::DOSFAM()`. 140. int GetNextPos(void) override; 141. PTXF Duplicate(PGLOBAL g) override 142. {return (PTXF)new(g) DOSFAM(this);} ^ 143. 144. // Methods #1252 storage/connect/filamtxt.h:190: error: Null Dereference null (null value originating from line 190) is dereferenced in the call to `BLKFAM::BLKFAM()`. 188. int GetNextPos(void) override; 189. PTXF Duplicate(PGLOBAL g) override 190. {return (PTXF)new(g) BLKFAM(this);} ^ 191. 192. // Methods #1253 storage/connect/filamtxt.h:228: error: Null Dereference null (null value originating from line 228) is dereferenced in the call to `BINFAM::BINFAM()`. 226. //virtual int GetPos(void); 227. //virtual int GetNextPos(void); 228. PTXF Duplicate(PGLOBAL g) override { return (PTXF)new(g) BINFAM(this); } ^ 229. 230. // Methods #1254 storage/connect/filamvct.cpp:213: error: Dead Store The value written to `&k` is never used. 211. return n; 212. } else if (Header == 3) 213. k = lseek(h, -(int)sizeof(VECHEADER), SEEK_END); ^ 214. 215. if ((k = read(h, &vh, sizeof(vh))) != sizeof(vh)) { #1255 storage/connect/filamvct.cpp:1139: error: Dead Store The value written to `&rc` is never used. 1137. } else if (mode == MODE_DELETE && UseTemp && T_Stream) { 1138. if (MaxBlk) 1139. rc = CleanUnusedSpace(g); ^ 1140. 1141. if ((rc = RenameTempFile(g)) != RC_FX) { #1256 storage/connect/filamvct.cpp:2474: error: Dead Store The value written to `&rc` is never used. 2472. snprintf(g->Message, sizeof(g->Message), MSG(RENAME_ERROR), 2473. tempname, filename, strerror(errno)); 2474. rc = rename(filetemp, filename); // Restore saved file ^ 2475. rc = RC_FX; 2476. } else if (remove(filetemp)) { #1257 storage/connect/filamvct.cpp:4217: error: Dead Store The value written to `&rc` is never used. 4215. } else if (mode == MODE_DELETE && UseTemp && Tfile) { 4216. if (MaxBlk) 4217. rc = CleanUnusedSpace(g); ^ 4218. 4219. if ((rc = RenameTempFile(g)) != RC_FX) { #1258 storage/connect/filamvct.h:39: error: Null Dereference null (null value originating from line 39) is dereferenced in the call to `VCTFAM::VCTFAM()`. 37. AMT GetAmType(void) override {return TYPE_AM_VCT;} 38. PTXF Duplicate(PGLOBAL g) override 39. {return (PTXF)new(g) VCTFAM(this);} ^ 40. int GetFileLength(PGLOBAL g) override; 41. #1259 storage/connect/filamvct.h:103: error: Null Dereference null (null value originating from line 103) is dereferenced in the call to `VCMFAM::VCMFAM()`. 101. AMT GetAmType(void) override {return TYPE_AM_VMP;} 102. PTXF Duplicate(PGLOBAL g) override 103. {return (PTXF)new(g) VCMFAM(this);} ^ 104. 105. // Methods #1260 storage/connect/filamvct.h:141: error: Null Dereference null (null value originating from line 141) is dereferenced in the call to `VECFAM::VECFAM()`. 139. // Implementation 140. PTXF Duplicate(PGLOBAL g) override 141. {return (PTXF)new(g) VECFAM(this);} ^ 142. 143. // Methods #1261 storage/connect/filamvct.h:188: error: Null Dereference null (null value originating from line 188) is dereferenced in the call to `VMPFAM::VMPFAM()`. 186. // Implementation 187. PTXF Duplicate(PGLOBAL g) override 188. {return (PTXF)new(g) VMPFAM(this);} ^ 189. 190. // Methods #1262 storage/connect/filamvct.h:218: error: Null Dereference null (null value originating from line 218) is dereferenced in the call to `BGVFAM::BGVFAM()`. 216. // Implementation 217. PTXF Duplicate(PGLOBAL g) override 218. {return (PTXF)new(g) BGVFAM(this);} ^ 219. 220. // Methods #1263 storage/connect/filamzip.cpp:268: error: Null Dereference null (null value originating from line 268) is dereferenced in the call to `ZIPUTIL::ZIPUTIL()`. 266. char *buf; 267. bool err; 268. ZIPUTIL *zutp = new(g) ZIPUTIL(NULL); ^ 269. 270. if (zutp->open(g, zfn, append)) #1264 storage/connect/filamzip.cpp:839: error: Dead Store The value written to `&card` is never used. 837. return 1; 838. 839. int card = -1; ^ 840. int len = GetFileLength(g); 841. #1265 storage/connect/filamzip.cpp:1211: error: Dead Store The value written to `&card` is never used. 1209. return 1; 1210. 1211. int card = -1; ^ 1212. 1213. card = Records; #1266 storage/connect/filamzip.h:101: error: Null Dereference null (null value originating from line 101) is dereferenced in the call to `UNZFAM::UNZFAM()`. 99. // Implementation 100. AMT GetAmType(void) override {return TYPE_AM_ZIP;} 101. PTXF Duplicate(PGLOBAL g) override {return (PTXF) new(g) UNZFAM(this);} ^ 102. 103. // Methods #1267 storage/connect/filamzip.h:133: error: Null Dereference null (null value originating from line 133) is dereferenced in the call to `UZXFAM::UZXFAM()`. 131. // Implementation 132. AMT GetAmType(void) override { return TYPE_AM_ZIP; } 133. PTXF Duplicate(PGLOBAL g) override { return (PTXF) new(g)UZXFAM(this); } ^ 134. 135. // Methods #1268 storage/connect/filamzip.h:160: error: Null Dereference null (null value originating from line 160) is dereferenced in the call to `UZDFAM::UZDFAM()`. 158. // Implementation 159. AMT GetAmType(void) override { return TYPE_AM_ZIP; } 160. PTXF Duplicate(PGLOBAL g) override { return (PTXF) new(g)UZDFAM(this); } ^ 161. 162. // Methods #1269 storage/connect/filter.cpp:98: error: Null Dereference null (null value originating from line 98) is dereferenced in the call to `FILTER::FILTER()`. 96. PFIL MakeFilter(PGLOBAL g, PFIL fp1, OPVAL vop, PFIL fp2) 97. { 98. PFIL filp = new(g) FILTER(g, vop); ^ 99. 100. filp->Arg(0) = fp1; #1270 storage/connect/fmdlex.c:1207: error: Null Dereference `b` could be null (from the call to `yy_flex_alloc()` on line 1202) and is dereferenced. 1205. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1206. 1207. b->yy_buf_size = size; ^ 1208. 1209. /* yy_ch_buf has to be 2 characters longer than the size given because #1271 storage/connect/ha_connect.cc:2926: error: Dead Store The value written to `&pb0` is never used. 2924. return NULL; 2925. else 2926. pb0= pb1= pb2= ph0= ph1= ph2= NULL; ^ 2927. 2928. if (trace(1)) #1272 storage/connect/ha_connect.cc:3949: error: Dead Store The value written to `&op` is never used. 3947. { 3948. int rc; 3949. OPVAL op= OP_XX; ^ 3950. DBUG_ENTER("ha_connect::index_read"); 3951. #1273 storage/connect/ha_connect.cc:4499: error: Dead Store The value written to `&rc` is never used. 4497. tdbp->GetFtype() != RECFM_NAF) 4498. // Close and reopen the table so it will be deleted 4499. rc= CloseTable(g); ^ 4500. 4501. if (!(rc= OpenTable(g))) { #1274 storage/connect/ha_connect.cc:5622: error: Dead Store The value written to `&fncn` is never used. 5620. { 5621. char v=0; 5622. PCSZ fncn= "?"; ^ 5623. PCSZ user, fn, db, host, pwd, sep, tbl, src; 5624. PCSZ col, ocl, rnk, pic, fcl, skc, zfn; #1275 storage/connect/ha_connect.cc:5642: error: Dead Store The value written to `&fnc` is never used. 5640. PCSZ driver= NULL; 5641. #endif // JAVA_SUPPORT 5642. uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL); ^ 5643. bool bif, ok= false, dbf= false; 5644. TABTYPE ttp= TAB_UNDEF, ttr=TAB_UNDEF; #1276 storage/connect/ha_connect.cc:5658: error: Dead Store The value written to `&user` is never used. 5656. 5657. sql.copy(STRING_WITH_LEN("CREATE TABLE whatever ("), system_charset_info); 5658. user= host= pwd= tbl= src= col= ocl= pic= fcl= skc= rnk= zfn= NULL; ^ 5659. dsn= url= NULL; 5660. #1277 storage/connect/javaconn.cpp:601: error: Dead Store The value written to `&rc` is never used. 599. 600. // Could have been detached in case of join 601. rc = jvm->AttachCurrentThread((void**)&env, nullptr); ^ 602. 603. if (gmID(m_G, did, DiscFunc, "()I")) #1278 storage/connect/jdbconn.cpp:447: error: Null Dereference null (null value originating from line 447) is dereferenced in the call to `JDBConn::JDBConn()`. 445. char *sqry; 446. PQRYRES qrp; 447. JDBConn *jcp = new(g)JDBConn(g, NULL); ^ 448. 449. if (jcp->Connect(sjp)) #1279 storage/connect/jdbconn.cpp:449: error: Null Dereference `jcp` could be null (null value originating from line 447) and is dereferenced. 447. JDBConn *jcp = new(g)JDBConn(g, NULL); 448. 449. if (jcp->Connect(sjp)) ^ 450. return NULL; 451. #1280 storage/connect/jdbconn.cpp:1502: error: Dead Store The value written to `&fnc` is never used. 1500. // void *buffer; 1501. int i, ncol; 1502. PCSZ fnc = "Unknown"; ^ 1503. uint n; 1504. short len, tp; #1281 storage/connect/jmgfam.h:38: error: Null Dereference null (null value originating from line 38) is dereferenced in the call to `JMGFAM::JMGFAM()`. 36. int GetPos(void) override; 37. int GetNextPos(void) override; 38. PTXF Duplicate(PGLOBAL g) override { return (PTXF)new(g) JMGFAM(this); } ^ 39. void SetLrecl(int lrecl) { Lrecl = lrecl; } 40. #1282 storage/connect/jmgoconn.cpp:339: error: Dead Store The value written to `&len` is never used. 337. 338. s = new(g) STRING(g, 1023, (PSZ)filter); 339. len = s->GetLength(); ^ 340. 341. if (filp) { #1283 storage/connect/jmgoconn.cpp:541: error: Null Dereference null (null value originating from line 541) is dereferenced in the call to `JNCOL::JNCOL()`. 539. void JMgoConn::MakeColumnGroups(PGLOBAL g, PTDB tdbp) 540. { 541. Fpc = new(g) JNCOL(); ^ 542. 543. for (PCOL colp = tdbp->GetColumns(); colp; colp = colp->GetNext()) #1284 storage/connect/json.cpp:270: error: Null Dereference null (null value originating from line 270) is dereferenced in the call to `JDOC::JDOC()`. 268. 269. try { 270. jdp = new(g) JDOC; // MUST BE ALLOCATED BEFORE jp !!!!! ^ 271. jdp->dfp = GetDefaultPrec(); 272. #1285 storage/connect/json.cpp:627: error: Null Dereference null (null value originating from line 627) is dereferenced in the call to `JOBJECT::JOBJECT()`. 625. PSZ key; 626. int level = -1; 627. PJOB jobp = new(g) JOBJECT; ^ 628. PJPR jpp = NULL; 629. #1286 storage/connect/json.cpp:689: error: Null Dereference null (null value originating from line 689) is dereferenced in the call to `JVALUE::JVALUE()`. 687. PJVAL JDOC::ParseValue(PGLOBAL g, int& i) 688. { 689. PJVAL jvp = new(g) JVALUE; ^ 690. 691. for (; i < len; i++) #1287 storage/connect/json.cpp:1090: error: Null Dereference null (null value originating from line 1090) is dereferenced in the call to `JARRAY::JARRAY()`. 1088. PJAR JOBJECT::GetKeyList(PGLOBAL g) 1089. { 1090. PJAR jarp = new(g) JARRAY(); ^ 1091. 1092. for (PJPR jpp = First; jpp; jpp = jpp->Next) #1288 storage/connect/json.cpp:1104: error: Null Dereference null (null value originating from line 1104) is dereferenced in the call to `JARRAY::JARRAY()`. 1102. PJAR JOBJECT::GetValList(PGLOBAL g) 1103. { 1104. PJAR jarp = new(g) JARRAY(); ^ 1105. 1106. for (PJPR jpp = First; jpp; jpp = jpp->Next) #1289 storage/connect/jsonudf.cpp:118: error: Dead Store The value written to `&dg` is never used. 116. { 117. int n = (int)strlen(p); 118. my_bool dg = true, b = false; ^ 119. PJNODE jnp = &Nodes[i]; 120. #1290 storage/connect/jsonudf.cpp:635: error: Dead Store The value written to `&err` is never used. 633. if (Nodes[n].CncVal) { 634. val[0] = Nodes[n].CncVal; 635. err = vp->Compute(g, val, 1, op); ^ 636. } // endif CncVal 637. #1291 storage/connect/jsonudf.cpp:849: error: Dead Store The value written to `&err` is never used. 847. { 848. PSZ str = NULL; 849. my_bool err = true; ^ 850. 851. g->Message[0] = 0; #1292 storage/connect/jsonudf.cpp:971: error: Dead Store The value written to `&err` is never used. 969. { 970. PSZ str = NULL; 971. my_bool err = true; ^ 972. PJPN jnp; 973. #1293 storage/connect/jsonudf.cpp:1288: error: Dead Store The value written to `&g` is never used. 1286. { 1287. g->Activityp = NULL; 1288. g = PlugExit(g); ^ 1289. } /* end of JsonFreeMem */ 1290. #1294 storage/connect/jsonudf.cpp:1371: error: Dead Store The value written to `&g` is never used. 1369. } else if (g->Sarea_Size == 0) { 1370. strcpy(message, g->Message); 1371. g = PlugExit(g); ^ 1372. return true; 1373. } // endif g #1295 storage/connect/jsonudf.cpp:1966: error: Dead Store The value written to `&len` is never used. 1964. } // endif sap 1965. 1966. len = strlen(sap); ^ 1967. } // endif n 1968. #1296 storage/connect/jsonudf.cpp:3238: error: Null Dereference The call to `JsonNew` may trigger the following issue: null (from the call to `JsonNew()` on line 3238) is dereferenced in the call to `JsonNew()`. 3236. 3237. PlugSubSet(g->Sarea, g->Sarea_Size); 3238. g->Activityp = (PACTIVITY)JsonNew(g, TYPE_JAR); ^ 3239. g->N = GetJsonGroupSize(); 3240. } // end of json_array_grp_clear #1297 storage/connect/jsonudf.cpp:3309: error: Null Dereference The call to `JsonNew` may trigger the following issue: null (from the call to `JsonNew()` on line 3309) is dereferenced in the call to `JsonNew()`. 3307. 3308. PlugSubSet(g->Sarea, g->Sarea_Size); 3309. g->Activityp = (PACTIVITY)JsonNew(g, TYPE_JOB); ^ 3310. g->N = GetJsonGroupSize(); 3311. } // end of json_object_grp_clear #1298 storage/connect/jsonudf.cpp:4582: error: Dead Store The value written to `&pretty` is never used. 4580. PUSH_WARNING("File pretty format doesn't match the specified pretty value"); 4581. else if (pretty == 3) 4582. pretty = pty; ^ 4583. 4584. // Check whether a path was specified #1299 storage/connect/jsonudf.cpp:6630: error: Null Dereference `str1` could be null (null value originating from line 6628) and is dereferenced. 6628. s = str1 = (PSZ)malloc(lg + 1); 6629. memcpy(str1, args->args[0], lg); 6630. str1[lg] = 0; ^ 6631. 6632. lg = (size_t)args->lengths[1]; #1300 storage/connect/jsonudf.cpp:6635: error: Null Dereference `str2` could be null (null value originating from line 6633) and is dereferenced. 6633. str2 = (PSZ)malloc(lg + 1); 6634. memcpy(str2, args->args[1], lg); 6635. str2[lg] = 0; ^ 6636. 6637. while ((s = strstr(s, str2))) { #1301 storage/connect/libdoc.cpp:267: error: Null Dereference null (null value originating from line 267) is dereferenced in the call to `LIBXMLDOC::LIBXMLDOC()`. 265. char *enc, PFBLOCK fp) 266. { 267. return (PXDOC) new(g) LIBXMLDOC(nsl, nsdf, enc, fp); ^ 268. } // end of GetLibxmlDoc 269. #1302 storage/connect/libdoc.cpp:478: error: Null Dereference null (null value originating from line 478) is dereferenced in the call to `XML2ATTR::XML2ATTR()`. 476. PXATTR LIBXMLDOC::NewPattr(PGLOBAL g) 477. { 478. return new(g) XML2ATTR(this, NULL, NULL); ^ 479. } // end of NewPattr 480. #1303 storage/connect/libdoc.cpp:486: error: Null Dereference null (null value originating from line 486) is dereferenced in the call to `XML2NODELIST::XML2NODELIST()`. 484. PXLIST LIBXMLDOC::NewPlist(PGLOBAL g) 485. { 486. return new(g) XML2NODELIST(this, NULL); ^ 487. } // end of NewPlist 488. #1304 storage/connect/osutil.c:158: error: Dead Store The value written to `&p` is never used. 156. char buff[2*_MAX_PATH]; 157. 158. p= getcwd(buff, _MAX_PATH); ^ 159. assert(p); 160. safe_strcat(buff, sizeof(buff), "/"); #1305 storage/connect/tabbson.cpp:1034: error: Dead Store The value written to `&err` is never used. 1032. if (nodes[n].CncVal) { 1033. val[0] = nodes[n].CncVal; 1034. err = vp->Compute(g, val, 1, op); ^ 1035. } // endif CncVal 1036. #1306 storage/connect/tabbson.cpp:1358: error: Null Dereference null (null value originating from line 1358) is dereferenced in the call to `BTUTIL::BTUTIL()`. 1356. TDBBSN::TDBBSN(PGLOBAL g, PBDEF tdp, PTXF txfp) : TDBDOS(tdp, txfp) 1357. { 1358. Bp = new(g) BTUTIL(tdp->G, this); ^ 1359. Top = NULL; 1360. Row = NULL; #1307 storage/connect/tabbson.cpp:1422: error: Null Dereference null (null value originating from line 1422) is dereferenced in the call to `TDBBSN::TDBBSN()`. 1420. PGLOBAL g = t->G; 1421. 1422. tp = new(g) TDBBSN(this); ^ 1423. 1424. for (cp1 = (PBSCOL)Columns; cp1; cp1 = (PBSCOL)cp1->GetNext()) { #1308 storage/connect/tabbson.cpp:1781: error: Dead Store The value written to `&dg` is never used. 1779. { 1780. int n; 1781. bool dg = true, b = false; ^ 1782. PJNODE jnp = &Nodes[i]; 1783. #1309 storage/connect/tabbson.cpp:2215: error: Null Dereference null (null value originating from line 2215) is dereferenced in the call to `TDBBSON::TDBBSON()`. 2213. PGLOBAL g = t->G; 2214. 2215. tp = new(g) TDBBSON(this); ^ 2216. 2217. for (cp1 = (PBSCOL)Columns; cp1; cp1 = (PBSCOL)cp1->GetNext()) { #1310 storage/connect/tabbson.cpp:2630: error: Null Dereference null (from the call to `BSONColumns()` on line 2630) is dereferenced in the call to `BSONColumns()`. 2628. /***********************************************************************/ 2629. PQRYRES TDBBCL::GetResult(PGLOBAL g) { 2630. return BSONColumns(g, Db, Dsn, Topt, false); ^ 2631. } // end of GetResult 2632. #1311 storage/connect/tabbson.h:175: error: Null Dereference null (null value originating from line 175) is dereferenced in the call to `TDBBSN::TDBBSN()`. 173. AMT GetAmType(void) override { return TYPE_AM_JSN; } 174. bool SkipHeader(PGLOBAL g) override; 175. PTDB Duplicate(PGLOBAL g) override { return (PTDB)new(g) TDBBSN(this); } ^ 176. PBVAL GetRow(void) { return Row; } 177. #1312 storage/connect/tabbson.h:292: error: Null Dereference null (null value originating from line 292) is dereferenced in the call to `TDBBSON::TDBBSON()`. 290. // Implementation 291. AMT GetAmType(void) override { return TYPE_AM_JSON; } 292. PTDB Duplicate(PGLOBAL g) override { return (PTDB)new(g) TDBBSON(this); } ^ 293. PBVAL GetDoc(void) { return Docp; } 294. #1313 storage/connect/tabdos.cpp:1050: error: Dead Store The value written to `&flen` is never used. 1048. char filename[_MAX_PATH]; 1049. int h; 1050. int flen = -1; ^ 1051. 1052. PlugSetPath(filename, defp->Fn, GetPath()); #1314 storage/connect/tabdos.cpp:2697: error: Dead Store The value written to `&len` is never used. 2695. safe_strcat(fmt, sizeof(fmt), "0"); 2696. 2697. len = sprintf(Buf, fmt, field - i, Value->GetShortValue()); ^ 2698. break; 2699. case TYPE_INT: #1315 storage/connect/tabdos.cpp:2707: error: Dead Store The value written to `&len` is never used. 2705. safe_strcat(fmt,sizeof(fmt), "0"); 2706. 2707. len = sprintf(Buf, fmt, field - i, Value->GetIntValue()); ^ 2708. break; 2709. case TYPE_TINY: #1316 storage/connect/tabdos.cpp:2717: error: Dead Store The value written to `&len` is never used. 2715. safe_strcat(fmt, sizeof(fmt), "0"); 2716. 2717. len = sprintf(Buf, fmt, field - i, Value->GetTinyValue()); ^ 2718. break; 2719. case TYPE_DOUBLE: #1317 storage/connect/tabdos.cpp:2735: error: Dead Store The value written to `&len` is never used. 2733. } // endif Buf(i) 2734. 2735. len = strlen(Buf); ^ 2736. break; 2737. default: #1318 storage/connect/tabjdbc.cpp:1286: error: Null Dereference The call to `JDBCDrivers` may trigger the following issue: null (from the call to `JDBCDrivers()` on line 1286) is dereferenced in the call to `JDBCDrivers()`. 1284. PQRYRES TDBJDRV::GetResult(PGLOBAL g) 1285. { 1286. return JDBCDrivers(g, Maxres, false); ^ 1287. } // end of GetResult 1288. #1319 storage/connect/tabjdbc.cpp:1286: error: Null Dereference null (null value originating from line 1286) is dereferenced in the call to `JDBCDrivers()`. 1284. PQRYRES TDBJDRV::GetResult(PGLOBAL g) 1285. { 1286. return JDBCDrivers(g, Maxres, false); ^ 1287. } // end of GetResult 1288. #1320 storage/connect/tabjdbc.cpp:1312: error: Null Dereference The call to `JDBCTables` may trigger the following issue: null (from the call to `JDBCTables()` on line 1312) is dereferenced in the call to `JDBCTables()`. 1310. PQRYRES TDBJTB::GetResult(PGLOBAL g) 1311. { 1312. return JDBCTables(g, Schema, Tab, Tabtype, Maxres, false, &Ops); ^ 1313. } // end of GetResult 1314. #1321 storage/connect/tabjdbc.cpp:1312: error: Null Dereference null (null value originating from line 1312) is dereferenced in the call to `JDBCTables()`. 1310. PQRYRES TDBJTB::GetResult(PGLOBAL g) 1311. { 1312. return JDBCTables(g, Schema, Tab, Tabtype, Maxres, false, &Ops); ^ 1313. } // end of GetResult 1314. #1322 storage/connect/tabjdbc.cpp:1330: error: Null Dereference The call to `JDBCColumns` may trigger the following issue: null (from the call to `JDBCColumns()` on line 1330) is dereferenced in the call to `JDBCColumns()`. 1328. PQRYRES TDBJDBCL::GetResult(PGLOBAL g) 1329. { 1330. return JDBCColumns(g, Schema, Tab, Colpat, Maxres, false, &Ops); ^ 1331. } // end of GetResult #1323 storage/connect/tabjdbc.cpp:1330: error: Null Dereference null (null value originating from line 1330) is dereferenced in the call to `JDBCColumns()`. 1328. PQRYRES TDBJDBCL::GetResult(PGLOBAL g) 1329. { 1330. return JDBCColumns(g, Schema, Tab, Colpat, Maxres, false, &Ops); ^ 1331. } // end of GetResult #1324 storage/connect/tabjson.cpp:884: error: Null Dereference null (null value originating from line 884) is dereferenced in the call to `TDBJSN::TDBJSN()`. 882. PGLOBAL g = t->G; 883. 884. tp = new(g) TDBJSN(this); ^ 885. 886. for (cp1 = (PJCOL)Columns; cp1; cp1 = (PJCOL)cp1->GetNext()) { #1325 storage/connect/tabjson.cpp:1375: error: Dead Store The value written to `&dg` is never used. 1373. { 1374. int n; 1375. bool dg = true, b = false; ^ 1376. PJNODE jnp = &Nodes[i]; 1377. #1326 storage/connect/tabjson.cpp:2012: error: Dead Store The value written to `&err` is never used. 2010. if (Nodes[n].CncVal) { 2011. val[0] = Nodes[n].CncVal; 2012. err = vp->Compute(g, val, 1, op); ^ 2013. } // endif CncVal 2014. #1327 storage/connect/tabjson.cpp:2261: error: Null Dereference null (null value originating from line 2261) is dereferenced in the call to `TDBJSON::TDBJSON()`. 2259. PGLOBAL g = t->G; 2260. 2261. tp = new(g) TDBJSON(this); ^ 2262. 2263. for (cp1 = (PJCOL)Columns; cp1; cp1 = (PJCOL)cp1->GetNext()) { #1328 storage/connect/tabjson.cpp:2277: error: Null Dereference null (null value originating from line 2277) is dereferenced in the call to `JARRAY::JARRAY()`. 2275. { 2276. // Create a void table that will be populated 2277. Doc = new(g) JARRAY; ^ 2278. 2279. if (MakeTopTree(g, Doc)) #1329 storage/connect/tabjson.cpp:2703: error: Null Dereference null (from the call to `JSONColumns()` on line 2703) is dereferenced in the call to `JSONColumns()`. 2701. PQRYRES TDBJCL::GetResult(PGLOBAL g) 2702. { 2703. return JSONColumns(g, Db, Dsn, Topt, false); ^ 2704. } // end of GetResult 2705. #1330 storage/connect/tabjson.h:146: error: Null Dereference null (null value originating from line 146) is dereferenced in the call to `TDBJSN::TDBJSN()`. 144. AMT GetAmType(void) override {return TYPE_AM_JSN;} 145. bool SkipHeader(PGLOBAL g) override; 146. PTDB Duplicate(PGLOBAL g) override {return (PTDB)new(g) TDBJSN(this);} ^ 147. PJSON GetRow(void) {return Row;} 148. void SetG(PGLOBAL g) {G = g;} #1331 storage/connect/tabjson.h:273: error: Null Dereference null (null value originating from line 273) is dereferenced in the call to `TDBJSON::TDBJSON()`. 271. // Implementation 272. AMT GetAmType(void) override {return TYPE_AM_JSON;} 273. PTDB Duplicate(PGLOBAL g) override {return (PTDB)new(g) TDBJSON(this);} ^ 274. PJAR GetDoc(void) {return Doc;} 275. #1332 storage/connect/taboccur.cpp:66: error: Dead Store The value written to `&p` is never used. 64. // Separator can be ; if colist was specified in the option_list 65. if ((p = strchr(pn, ',')) || (p = strchr(pn, ';'))) { 66. *p++ = '\0'; ^ 67. n++; 68. } else { #1333 storage/connect/tabpivot.cpp:378: error: Null Dereference null (null value originating from line 378) is dereferenced in the call to `TDBPIVOT::TDBPIVOT()`. 376. PTDB PIVOTDEF::GetTable(PGLOBAL g, MODE) 377. { 378. return new(g) TDBPIVOT(this); ^ 379. } // end of GetTable 380. #1334 storage/connect/tabzip.cpp:47: error: Null Dereference null (null value originating from line 47) is dereferenced in the call to `TDBZIP::TDBZIP()`. 45. PTDB tdbp = NULL; 46. 47. tdbp = new(g) TDBZIP(this); ^ 48. 49. if (Multiple) #1335 storage/connect/unzip.c:787: error: Uninitialized Value `pzlib_filefunc64_32_def.zopen32_file` is read without initialization during the call to `unzOpenInternal()`. 785. zlib_filefunc64_32_def_fill.ztell32_file = NULL; 786. zlib_filefunc64_32_def_fill.zseek32_file = NULL; 787. return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 1); ^ 788. } 789. else #1336 storage/connect/unzip.c:1102: error: Dead Store The value written to `&lSeek` is never used. 1100. if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) 1101. err=UNZ_ERRNO; 1102. lSeek+=file_info.size_file_comment - uSizeRead; ^ 1103. } 1104. else #1337 storage/connect/unzip.c:1105: error: Dead Store The value written to `&lSeek` is never used. 1103. } 1104. else 1105. lSeek+=file_info.size_file_comment; ^ 1106. 1107. #1338 storage/connect/unzip.c:1538: error: Dead Store The value written to `&err` is never used. 1536. (s->cur_file_info.compression_method!=Z_DEFLATED)) 1537. 1538. err=UNZ_BADZIPFILE; ^ 1539. 1540. pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; #1339 storage/connect/user_connect.cc:155: warning: Lock Consistency Violation Read/Write race. Non-private method `user_connect::CheckCleanup` reads without synchronization from `this->last_query_id`, which races with the write in method `user_connect::CheckCleanup`. 153. bool user_connect::CheckCleanup(bool force) 154. { 155. if (thdp->query_id > last_query_id || force) { ^ 156. size_t worksize = GetWorkSize(); 157. #1340 storage/connect/user_connect.h:58: warning: Lock Consistency Violation Read/Write race. Non-private method `user_connect::CheckQueryID` reads without synchronization from `this->last_query_id`, which races with the write in method `user_connect::CheckCleanup`. 56. void SetHandler(ha_connect *hc); 57. bool CheckCleanup(bool force = false); 58. bool CheckQueryID(void) {return thdp->query_id > last_query_id;} ^ 59. bool CheckQuery(query_id_t vid) {return last_query_id > vid;} 60. #1341 storage/connect/user_connect.h:59: warning: Lock Consistency Violation Read/Write race. Non-private method `user_connect::CheckQuery` reads without synchronization from `this->last_query_id`, which races with the write in method `user_connect::CheckCleanup`. 57. bool CheckCleanup(bool force = false); 58. bool CheckQueryID(void) {return thdp->query_id > last_query_id;} 59. bool CheckQuery(query_id_t vid) {return last_query_id > vid;} ^ 60. 61. // Members #1342 storage/connect/xindex.cpp:991: error: Dead Store The value written to `&colp` is never used. 989. return true; // Error 990. } else 991. colp = To_Cols[0]; ^ 992. 993. switch (Tdbp->Ftype) { #1343 storage/connect/xindex.cpp:1245: error: Dead Store The value written to `&colp` is never used. 1243. return true; // Error 1244. } else 1245. colp = To_Cols[0]; ^ 1246. 1247. switch (Tdbp->Ftype) { #1344 storage/connect/zip.c:993: error: Dead Store The value written to `&err` is never used. 991. zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); 992. 993. err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)HeaderID,2); ^ 994. err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)DataSize,2); 995. #1345 storage/connect/zip.c:994: error: Dead Store The value written to `&err` is never used. 992. 993. err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)HeaderID,2); 994. err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)DataSize,2); ^ 995. 996. err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); #1346 storage/connect/zip.c:996: error: Dead Store The value written to `&err` is never used. 994. err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)DataSize,2); 995. 996. err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); ^ 997. err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8); 998. } #1347 storage/connect/zip.c:1487: error: Dead Store The value written to `&err` is never used. 1485. { 1486. if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) 1487. err = ZIP_ERRNO; ^ 1488. zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; 1489. zi->ci.stream.next_out = zi->ci.buffered_data; #1348 storage/connect/zip.c:1632: error: Dead Store The value written to `&p` is never used. 1630. { 1631. zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); 1632. p += 8; ^ 1633. } 1634. #1349 storage/federated/ha_federated.cc:602: error: Dead Store The value written to `&error_num` is never used. 600. int get_connection(MEM_ROOT *mem_root, FEDERATED_SHARE *share) 601. { 602. int error_num= ER_FOREIGN_SERVER_DOESNT_EXIST; ^ 603. FOREIGN_SERVER *server, server_buffer; 604. DBUG_ENTER("ha_federated::get_connection"); #1350 storage/federatedx/ha_federatedx.cc:555: error: Dead Store The value written to `&error_num` is never used. 553. int get_connection(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share) 554. { 555. int error_num= ER_FOREIGN_SERVER_DOESNT_EXIST; ^ 556. FOREIGN_SERVER *server, server_buffer; 557. DBUG_ENTER("ha_federatedx::get_connection"); #1351 storage/heap/_check.c:66: error: Dead Store The value written to `¤t_ptr` is never used. 64. if (pos < next_block) 65. { 66. current_ptr+= share->block.recbuffer; ^ 67. } 68. else #1352 storage/heap/ha_heap.cc:382: error: Uninitialized Value `_.auto_increment` is read without initialization. 380. stats.create_time= (ulong) hp_info.create_time; 381. if (flag & HA_STATUS_AUTO) 382. stats.auto_increment_value= hp_info.auto_increment; ^ 383. /* 384. If info() is called for the first time after open(), we will still #1353 storage/heap/hp_test1.c:161: error: Dead Store The value written to `&pos` is never used. 159. break; 160. case 'm': 161. remove_ant=atoi(++pos); ^ 162. break; 163. case 'V': #1354 storage/heap/hp_test2.c:587: error: Dead Store The value written to `&pos` is never used. 585. break; 586. case 'm': /* records */ 587. recant=atoi(++pos); ^ 588. break; 589. case 's': #1355 storage/heap/hp_test2.c:593: error: Dead Store The value written to `&pos` is never used. 591. break; 592. case 't': 593. testflag=atoi(++pos); /* testmod */ ^ 594. break; 595. case 'V': #1356 storage/heap/hp_write.c:207: error: Uninitialized Value `hash_of_key` is read without initialization. 205. int flag; 206. ulong halfbuff,hashnr,first_index; 207. ulong UNINIT_VAR(hash_of_key), UNINIT_VAR(hash_of_key2); ^ 208. uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); 209. HASH_INFO *empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; #1357 storage/heap/hp_write.c:207: error: Uninitialized Value `hash_of_key2` is read without initialization. 205. int flag; 206. ulong halfbuff,hashnr,first_index; 207. ulong UNINIT_VAR(hash_of_key), UNINIT_VAR(hash_of_key2); ^ 208. uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); 209. HASH_INFO *empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; #1358 storage/heap/hp_write.c:208: error: Uninitialized Value `ptr_to_rec` is read without initialization. 206. ulong halfbuff,hashnr,first_index; 207. ulong UNINIT_VAR(hash_of_key), UNINIT_VAR(hash_of_key2); 208. uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); ^ 209. HASH_INFO *empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; 210. DBUG_ENTER("hp_write_key"); #1359 storage/heap/hp_write.c:208: error: Uninitialized Value `ptr_to_rec2` is read without initialization. 206. ulong halfbuff,hashnr,first_index; 207. ulong UNINIT_VAR(hash_of_key), UNINIT_VAR(hash_of_key2); 208. uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); ^ 209. HASH_INFO *empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; 210. DBUG_ENTER("hp_write_key"); #1360 storage/heap/hp_write.c:209: error: Uninitialized Value `gpos` is read without initialization. 207. ulong UNINIT_VAR(hash_of_key), UNINIT_VAR(hash_of_key2); 208. uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); 209. HASH_INFO *empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; ^ 210. DBUG_ENTER("hp_write_key"); 211. #1361 storage/heap/hp_write.c:209: error: Uninitialized Value `gpos2` is read without initialization. 207. ulong UNINIT_VAR(hash_of_key), UNINIT_VAR(hash_of_key2); 208. uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); 209. HASH_INFO *empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; ^ 210. DBUG_ENTER("hp_write_key"); 211. #1362 storage/innobase/btr/btr0btr.cc:2833: error: Uninitialized Value `__param_0.rec` is read without initialization during the call to `page_cur_t::operator=()`. 2831. next_page_cursor.index = cursor->index(); 2832. next_page_cursor.block = next_block; 2833. next_father_cursor.page_cur = next_page_cursor; ^ 2834. 2835. if (!btr_page_get_father(mtr, &next_father_cursor)) { #1363 storage/innobase/btr/btr0btr.cc:4324: error: Dead Store The value written to `&rec` is never used. 4322. DBUG_ASSERT(rec_is_alter_metadata(rec, *index)); 4323. btr_set_instant(block, *index, mtr); 4324. rec = page_cur_insert_rec_low(&cur, rec, offsets, mtr); ^ 4325. ut_ad(rec); 4326. mem_heap_free(heap); #1364 storage/innobase/btr/btr0btr.cc:5351: error: Dead Store The value written to `&offsets` is never used. 5349. } 5350. 5351. offsets = btr_page_get_father_node_ptr_for_validate( ^ 5352. offsets, heap, &right_node_cur, &mtr); 5353. #1365 storage/innobase/btr/btr0bulk.cc:291: error: Dead Store The value written to `&c` is never used. 289. memcpy(bd, cd, len); 290. m_mtr.memmove(*m_block, bd - m_page, cd - m_page, len); 291. c= cdm; ^ 292. b= rdm - rd + bd; 293. r= rdm; #1366 storage/innobase/btr/btr0cur.cc:1406: error: Dead Store The value written to `&rw_latch` is never used. 1404. ut_ad(latch_mode == BTR_MODIFY_ROOT_AND_LEAF); 1405. static_assert(int{BTR_MODIFY_ROOT_AND_LEAF} == int{RW_SX_LATCH}, ""); 1406. rw_latch= RW_X_LATCH; ^ 1407. mtr->lock_register(block_savepoint, MTR_MEMO_PAGE_X_FIX); 1408. block->page.lock.u_x_upgrade(); #1367 storage/innobase/btr/btr0cur.cc:3883: error: Uninitialized Value `roll_ptr` is read without initialization. 3881. 3882. if (!(flags & BTR_KEEP_SYS_FLAG)) { 3883. btr_cur_write_sys(new_entry, index, trx_id, roll_ptr); ^ 3884. } 3885. #1368 storage/innobase/btr/btr0cur.cc:4205: error: Uninitialized Value `roll_ptr` is read without initialization. 4203. 4204. if (!(flags & BTR_KEEP_SYS_FLAG)) { 4205. btr_cur_write_sys(new_entry, index, trx_id, roll_ptr); ^ 4206. } 4207. #1369 storage/innobase/btr/btr0pcur.cc:616: error: Dead Store The value written to `&block` is never used. 614. /* Release the right sibling. */ 615. mtr->rollback_to_savepoint(0, 1); 616. block = left_block; ^ 617. } 618. } #1370 storage/innobase/btr/btr0sea.cc:1538: error: Memory Leak Memory dynamically allocated by `malloc` on line 1532 is not freed after the last access at line 1538, column 2. 1536. n_cached = 0; 1537. 1538. ut_a(index->id == btr_page_get_index_id(page)); ^ 1539. 1540. offsets = rec_get_offsets( #1371 storage/innobase/btr/btr0sea.cc:1538: error: Memory Leak Memory dynamically allocated by `malloc` on line 1534 is not freed after the last access at line 1538, column 2. 1536. n_cached = 0; 1537. 1538. ut_a(index->id == btr_page_get_index_id(page)); ^ 1539. 1540. offsets = rec_get_offsets( #1372 storage/innobase/buf/buf0buf.cc:558: error: Const Refable Parameter Function parameter `buf` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 556. @param[in] buf data to check 557. @return whether the buffer is all zeroes */ 558. bool buf_is_zeroes(span buf) noexcept ^ 559. { 560. ut_ad(buf.size() <= UNIV_PAGE_SIZE_MAX); #1373 storage/innobase/buf/buf0dump.cc:332: error: Memory Leak Memory dynamically allocated by `malloc` on line 313 is not freed after the last access at line 332, column 4. 330. const auto status = bpage->state(); 331. if (status < buf_page_t::UNFIXED) { 332. ut_a(status >= buf_page_t::FREED); ^ 333. continue; 334. } #1374 storage/innobase/buf/buf0dump.cc:347: error: Memory Leak Memory dynamically allocated by `malloc` on line 313 is not freed after the last access at line 347, column 2. 345. mysql_mutex_unlock(&buf_pool.mutex); 346. 347. ut_a(j <= n_pages); ^ 348. n_pages = j; 349. #1375 storage/innobase/buf/buf0flu.cc:843: error: Dead Store The value written to `&orig_size` is never used. 841. size= zip_size(); 842. #if defined HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE || defined _WIN32 843. orig_size= size; ^ 844. #endif 845. buf_flush_update_zip_checksum(write_frame, size); #1376 storage/innobase/buf/buf0flu.cc:1007: warning: Lock Consistency Violation Read/Write race. Non-private method `fil_space_t::flush_freed` indirectly reads without synchronization from `thread_local_waiter.m_group_commit_leader`, which races with the write in method `fil_space_t::flush_freed`. 1005. break; 1006. freed_range_mutex.unlock(); 1007. log_write_up_to(flush_lsn, true); ^ 1008. } 1009. #1377 storage/innobase/buf/buf0lru.cc:447: error: Dead Store The value written to `&waited` is never used. 445. } 446. 447. waited= true; ^ 448. 449. while (!(block= buf_LRU_get_free_only())) #1378 storage/innobase/data/data0data.cc:592: error: Dead Store The value written to `&local_len` is never used. 590. } 591. 592. ulint local_len = index->table->get_overflow_field_local_len(); ^ 593. const auto zip_size = index->table->space->zip_size(); 594. #1379 storage/innobase/dict/dict0dict.cc:1457: error: Const Refable Parameter Function parameter `tablename` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 1455. @param[in] tablename Contains new base name 1456. @return own: new full pathname */ 1457. static char *dir_pathname(const char *old_path, span tablename) ^ 1458. { 1459. /* Split the tablename into its database and table name components. #1380 storage/innobase/dict/dict0dict.cc:1498: error: Const Refable Parameter Function parameter `new_name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 1496. @param replace whether to replace the file with the new name 1497. (as part of rolling back TRUNCATE) */ 1498. dberr_t ^ 1499. dict_table_t::rename_tablespace(span new_name, bool replace) const 1500. { #1381 storage/innobase/dict/dict0load.cc:2504: error: Dead Store The value written to `&err` is never used. 2502. ut_ad(ignore_err & DICT_ERR_IGNORE_INDEX); 2503. if (ignore_err != DICT_ERR_IGNORE_DROP) { 2504. err = DB_CORRUPTION; ^ 2505. goto evict; 2506. } #1382 storage/innobase/dict/dict0load.cc:3149: error: Uninitialized Value `_.type.mtype` is read without initialization. 3147. charset-collation, in a case-insensitive way. */ 3148. 3149. if (0 != cmp_data_data(dfield_get_type(&dfield)->mtype, ^ 3150. dfield_get_type(&dfield)->prtype, 3151. reinterpret_cast(table_name), #1383 storage/innobase/dict/dict0load.cc:3150: error: Uninitialized Value `_.type.prtype` is read without initialization. 3148. 3149. if (0 != cmp_data_data(dfield_get_type(&dfield)->mtype, 3150. dfield_get_type(&dfield)->prtype, ^ 3151. reinterpret_cast(table_name), 3152. dfield_get_len(&dfield), #1384 storage/innobase/dict/dict0mem.cc:1015: error: Unnecessary Copy copied variable `fk_set` is not modified after it is copied from `table->foreign_set` on line 1015. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1013. dict_table_t* table) 1014. { 1015. dict_foreign_set fk_set = table->foreign_set; ^ 1016. dict_foreign_t* foreign; 1017. #1385 storage/innobase/dict/dict0mem.cc:1032: error: Unnecessary Copy copied variable `fk_set` is not modified after it is copied from `table->foreign_set` on line 1032. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1030. dict_table_t* table) 1031. { 1032. dict_foreign_set fk_set = table->foreign_set; ^ 1033. dict_foreign_t* foreign; 1034. #1386 storage/innobase/dict/dict0stats.cc:468: error: Dead Store The value written to `&s` is never used. 466. errstr += (sizeof " but should be ") - 1; 467. errstr_sz -= s + (sizeof " but should be ") - 1; 468. s = dtype_sql_name(req_schema->columns[i].mtype, ^ 469. req_schema->columns[i].prtype_mask, 470. req_schema->columns[i].len, #1387 storage/innobase/dict/dict0stats.cc:1990: error: Dead Store The value written to `&offsets_rec` is never used. 1988. page */ 1989. 1990. offsets_rec = dict_stats_scan_page( ^ 1991. &rec, offsets1, offsets2, index, page, n_prefix, 1992. index->n_core_fields, n_diff, #1388 storage/innobase/dict/dict0stats.cc:2214: error: Uninitialized Value `n_diff_on_leaf_page` is read without initialization. 2212. non-boring records, it would (wrongly) estimate the number 2213. of distinct records to 8. */ 2214. if (n_diff_on_leaf_page > 0) { ^ 2215. n_diff_on_leaf_page--; 2216. } #1389 storage/innobase/dict/dict0stats.cc:3148: error: Dead Store The value written to `&stat_other_idx_size` is never used. 3146. if (!stat_other_idx_size 3147. && UT_LIST_GET_LEN(table->indexes) > 1) { 3148. stat_other_idx_size ^ 3149. = UT_LIST_GET_LEN(table->indexes) - 1; 3150. } #1390 storage/innobase/fsp/fsp0file.cc:171: error: Const Refable Parameter Function parameter `name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 169. @param name tablespace (table) name 170. @param ext filename extension */ 171. void Datafile::make_filepath(const char *dirpath, fil_space_t::name_type name, ^ 172. ib_extention ext) 173. { #1391 storage/innobase/fsp/fsp0file.cc:403: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 403. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 401. if (file_size != (os_offset_t) -1) 402. { 403. for (const page_t *page : pages) ^ 404. { 405. uint32_t space_id= page_get_space_id(page); #1392 storage/innobase/fsp/fsp0file.cc:885: error: Const Refable Parameter Function parameter `name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 883. @return filepath() 884. @retval nullptr if the .isl file does not exist or cannot be read */ 885. const char *RemoteDatafile::open_link_file(const fil_space_t::name_type name) ^ 886. { 887. if (!m_link_filepath) #1393 storage/innobase/fsp/fsp0file.cc:909: error: Const Refable Parameter Function parameter `name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 907. @param filepath full file name 908. @return DB_SUCCESS or error code */ 909. dberr_t RemoteDatafile::create_link_file(fil_space_t::name_type name, ^ 910. const char *filepath) 911. { #1394 storage/innobase/fsp/fsp0file.cc:981: error: Dead Store The value written to `&error` is never used. 979. const size_t len = strlen(filepath); 980. if (fwrite(filepath, 1, len, file) != len) { 981. error = os_file_get_last_error(true); ^ 982. ib::error() << 983. "Cannot write link file: " #1395 storage/innobase/fsp/fsp0file.cc:1010: error: Const Refable Parameter Function parameter `name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 1008. /** Delete an InnoDB Symbolic Link (ISL) file by name. 1009. @param name tablespace name */ 1010. void RemoteDatafile::delete_link_file(fil_space_t::name_type name) ^ 1011. { 1012. if (char *link_filepath= fil_make_filepath(NULL, name, ISL, false)) #1396 storage/innobase/fsp/fsp0fsp.cc:514: error: Dead Store The value written to `&page_id` is never used. 512. dberr_t fsp_header_init(fil_space_t *space, uint32_t size, mtr_t *mtr) 513. { 514. const page_id_t page_id(space->id, 0); ^ 515. const ulint zip_size = space->zip_size(); 516. #1397 storage/innobase/fsp/fsp0fsp.cc:3007: error: Dead Store The value written to `&first` is never used. 3005. } 3006. 3007. fil_addr_t first; ^ 3008. 3009. if (flst_get_len(inode + FSEG_FULL)) #1398 storage/innobase/fsp/fsp0sysspace.cc:114: error: Dead Store The value written to `&filepath` is never used. 112. Note that a Windows path may contain a drive name and a ':'. */ 113. while (*str != '\0') { 114. filepath = str; ^ 115. 116. while ((*str != ':' && *str != '\0') #1399 storage/innobase/fts/fts0ast.cc:757: error: Null Dereference `ast_str` could be null (null value originating from line 755) and is dereferenced. 755. ut_malloc_nokey(sizeof(fts_ast_string_t))); 756. 757. ast_str->str = static_cast(ut_malloc_nokey(len + 1)); ^ 758. 759. ast_str->len = len; #1400 storage/innobase/fts/fts0ast.cc:761: error: Null Dereference `ast_str->str` could be null (null value originating from line 757) and is dereferenced. 759. ast_str->len = len; 760. memcpy(ast_str->str, str, len); 761. ast_str->str[len] = '\0'; ^ 762. 763. return(ast_str); #1401 storage/innobase/fts/fts0config.cc:145: error: Null Dereference `name` could be null (null value originating from line 142) and is dereferenced. 143. len + FTS_AUX_MIN_TABLE_ID_LENGTH + 2)); 144. ::strcpy(name, param); 145. name[len] = '_'; ^ 146. 147. fts_write_object_id(index->id, name + len + 1); #1402 storage/innobase/fts/fts0config.cc:419: error: Null Dereference `value.f_str` could be null (null value originating from line 412) and is dereferenced in the call to `fts_config_set_value()`. 417. (char*) value.f_str, FTS_MAX_INT_LEN, ULINTPF, int_value); 418. 419. error = fts_config_set_value(trx, fts_table, name, &value); ^ 420. 421. if (UNIV_UNLIKELY(error != DB_SUCCESS)) { #1403 storage/innobase/fts/fts0fts.cc:681: error: Dead Store The value written to `&index_cache` is never used. 679. if (!index_cache) { 680. /* Add new index cache structure */ 681. index_cache = fts_cache_index_cache_create(table, index); ^ 682. } 683. #1404 storage/innobase/fts/fts0fts.cc:2362: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `rbt_add_node()` on line 2362 is not freed after the last access at line 2362, column 3. 2360. } else { 2361. ftt = fts_trx_table_create(trx->fts_trx, table); 2362. rbt_add_node(tables, &parent, &ftt); ^ 2363. } 2364. #1405 storage/innobase/fts/fts0fts.cc:2440: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `fts_trx_table_add_op()` on line 2440 is not freed after the last access at line 2440, column 2. 2438. 2439. fts_trx_table_add_op(tran_ftt, doc_id, state, fts_indexes); 2440. fts_trx_table_add_op(stmt_ftt, doc_id, state, fts_indexes); ^ 2441. } 2442. #1406 storage/innobase/fts/fts0fts.cc:5504: error: Dead Store The value written to `&savepoint` is never used. 5502. 5503. ut_ad(ib_vector_is_empty(fts_trx->last_stmt)); 5504. savepoint = fts_savepoint_create(fts_trx->last_stmt, NULL, NULL); ^ 5505. } 5506. #1407 storage/innobase/fts/fts0fts.cc:5987: error: Dead Store The value written to `&type` is never used. 5985. ut_ad(table->versioned()); 5986. dfield = que_node_get_val(exp); 5987. type = dfield_get_type(dfield); ^ 5988. ut_ad(type->vers_sys_end()); 5989. data = dfield_get_data(dfield); #1408 storage/innobase/fts/fts0opt.cc:1763: error: Null Dereference The call to `fts_config_get_ulint` may trigger the following issue: `value.f_str` could be null (from the call to `fts_config_get_ulint()` on line 1763) and is dereferenced in the call to `fts_config_get_ulint()`. 1761. ulint time_limit = 0; 1762. 1763. fts_config_get_ulint( ^ 1764. trx, fts_table, 1765. FTS_OPTIMIZE_LIMIT_IN_SECS, &time_limit); #1409 storage/innobase/fts/fts0que.cc:1445: error: Dead Store The value written to `&n_doc_ids` is never used. 1443. the current doc id set. */ 1444. if (query->doc_ids) { 1445. n_doc_ids = rbt_size(query->doc_ids) - n_doc_ids; ^ 1446. } 1447. } #1410 storage/innobase/gis/gis0rtree.cc:342: error: Dead Store The value written to `&err` is never used. 340. old_pos = page_rec_get_n_recs_before(rec); 341. 342. err = btr_cur_optimistic_insert( ^ 343. flags, 344. cursor, &insert_offsets, &heap, #1411 storage/innobase/gis/gis0rtree.cc:445: error: Dead Store The value written to `&offsets` is never used. 443. if (ins_suc) { 444. btr_cur_position(index, insert_rec, block, cursor); 445. offsets = rec_get_offsets(insert_rec, ^ 446. index, offsets, n_core, 447. ULINT_UNDEFINED, &heap); #1412 storage/innobase/gis/gis0rtree.cc:514: error: Dead Store The value written to `&err` is never used. 512. mem_heap_t* new_heap = NULL; 513. 514. err = btr_cur_pessimistic_insert( ^ 515. flags, 516. cursor, &insert_offsets, &new_heap, #1413 storage/innobase/gis/gis0rtree.cc:895: error: Dead Store The value written to `&first_rec_group` is never used. 893. lock_prdt_t new_prdt; 894. rec_t* first_rec = NULL; 895. int first_rec_group = 1; ^ 896. IF_DBUG(bool iterated = false,); 897. #1414 storage/innobase/gis/gis0sea.cc:1851: error: Null Dereference `my_cursor` could be null (null value originating from line 1849) and is dereferenced in the call to `btr_pcur_init()`. 1849. ut_malloc_nokey(sizeof(*my_cursor))); 1850. 1851. btr_pcur_init(my_cursor); ^ 1852. 1853. page_cur_position(rec, block, btr_pcur_get_page_cur(my_cursor)); #1415 storage/innobase/gis/gis0sea.cc:1858: error: Memory Leak Memory dynamically allocated by `malloc` on line 1849 is not freed after the last access at line 1858, column 2. 1856. 1857. new_seq = rtr_get_current_ssn_id(index); 1858. rtr_non_leaf_stack_push(path, block->page.id().page_no(), ^ 1859. new_seq, level, child_no, my_cursor, mbr_inc); 1860. } #1416 storage/innobase/gis/gis0sea.cc:2004: error: Dead Store The value written to `&cmp` is never used. 2002. rec_offs* offsets = offsets_; 2003. mem_heap_t* heap = NULL; 2004. int cmp = 1; ^ 2005. double least_inc = DBL_MAX; 2006. const rec_t* best_rec; #1417 storage/innobase/handler/ha_innodb.cc:913: error: Static Initialization Order Fiasco Initializer of innodb_status_variables accesses global variable from a different translation unit: export_vars|. 911. innodb_tmpdir_validate, NULL, NULL); 912. 913. static SHOW_VAR innodb_status_variables[]= { ^ 914. #ifdef BTR_CUR_HASH_ADAPT 915. {"adaptive_hash_hash_searches", &export_vars.innodb_ahi_hit, SHOW_SIZE_T}, #1418 storage/innobase/handler/ha_innodb.cc:3547: error: Dead Store The value written to `&s` is never used. 3545. THD* thd) 3546. { 3547. const char* s = id; ^ 3548. 3549. char nz[MAX_TABLE_NAME_LEN + 1]; #1419 storage/innobase/handler/ha_innodb.cc:6345: error: Dead Store The value written to `&tmp_length` is never used. 6343. DBUG_ASSERT(tmp_length <= str_length); 6344. if (wsrep_protocol_version < 3) { 6345. tmp_length = charset->strnxfrm( ^ 6346. str, str_length, 6347. uint(str_length), tmp_str, tmp_length, 0); #1420 storage/innobase/handler/ha_innodb.cc:10464: error: Dead Store The value written to `&len` is never used. 10462. KEY* key_info = table->key_info + m_primary_key; 10463. key_copy(ref, (uchar*)record, key_info, key_info->key_length); 10464. len = key_info->key_length; ^ 10465. } 10466. #1421 storage/innobase/handler/ha_innodb.cc:11880: error: Dead Store The value written to `&pos` is never used. 11878. static const char* label = "MERGE_THRESHOLD="; 11879. static const size_t label_len = strlen(label); 11880. const char* pos = str; ^ 11881. 11882. pos = strstr(str, label); #1422 storage/innobase/handler/ha_innodb.cc:15419: error: Uninitialized Value `n_rows` is read without initialization. 15417. 15418. if (index == dict_table_get_first_index(m_prebuilt->table)) { 15419. n_rows_in_table = n_rows; ^ 15420. } else if (!(index->type & DICT_FTS) 15421. && (n_rows != n_rows_in_table)) { #1423 storage/innobase/handler/ha_innodb.cc:15860: error: Dead Store The value written to `&trx` is never used. 15858. break; 15859. case HA_EXTRA_END_ALTER_COPY: 15860. trx = check_trx_exists(ha_thd()); ^ 15861. if (!m_prebuilt->table->skip_alter_undo) { 15862. /* This could be invoked inside INSERT...SELECT. #1424 storage/innobase/handler/ha_innodb.cc:15929: error: Dead Store The value written to `&trx` is never used. 15927. thr_lock_type lock_type) 15928. { 15929. trx_t* trx = m_prebuilt->trx; ^ 15930. 15931. DBUG_ENTER("ha_innobase::start_stmt"); #1425 storage/innobase/handler/ha_innodb.cc:19230: error: Static Initialization Order Fiasco Initializer of mysql_sysvar_lru_scan_depth accesses global variable from a different translation unit: buf_pool|. 19228. 19229. 19230. static MYSQL_SYSVAR_ULONG(lru_scan_depth, buf_pool.LRU_scan_depth, ^ 19231. PLUGIN_VAR_RQCMDARG, 19232. "How deep to scan LRU to keep it clean", #1426 storage/innobase/handler/ha_innodb.cc:19235: error: Static Initialization Order Fiasco Initializer of mysql_sysvar_flush_neighbors accesses global variable from a different translation unit: buf_pool|. 19233. NULL, innodb_buf_pool_update, 1536, 100, ~0UL, 0); 19234. 19235. static MYSQL_SYSVAR_ULONG(flush_neighbors, buf_pool.flush_neighbors, ^ 19236. PLUGIN_VAR_OPCMDARG, 19237. "Set to 0 (don't flush neighbors from buffer pool)," #1427 storage/innobase/handler/ha_innodb.cc:19291: error: Static Initialization Order Fiasco Initializer of mysql_sysvar_ft_cache_size accesses global variable from a different translation unit: fts_max_cache_size|. 19289. #else 19290. 19291. static MYSQL_SYSVAR_SIZE_T(ft_cache_size, ^ 19292. *reinterpret_cast(&fts_max_cache_size), 19293. PLUGIN_VAR_RQCMDARG, #1428 storage/innobase/handler/ha_innodb.cc:19297: error: Static Initialization Order Fiasco Initializer of mysql_sysvar_ft_total_cache_size accesses global variable from a different translation unit: fts_max_total_cache_size|. 19295. NULL, innodb_ft_cache_size_update, 8000000, 1600000, 1ULL << 40, 0); 19296. 19297. static MYSQL_SYSVAR_SIZE_T(ft_total_cache_size, ^ 19298. *reinterpret_cast(&fts_max_total_cache_size), 19299. PLUGIN_VAR_RQCMDARG, #1429 storage/innobase/handler/ha_innodb.cc:20154: error: Dead Store The value written to `&tbnamelen` is never used. 20152. if (is_part != NULL) { 20153. *is_part = '\0'; 20154. tbnamelen = ulint(is_part - tbname); ^ 20155. } 20156. #1430 storage/innobase/handler/ha_innodb.cc:20157: error: Dead Store The value written to `&dbnamelen` is never used. 20155. } 20156. 20157. dbnamelen = filename_to_tablename(dbname, t_dbname, ^ 20158. MAX_DATABASE_NAME_LEN + 1); 20159. tbnamelen = filename_to_tablename(tbname, t_tbname, #1431 storage/innobase/handler/ha_innodb.cc:20159: error: Dead Store The value written to `&tbnamelen` is never used. 20157. dbnamelen = filename_to_tablename(dbname, t_dbname, 20158. MAX_DATABASE_NAME_LEN + 1); 20159. tbnamelen = filename_to_tablename(tbname, t_tbname, ^ 20160. MAX_TABLE_NAME_LEN + 1); 20161. #1432 storage/innobase/handler/handler0alter.cc:3064: error: Const Refable Parameter Function parameter `add` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 3062. @param[in] add indexes being created 3063. @return useable index, or NULL if none found */ 3064. static MY_ATTRIBUTE((nonnull, warn_unused_result)) ^ 3065. const KEY* 3066. innobase_find_equiv_index( #1433 storage/innobase/handler/handler0alter.cc:4299: error: Dead Store The value written to `&indexdef` is never used. 4297. 4298. if (add_fts_doc_idx) { 4299. index_def_t* index = indexdef++; ^ 4300. uint nfields = 1; 4301. #1434 storage/innobase/handler/handler0alter.cc:4767: error: Dead Store The value written to `&num_old_v` is never used. 4765. = num_old_v; 4766. } 4767. num_old_v++; ^ 4768. goto found_col; 4769. } #1435 storage/innobase/handler/handler0alter.cc:7880: error: Const Refable Parameter Function parameter `add_fk` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 7878. @param add_fk Newly added foreign key constraint 7879. @param n_add_fk number of newly added foreign constraint */ 7880. static ^ 7881. bool check_col_is_in_fk_indexes( 7882. const dict_table_t *table, const dict_col_t *col, #1436 storage/innobase/handler/i_s.cc:286: error: Static Initialization Order Fiasco Initializer of Show::innodb_trx_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 284. 285. /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_trx */ 286. static ST_FIELD_INFO innodb_trx_fields_info[]= ^ 287. { 288. #define IDX_TRX_ID 0 #1437 storage/innobase/handler/i_s.cc:611: error: Static Initialization Order Fiasco Initializer of Show::innodb_locks_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 609. namespace Show { 610. /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */ 611. static ST_FIELD_INFO innodb_locks_fields_info[]= ^ 612. { 613. #define IDX_LOCK_ID 0 #1438 storage/innobase/handler/i_s.cc:813: error: Static Initialization Order Fiasco Initializer of Show::innodb_lock_waits_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 811. namespace Show { 812. /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */ 813. static ST_FIELD_INFO innodb_lock_waits_fields_info[]= ^ 814. { 815. #define IDX_REQUESTING_TRX_ID 0 #1439 storage/innobase/handler/i_s.cc:975: error: Static Initialization Order Fiasco Initializer of Show::i_s_cmp_fields_info accesses global variable from a different translation unit: type_handler_slong|. 973. namespace Show { 974. /* Fields of the dynamic table information_schema.innodb_cmp. */ 975. static ST_FIELD_INFO i_s_cmp_fields_info[] = ^ 976. { 977. Column("page_size", SLong(5),NOT_NULL, "Compressed Page Size"), #1440 storage/innobase/handler/i_s.cc:1217: error: Static Initialization Order Fiasco Initializer of Show::i_s_cmp_per_index_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 1215. information_schema.innodb_cmp_per_index and 1216. information_schema.innodb_cmp_per_index_reset. */ 1217. static ST_FIELD_INFO i_s_cmp_per_index_fields_info[]= ^ 1218. { 1219. #define IDX_DATABASE_NAME 0 #1441 storage/innobase/handler/i_s.cc:1520: error: Static Initialization Order Fiasco Initializer of Show::i_s_cmpmem_fields_info accesses global variable from a different translation unit: type_handler_slonglong|. 1518. namespace Show { 1519. /* Fields of the dynamic table information_schema.innodb_cmpmem. */ 1520. static ST_FIELD_INFO i_s_cmpmem_fields_info[] = ^ 1521. { 1522. Column("page_size", SLong(5), NOT_NULL, "Buddy Block Size"), #1442 storage/innobase/handler/i_s.cc:1776: error: Static Initialization Order Fiasco Initializer of Show::innodb_metrics_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 1774. namespace Show { 1775. /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_metrics */ 1776. static ST_FIELD_INFO innodb_metrics_fields_info[]= ^ 1777. { 1778. #define METRIC_NAME 0 #1443 storage/innobase/handler/i_s.cc:2196: error: Static Initialization Order Fiasco Initializer of Show::i_s_stopword_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 2194. namespace Show { 2195. /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_ft_default_stopword */ 2196. static ST_FIELD_INFO i_s_stopword_fields_info[]= ^ 2197. { 2198. #define STOPWORD_VALUE 0 #1444 storage/innobase/handler/i_s.cc:2306: error: Static Initialization Order Fiasco Initializer of Show::i_s_fts_doc_fields_info accesses global variable from a different translation unit: type_handler_ulonglong|. 2304. /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_DELETED 2305. INFORMATION_SCHEMA.INNODB_FT_BEING_DELETED */ 2306. static ST_FIELD_INFO i_s_fts_doc_fields_info[]= ^ 2307. { 2308. #define I_S_FTS_DOC_ID 0 #1445 storage/innobase/handler/i_s.cc:2559: error: Static Initialization Order Fiasco Initializer of Show::i_s_fts_index_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 2557. /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHED and 2558. INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE */ 2559. static ST_FIELD_INFO i_s_fts_index_fields_info[]= ^ 2560. { 2561. #define I_S_FTS_WORD 0 #1446 storage/innobase/handler/i_s.cc:3251: error: Static Initialization Order Fiasco Initializer of Show::i_s_fts_config_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 3249. namespace Show { 3250. /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_CONFIG */ 3251. static ST_FIELD_INFO i_s_fts_config_fields_info[]= ^ 3252. { 3253. #define FTS_CONFIG_KEY 0 #1447 storage/innobase/handler/i_s.cc:3443: error: Static Initialization Order Fiasco Initializer of Show::i_s_innodb_buffer_stats_fields_info accesses global variable from a different translation unit: type_handler_ulonglong|. 3441. namespace Show { 3442. /* Fields of the dynamic table INNODB_BUFFER_POOL_STATS. */ 3443. static ST_FIELD_INFO i_s_innodb_buffer_stats_fields_info[]= ^ 3444. { 3445. #define IDX_BUF_STATS_POOL_ID 0 #1448 storage/innobase/handler/i_s.cc:3764: error: Static Initialization Order Fiasco Initializer of Show::i_s_innodb_buffer_page_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 3762. namespace Show { 3763. /* Fields of the dynamic table INNODB_BUFFER_POOL_PAGE. */ 3764. static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[]= ^ 3765. { 3766. #define IDX_BUFFER_POOL_ID 0 #1449 storage/innobase/handler/i_s.cc:4278: error: Static Initialization Order Fiasco Initializer of Show::i_s_innodb_buf_page_lru_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 4276. 4277. namespace Show { 4278. static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = ^ 4279. { 4280. #define IDX_BUF_LRU_POOL_ID 0 #1450 storage/innobase/handler/i_s.cc:4663: error: Static Initialization Order Fiasco Initializer of Show::innodb_sys_tables_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 4661. /** SYS_TABLES ***************************************************/ 4662. /* Fields of the dynamic table INFORMATION_SCHEMA.SYS_TABLES */ 4663. static ST_FIELD_INFO innodb_sys_tables_fields_info[]= ^ 4664. { 4665. #define SYS_TABLES_ID 0 #1451 storage/innobase/handler/i_s.cc:4940: error: Static Initialization Order Fiasco Initializer of Show::innodb_sys_tablestats_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 4938. /** SYS_TABLESTATS ***********************************************/ 4939. /* Fields of the dynamic table INFORMATION_SCHEMA.SYS_TABLESTATS */ 4940. static ST_FIELD_INFO innodb_sys_tablestats_fields_info[]= ^ 4941. { 4942. #define SYS_TABLESTATS_ID 0 #1452 storage/innobase/handler/i_s.cc:5173: error: Static Initialization Order Fiasco Initializer of Show::innodb_sysindex_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 5171. /** SYS_INDEXES **************************************************/ 5172. /* Fields of the dynamic table INFORMATION_SCHEMA.SYS_INDEXES */ 5173. static ST_FIELD_INFO innodb_sysindex_fields_info[]= ^ 5174. { 5175. #define SYS_INDEX_ID 0 #1453 storage/innobase/handler/i_s.cc:5419: error: Static Initialization Order Fiasco Initializer of Show::innodb_sys_columns_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 5417. /** SYS_COLUMNS **************************************************/ 5418. /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_SYS_COLUMNS */ 5419. static ST_FIELD_INFO innodb_sys_columns_fields_info[]= ^ 5420. { 5421. #define SYS_COLUMN_TABLE_ID 0 #1454 storage/innobase/handler/i_s.cc:5536: error: Uninitialized Value `this.prtype` is read without initialization during the call to `i_s_dict_fill_sys_columns()`. 5534. 5535. if (!err_msg) { 5536. err = i_s_dict_fill_sys_columns( ^ 5537. thd, table_id, col_name, 5538. &column_rec, nth_v_col, #1455 storage/innobase/handler/i_s.cc:5537: error: Uninitialized Value `table_id` is read without initialization. 5535. if (!err_msg) { 5536. err = i_s_dict_fill_sys_columns( 5537. thd, table_id, col_name, ^ 5538. &column_rec, nth_v_col, 5539. tables->table); #1456 storage/innobase/handler/i_s.cc:5537: error: Uninitialized Value `col_name` is read without initialization. 5535. if (!err_msg) { 5536. err = i_s_dict_fill_sys_columns( 5537. thd, table_id, col_name, ^ 5538. &column_rec, nth_v_col, 5539. tables->table); #1457 storage/innobase/handler/i_s.cc:5538: error: Uninitialized Value `nth_v_col` is read without initialization. 5536. err = i_s_dict_fill_sys_columns( 5537. thd, table_id, col_name, 5538. &column_rec, nth_v_col, ^ 5539. tables->table); 5540. if (err) { #1458 storage/innobase/handler/i_s.cc:5640: error: Static Initialization Order Fiasco Initializer of Show::innodb_sys_virtual_fields_info accesses global variable from a different translation unit: type_handler_ulonglong|. 5638. /** SYS_VIRTUAL **************************************************/ 5639. /** Fields of the dynamic table INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL */ 5640. static ST_FIELD_INFO innodb_sys_virtual_fields_info[]= ^ 5641. { 5642. #define SYS_VIRTUAL_TABLE_ID 0 #1459 storage/innobase/handler/i_s.cc:5737: error: Uninitialized Value `table_id` is read without initialization. 5735. if (!err_msg) { 5736. err = i_s_dict_fill_sys_virtual( 5737. thd, table_id, pos, base_pos, ^ 5738. tables->table); 5739. if (err) { #1460 storage/innobase/handler/i_s.cc:5737: error: Uninitialized Value `pos` is read without initialization. 5735. if (!err_msg) { 5736. err = i_s_dict_fill_sys_virtual( 5737. thd, table_id, pos, base_pos, ^ 5738. tables->table); 5739. if (err) { #1461 storage/innobase/handler/i_s.cc:5737: error: Uninitialized Value `base_pos` is read without initialization. 5735. if (!err_msg) { 5736. err = i_s_dict_fill_sys_virtual( 5737. thd, table_id, pos, base_pos, ^ 5738. tables->table); 5739. if (err) { #1462 storage/innobase/handler/i_s.cc:5837: error: Static Initialization Order Fiasco Initializer of Show::innodb_sys_fields_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 5835. /** SYS_FIELDS ***************************************************/ 5836. /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_SYS_FIELDS */ 5837. static ST_FIELD_INFO innodb_sys_fields_fields_info[]= ^ 5838. { 5839. #define SYS_FIELD_INDEX_ID 0 #1463 storage/innobase/handler/i_s.cc:5938: error: Uninitialized Value `pos` is read without initialization. 5936. err = i_s_dict_fill_sys_fields( 5937. thd, index_id, &field_rec, 5938. pos, tables->table); ^ 5939. if (err) { 5940. err = i_s_sys_error_handling(err, thd); #1464 storage/innobase/handler/i_s.cc:6039: error: Static Initialization Order Fiasco Initializer of Show::innodb_sys_foreign_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 6037. /** SYS_FOREIGN ********************************************/ 6038. /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_SYS_FOREIGN */ 6039. static ST_FIELD_INFO innodb_sys_foreign_fields_info[]= ^ 6040. { 6041. #define SYS_FOREIGN_ID 0 #1465 storage/innobase/handler/i_s.cc:6140: error: Uninitialized Value `foreign.id` is read without initialization during the call to `i_s_dict_fill_sys_foreign()`. 6138. 6139. if (!err_msg) { 6140. err = i_s_dict_fill_sys_foreign( ^ 6141. thd, &foreign_rec, tables->table); 6142. if (err) { #1466 storage/innobase/handler/i_s.cc:6242: error: Static Initialization Order Fiasco Initializer of Show::innodb_sys_foreign_cols_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 6240. /** SYS_FOREIGN_COLS ********************************************/ 6241. /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS */ 6242. static ST_FIELD_INFO innodb_sys_foreign_cols_fields_info[]= ^ 6243. { 6244. #define SYS_FOREIGN_COL_ID 0 #1467 storage/innobase/handler/i_s.cc:6344: error: Uninitialized Value `name` is read without initialization. 6342. if (!err_msg) { 6343. err = i_s_dict_fill_sys_foreign_cols( 6344. thd, name, for_col_name, ^ 6345. ref_col_name, pos, tables->table); 6346. if (err) { #1468 storage/innobase/handler/i_s.cc:6344: error: Uninitialized Value `for_col_name` is read without initialization. 6342. if (!err_msg) { 6343. err = i_s_dict_fill_sys_foreign_cols( 6344. thd, name, for_col_name, ^ 6345. ref_col_name, pos, tables->table); 6346. if (err) { #1469 storage/innobase/handler/i_s.cc:6345: error: Uninitialized Value `ref_col_name` is read without initialization. 6343. err = i_s_dict_fill_sys_foreign_cols( 6344. thd, name, for_col_name, 6345. ref_col_name, pos, tables->table); ^ 6346. if (err) { 6347. err = i_s_sys_error_handling(err, thd); #1470 storage/innobase/handler/i_s.cc:6345: error: Uninitialized Value `pos` is read without initialization. 6343. err = i_s_dict_fill_sys_foreign_cols( 6344. thd, name, for_col_name, 6345. ref_col_name, pos, tables->table); ^ 6346. if (err) { 6347. err = i_s_sys_error_handling(err, thd); #1471 storage/innobase/handler/i_s.cc:6445: error: Static Initialization Order Fiasco Initializer of Show::innodb_sys_tablespaces_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 6443. /** SYS_TABLESPACES ********************************************/ 6444. /* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES */ 6445. static ST_FIELD_INFO innodb_sys_tablespaces_fields_info[]= ^ 6446. { 6447. #define SYS_TABLESPACES_SPACE 0 #1472 storage/innobase/handler/i_s.cc:6663: error: Static Initialization Order Fiasco Initializer of Show::innodb_tablespaces_encryption_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 6661. /** TABLESPACES_ENCRYPTION ********************************************/ 6662. /* Fields of the table INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION */ 6663. static ST_FIELD_INFO innodb_tablespaces_encryption_fields_info[]= ^ 6664. { 6665. #define TABLESPACES_ENCRYPTION_SPACE 0 #1473 storage/innobase/ibuf/ibuf0ibuf.cc:1001: error: Dead Store The value written to `&field` is never used. 999. ut_ad(rec_get_n_fields_old(rec) > 2); 1000. 1001. field = rec_get_nth_field_old(rec, IBUF_REC_FIELD_MARKER, &len); ^ 1002. 1003. ut_a(len == 1); #1474 storage/innobase/ibuf/ibuf0ibuf.cc:1039: error: Dead Store The value written to `&field` is never used. 1037. ut_ad(rec_get_n_fields_old(rec) > 2); 1038. 1039. field = rec_get_nth_field_old(rec, IBUF_REC_FIELD_MARKER, &len); ^ 1040. 1041. ut_a(len == 1); #1475 storage/innobase/ibuf/ibuf0ibuf.cc:2975: error: Dead Store The value written to `&field` is never used. 2973. ut_ad(rec_get_n_fields_old(rec) > 2); 2974. 2975. field = rec_get_nth_field_old(rec, IBUF_REC_FIELD_MARKER, &len); ^ 2976. 2977. ut_a(len == 1); #1476 storage/innobase/ibuf/ibuf0ibuf.cc:3695: error: Dead Store The value written to `&rec` is never used. 3693. 3694. /* btr_cur_update_alloc_zip() may have changed this */ 3695. rec = page_cur_get_rec(&page_cur); ^ 3696. 3697. /* A collation may identify values that differ in #1477 storage/innobase/include/log0log.h:54: error: Unnecessary Copy copied variable `path` is not modified after it is copied from `std::basic_string::append()` on line 54. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 52. static inline void delete_log_file(const char* suffix) 53. { 54. auto path = get_log_file_path(LOG_FILE_NAME_PREFIX).append(suffix); ^ 55. os_file_delete_if_exists(innodb_log_file_key, path.c_str(), nullptr); 56. } #1478 storage/innobase/include/log0log.h:499: error: Const Refable Parameter Function parameter `path` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 497. void write_header_durable(lsn_t lsn); 498. /** opens log file which must be closed prior this call */ 499. dberr_t rename(std::string path) { return fd.rename(path); } ^ 500. 501. MY_ATTRIBUTE((warn_unused_result)) #1479 storage/innobase/include/log0log.h:499: error: Unnecessary Copy Intermediate variable `path` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 497. void write_header_durable(lsn_t lsn); 498. /** opens log file which must be closed prior this call */ 499. dberr_t rename(std::string path) { return fd.rename(path); } ^ 500. 501. MY_ATTRIBUTE((warn_unused_result)) #1480 storage/innobase/include/log0log.h:501: error: Const Refable Parameter Function parameter `buf` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 499. dberr_t rename(std::string path) { return fd.rename(path); } 500. 501. MY_ATTRIBUTE((warn_unused_result)) ^ 502. /** reads buffer from log file 503. @param[in] offset offset in log file #1481 storage/innobase/include/mach0data.inl:578: error: Uninitialized Value `d` is read without initialization. 576. } 577. 578. return(d); ^ 579. } 580. #1482 storage/innobase/include/mach0data.inl:627: error: Uninitialized Value `d` is read without initialization. 625. } 626. 627. return(d); ^ 628. } 629. #1483 storage/innobase/include/mem0mem.inl:466: error: Null Dereference `s` could be null (null value originating from line 465) and is dereferenced. 464. { 465. char* s = static_cast(ut_malloc_nokey(len + 1)); 466. s[len] = 0; ^ 467. return(static_cast(memcpy(s, str, len))); 468. } #1484 storage/innobase/include/ut0rnd.inl:90: error: Dead Store The value written to `&str` is never used. 88. /* fall through */ 89. case 1: 90. fold = ut_fold_ulint_pair(fold, (ulint)(*str++)); ^ 91. } 92. #1485 storage/innobase/lock/lock0prdt.cc:829: error: Dead Store The value written to `&lock` is never used. 827. 828. if (lock == NULL) { 829. lock = lock_rec_create_low( ^ 830. NULL, 831. mode, page_id, NULL, PRDT_HEAPNO, #1486 storage/innobase/log/log0crypt.cc:117: error: Uninitialized Value `dst_len` is read without initialization during the call to `ib::logger::operator()`. 115. 116. if (err != MY_AES_OK || dst_len != MY_AES_BLOCK_SIZE) { 117. ib::error() << "Getting redo log crypto key failed: err = " ^ 118. << err << ", len = " << dst_len; 119. info->key_version = ENCRYPTION_KEY_VERSION_INVALID; #1487 storage/innobase/log/log0log.cc:286: error: Const Refable Parameter Function parameter `buf` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 284. } 285. 286. dberr_t file_os_io::write(const char *path, os_offset_t offset, ^ 287. span buf) noexcept 288. { #1488 storage/innobase/log/log0log.cc:337: error: Const Refable Parameter Function parameter `buf` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 335. 336. 337. __attribute__((warn_unused_result)) ^ 338. dberr_t log_file_t::read(os_offset_t offset, span buf) noexcept 339. { #1489 storage/innobase/log/log0log.cc:349: error: Const Refable Parameter Function parameter `buf` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 347. } 348. 349. dberr_t log_file_t::write(os_offset_t offset, span buf) noexcept ^ 350. { 351. ut_ad(is_opened()); #1490 storage/innobase/log/log0log.cc:1283: error: Unnecessary Copy copied variable `path` is not modified after it is copied from `std::basic_string::append()` on line 1283. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1281. 1282. for (int i= 0; i < 101; i++) { 1283. auto path= get_log_file_path(LOG_FILE_NAME_PREFIX) ^ 1284. .append(std::to_string(i)); 1285. os_file_stat_t stat; #1491 storage/innobase/log/log0recv.cc:1239: error: Const Refable Parameter Function parameter `buf` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 1237. } 1238. 1239. MY_ATTRIBUTE((warn_unused_result)) ^ 1240. dberr_t recv_sys_t::read(os_offset_t total_offset, span buf) 1241. { #1492 storage/innobase/log/log0recv.cc:4916: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 4916. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 4914. ut_ad(recv_sys.recovered_lsn <= max_lsn); 4915. 4916. for (byte *page : pages) ^ 4917. { 4918. if (page_get_page_no(page) != page_id.page_no() || #1493 storage/innobase/log/log0sync.cc:225: warning: Lock Consistency Violation Read/Write race. Non-private method `group_commit_lock::acquire` reads without synchronization from `thread_local_waiter.m_group_commit_leader`, which races with the write in method `group_commit_lock::acquire`. 223. thread_local_waiter.m_group_commit_leader= false; 224. std::unique_lock lk(m_mtx, std::defer_lock); 225. while (num > value() || thread_local_waiter.m_group_commit_leader) ^ 226. { 227. lk.lock(); #1494 storage/innobase/os/os0file.cc:2701: error: Dead Store The value written to `&bytes_returned` is never used. 2699. } else if (n_bytes + bytes_returned == ssize_t(n)) { 2700. 2701. bytes_returned += n_bytes; ^ 2702. 2703. *err = type.maybe_punch_hole(offset, n); #1495 storage/innobase/page/page0cur.cc:310: error: Dead Store The value written to `&offsets` is never used. 308. mem_heap_t* heap = NULL; 309. rec_offs offsets_[REC_OFFS_NORMAL_SIZE]; 310. rec_offs* offsets = offsets_; ^ 311. rec_offs_init(offsets_); 312. #1496 storage/innobase/page/page0cur.cc:582: error: Dead Store The value written to `&offsets` is never used. 580. mem_heap_t* heap = NULL; 581. rec_offs offsets_[REC_OFFS_NORMAL_SIZE]; 582. rec_offs* offsets = offsets_; ^ 583. rec_offs_init(offsets_); 584. #1497 storage/innobase/page/page0cur.cc:740: error: Dead Store The value written to `&cmp` is never used. 738. ut_ad(!page_rec_is_leaf(mid_rec) 739. || rec_is_metadata(mid_rec, *index)); 740. cmp = 1; ^ 741. goto low_rec_match; 742. } #1498 storage/innobase/rem/rem0rec.cc:1483: error: Dead Store The value written to `&lens` is never used. 1481. byte* nulls = temp 1482. ? rec - 1 : rec - (REC_N_NEW_EXTRA_BYTES + 1); 1483. byte* UNINIT_VAR(lens); ^ 1484. ulint UNINIT_VAR(n_node_ptr_field); 1485. ulint null_mask = 1; #1499 storage/innobase/rem/rem0rec.cc:1483: error: Uninitialized Value `lens` is read without initialization. 1481. byte* nulls = temp 1482. ? rec - 1 : rec - (REC_N_NEW_EXTRA_BYTES + 1); 1483. byte* UNINIT_VAR(lens); ^ 1484. ulint UNINIT_VAR(n_node_ptr_field); 1485. ulint null_mask = 1; #1500 storage/innobase/rem/rem0rec.cc:1484: error: Dead Store The value written to `&n_node_ptr_field` is never used. 1482. ? rec - 1 : rec - (REC_N_NEW_EXTRA_BYTES + 1); 1483. byte* UNINIT_VAR(lens); 1484. ulint UNINIT_VAR(n_node_ptr_field); ^ 1485. ulint null_mask = 1; 1486. const ulint n_core_fields = redundant_temp #1501 storage/innobase/rem/rem0rec.cc:1484: error: Uninitialized Value `n_node_ptr_field` is read without initialization. 1482. ? rec - 1 : rec - (REC_N_NEW_EXTRA_BYTES + 1); 1483. byte* UNINIT_VAR(lens); 1484. ulint UNINIT_VAR(n_node_ptr_field); ^ 1485. ulint null_mask = 1; 1486. const ulint n_core_fields = redundant_temp #1502 storage/innobase/rem/rem0rec.cc:1586: error: Dead Store The value written to `&end` is never used. 1584. ut_ad(len == REC_NODE_PTR_SIZE); 1585. memcpy(end, dfield_get_data(field), len); 1586. end += REC_NODE_PTR_SIZE; ^ 1587. break; 1588. } #1503 storage/innobase/rem/rem0rec.cc:2294: error: Uninitialized Value `data` is read without initialization. 2292. 2293. for (i = 0; i < rec_offs_n_fields(offsets); i++) { 2294. const byte* UNINIT_VAR(data); ^ 2295. ulint len; 2296. #1504 storage/innobase/row/row0ftsort.cc:803: error: Dead Store The value written to `&dfield` is never used. 801. loop: 802. while (doc_item) { 803. dfield_t* dfield = doc_item->field; ^ 804. 805. last_doc_id = doc_item->doc_id; #1505 storage/innobase/row/row0ins.cc:1772: error: Dead Store The value written to `&block` is never used. 1770. may have repositioned pcur on a 1771. different block */ 1772. block = btr_pcur_get_block(&pcur); ^ 1773. } else { 1774. row_ins_foreign_report_err( #1506 storage/innobase/row/row0log.cc:338: error: Dead Store The value written to `&b` is never used. 336. b + extra_size, index, tuple->fields, tuple->n_fields); 337. 338. b += size; ^ 339. 340. if (mrec_size >= avail_size) { #1507 storage/innobase/row/row0log.cc:710: error: Dead Store The value written to `&b` is never used. 708. old_pk->fields, old_pk->n_fields); 709. 710. b += old_pk_size; ^ 711. 712. row_log_table_close(index, b, mrec_size, avail_size); #1508 storage/innobase/row/row0log.cc:868: error: Dead Store The value written to `&b` is never used. 866. b + extra_size, index, tuple->fields, tuple->n_fields, 867. status); 868. b += size; ^ 869. 870. row_log_table_close(index, b, mrec_size, avail_size); #1509 storage/innobase/row/row0log.cc:1021: error: Dead Store The value written to `&b` is never used. 1019. reset_trx_id, sizeof reset_trx_id); 1020. } 1021. b += rec_offs_data_size(offsets); ^ 1022. 1023. row_log_table_close(index, b, mrec_size, avail_size); #1510 storage/innobase/row/row0log.cc:3437: error: Null Dereference `offsets` could be null (null value originating from line 3436) and is dereferenced in the call to `rec_offs_set_n_alloc()`. 3435. 3436. offsets = static_cast(ut_malloc_nokey(i * sizeof *offsets)); 3437. rec_offs_set_n_alloc(offsets, i); ^ 3438. rec_offs_set_n_fields(offsets, dict_index_get_n_fields(index)); 3439. #1511 storage/innobase/row/row0merge.cc:1451: error: Dead Store The value written to `&b` is never used. 1449. ",fd=" << fd << ',' << *foffs); 1450. 1451. *b++ = 0; ^ 1452. MEM_CHECK_DEFINED(&block[0], b - &block[0]); 1453. MEM_CHECK_ADDRESSABLE(&block[0], srv_sort_buf_size); #1512 storage/innobase/row/row0merge.cc:1756: error: Memory Leak Memory dynamically allocated by `malloc` on line 1737 is not freed after the last access at line 1756, column 4. 1754. /* We are building a FT index, make sure 1755. we have the temporary 'fts_sort_idx' */ 1756. ut_a(fts_sort_idx); ^ 1757. 1758. fts_index = index[i]; #1513 storage/innobase/row/row0mysql.cc:1110: error: Dead Store The value written to `&node` is never used. 1108. { 1109. trx_t* trx = prebuilt->trx; 1110. ins_node_t* node = prebuilt->ins_node; ^ 1111. const dict_table_t* table = prebuilt->table; 1112. que_thr_t* thr; #1514 storage/innobase/row/row0mysql.cc:1231: error: Dead Store The value written to `&node` is never used. 1229. ibool was_lock_wait; 1230. trx_t* trx = prebuilt->trx; 1231. ins_node_t* node = prebuilt->ins_node; ^ 1232. dict_table_t* table = prebuilt->table; 1233. #1515 storage/innobase/row/row0mysql.cc:2559: error: Dead Store The value written to `&err` is never used. 2557. { 2558. dict_table_t* table = NULL; 2559. dberr_t err = DB_ERROR; ^ 2560. mem_heap_t* heap = NULL; 2561. const char** constraints_to_drop = NULL; #1516 storage/innobase/row/row0purge.cc:1513: error: Dead Store The value written to `&ptr` is never used. 1511. if (!(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) { 1512. ut_ad(!(node->update->info_bits & REC_INFO_MIN_REC_FLAG)); 1513. ptr = row_purge_get_partial(ptr, *clust_index, node); ^ 1514. } else if (node->update->info_bits & REC_INFO_MIN_REC_FLAG) { 1515. node->ref = &trx_undo_metadata; #1517 storage/innobase/row/row0sel.cc:650: error: Null Dereference `sel_buf` could be null (null value originating from line 645) and is dereferenced. 648. sel_buf = column->prefetch_buf + i; 649. 650. sel_buf->data = NULL; ^ 651. sel_buf->len = 0; 652. sel_buf->val_buf_size = 0; #1518 storage/innobase/row/row0sel.cc:1179: error: Dead Store The value written to `&cur_block` is never used. 1177. dberr_t err = DB_SUCCESS; 1178. trx_t* trx = thr_get_trx(thr); 1179. buf_block_t* cur_block = btr_pcur_get_block(pcur); ^ 1180. rec_offs offsets_[REC_OFFS_NORMAL_SIZE]; 1181. rec_offs* my_offsets = const_cast(offsets); #1519 storage/innobase/row/row0sel.cc:3885: error: Memory Leak Memory dynamically allocated by `malloc` on line 3883 is not freed after the last access at line 3885, column 14. 3883. ptr = static_cast(ut_malloc_nokey(sz)); 3884. 3885. for (i = 0; i < UT_ARR_SIZE(prebuilt->fetch_cache); i++) { ^ 3886. 3887. /* A user has reported memory corruption in these #1520 storage/innobase/row/row0sel.cc:3891: error: Null Dereference `ptr` could be null (null value originating from line 3883) and is dereferenced in the call to `mach_write_to_4()`. 3889. to track a possible bug. */ 3890. 3891. mach_write_to_4(ptr, ROW_PREBUILT_FETCH_MAGIC_N); ^ 3892. ptr += 4; 3893. #1521 storage/innobase/row/row0sel.cc:4362: error: Uninitialized Value `rec` is read without initialization. 4360. dict_index_t* clust_index; 4361. que_thr_t* thr; 4362. const rec_t* UNINIT_VAR(rec); ^ 4363. dtuple_t* vrow = NULL; 4364. const rec_t* result_rec = NULL; #1522 storage/innobase/row/row0sel.cc:6709: error: Dead Store The value written to `&visible_trx_id` is never used. 6707. if (!~visible_trx_id) 6708. { 6709. visible_trx_id= rec_trx_id; ^ 6710. found_in_view= !clust_rec_deleted; 6711. } #1523 storage/innobase/row/row0vers.cc:740: error: Dead Store The value written to `&trx_id` is never used. 738. ut_ad(rec_offs_validate(rec, index, *offsets)); 739. 740. trx_id = row_get_rec_trx_id(rec, index, *offsets); ^ 741. 742. ut_ad(!view->changes_visible(trx_id)); #1524 storage/innobase/srv/srv0srv.cc:1601: error: Dead Store The value written to `&lk` is never used. 1599. 1600. { 1601. std::lock_guard lk(purge_thread_count_mtx); ^ 1602. n_threads= srv_n_purge_threads; 1603. srv_purge_thread_count_changed= false; #1525 storage/innobase/srv/srv0start.cc:1031: error: Uninitialized Value `_.type` is read without initialization. 1029. } 1030. 1031. if (stat_info.type != OS_FILE_TYPE_FILE) ^ 1032. return DB_SUCCESS; 1033. #1526 storage/innobase/srv/srv0start.cc:1037: error: Uninitialized Value `_.size` is read without initialization. 1035. return DB_ERROR; 1036. 1037. const os_offset_t size= stat_info.size; ^ 1038. ut_a(size != (os_offset_t) -1); 1039. #1527 storage/innobase/srv/srv0start.cc:1509: error: Deadlock `srv_start` (Trace 1) and `recv_sys_t::apply` (Trace 2) acquire locks `&(this->mutex.m_mutex)` in `class recv_sys_t` and `&(log_sys.mutex.m_mutex)` in `class log_t` in reverse orders. Additional report(s) on the same line were suppressed. 1507. err = create_new_log 1508. ? DB_SUCCESS 1509. : recv_recovery_from_checkpoint_start(flushed_lsn); ^ 1510. recv_sys.close_files(); 1511. #1528 storage/innobase/trx/trx0undo.cc:1069: error: Uninitialized Value `__param_0.gtrid_length` is read without initialization during the call to `trx_undo_mem_create()`. 1067. } 1068. 1069. trx_undo_t* undo = trx_undo_mem_create( ^ 1070. rseg, id, trx_id, &xid, page_no, offset); 1071. if (!undo) { #1529 storage/innobase/ut/ut0mem.cc:52: error: Null Dereference `s` could be null (null value originating from line 46) and is dereferenced. 50. memcpy(s + s1_len + s2_len, s3, s3_len); 51. 52. s[s1_len + s2_len + s3_len] = '\0'; ^ 53. 54. return(s); #1530 storage/innobase/ut/ut0rbt.cc:823: error: Null Dereference `node` could be null (null value originating from line 821) and is dereferenced. 821. node = (ib_rbt_node_t*) ut_malloc_nokey(SIZEOF_NODE(tree)); 822. 823. memcpy(node->value, value, tree->sizeof_value); ^ 824. node->parent = node->left = node->right = tree->nil; 825. #1531 storage/innobase/ut/ut0rbt.cc:851: error: Null Dereference `node` could be null (null value originating from line 849) and is dereferenced. 849. node = (ib_rbt_node_t*) ut_malloc_nokey(SIZEOF_NODE(tree)); 850. 851. memcpy(node->value, value, tree->sizeof_value); ^ 852. node->parent = node->left = node->right = tree->nil; 853. #1532 storage/innobase/ut/ut0wqueue.cc:41: error: Null Dereference `wq` could be null (null value originating from line 39) and is dereferenced. 39. ut_malloc_nokey(sizeof(*wq))); 40. 41. mysql_mutex_init(0, &wq->mutex, nullptr); ^ 42. 43. wq->items = ib_list_create(); #1533 storage/maria/aria_chk.c:887: error: Dead Store The value written to `&method_conv` is never used. 885. { 886. int method; 887. enum_handler_stats_method UNINIT_VAR(method_conv); ^ 888. maria_stats_method_str= argument; 889. if ((method=find_type(argument, &maria_stats_method_typelib, 2)) <= 0) #1534 storage/maria/aria_chk.c:1355: error: Dead Store The value written to `&datafile` is never used. 1353. (my_bool) !(param->testflag & T_REP), 1354. update_index); 1355. datafile= info->dfile.file; /* This is now locked */ ^ 1356. if (!error && !update_index) 1357. { #1535 storage/maria/aria_chk.c:1752: error: Dead Store The value written to `&keyseg` is never used. 1750. putchar('\n'); 1751. } 1752. keyseg++; ^ 1753. } 1754. if (share->state.header.uniques) #1536 storage/maria/aria_read_log.c:374: error: Dead Store The value written to `&pos` is never used. 372. my_hash_insert(&tables_to_redo, (uchar*) argument); 373. argument= pos+1; 374. } while (*(pos++)); ^ 375. break; 376. } #1537 storage/maria/ha_maria.cc:500: error: Dead Store The value written to `&type` is never used. 498. { 499. uint i, j, recpos, minpos, fieldpos, temp_length, length; 500. enum ha_base_keytype type= HA_KEYTYPE_BINARY; ^ 501. uchar *record; 502. KEY *pos; #1538 storage/maria/ha_maria.cc:2660: error: Uninitialized Value `_.max_data_file_length` is read without initialization. 2658. { 2659. TABLE_SHARE *share= table->s; 2660. stats.max_data_file_length= maria_info.max_data_file_length; ^ 2661. stats.max_index_file_length= maria_info.max_index_file_length; 2662. stats.create_time= maria_info.create_time; #1539 storage/maria/ha_maria.cc:2661: error: Uninitialized Value `_.max_index_file_length` is read without initialization. 2659. TABLE_SHARE *share= table->s; 2660. stats.max_data_file_length= maria_info.max_data_file_length; 2661. stats.max_index_file_length= maria_info.max_index_file_length; ^ 2662. stats.create_time= maria_info.create_time; 2663. ref_length= maria_info.reflength; #1540 storage/maria/ha_maria.cc:2662: error: Uninitialized Value `_.create_time` is read without initialization. 2660. stats.max_data_file_length= maria_info.max_data_file_length; 2661. stats.max_index_file_length= maria_info.max_index_file_length; 2662. stats.create_time= maria_info.create_time; ^ 2663. ref_length= maria_info.reflength; 2664. share->db_options_in_use= maria_info.options; #1541 storage/maria/ha_maria.cc:2663: error: Uninitialized Value `_.reflength` is read without initialization. 2661. stats.max_index_file_length= maria_info.max_index_file_length; 2662. stats.create_time= maria_info.create_time; 2663. ref_length= maria_info.reflength; ^ 2664. share->db_options_in_use= maria_info.options; 2665. stats.block_size= maria_block_size; #1542 storage/maria/ha_maria.cc:2664: error: Uninitialized Value `_.options` is read without initialization. 2662. stats.create_time= maria_info.create_time; 2663. ref_length= maria_info.reflength; 2664. share->db_options_in_use= maria_info.options; ^ 2665. stats.block_size= maria_block_size; 2666. stats.mrr_length_per_rec= maria_info.reflength + 8; // 8 = MY_MAX(sizeof(void *)) #1543 storage/maria/ha_s3.cc:822: error: Uninitialized Value `frm_block.length` is read without initialization. 820. 821. error= share->init_from_binary_frm_image(thd, 1, 822. frm_block.str, frm_block.length, ^ 823. par_block.str, par_block.length); 824. s3_free(&frm_block); #1544 storage/maria/ha_s3.cc:823: error: Uninitialized Value `par_block.length` is read without initialization. 821. error= share->init_from_binary_frm_image(thd, 1, 822. frm_block.str, frm_block.length, 823. par_block.str, par_block.length); ^ 824. s3_free(&frm_block); 825. s3_free(&par_block); #1545 storage/maria/lockman.c:501: error: Uninitialized Value `_.next` is read without initialization. 499. back a savepoint. 500. */ 501. if (my_atomic_casptr((void **)(char*)&(cursor.curr->link), ^ 502. (void **)(char*)&cursor.next, 1+(char *)cursor.next)) 503. { #1546 storage/maria/ma_bitmap.c:1288: error: Uninitialized Value `best_pos` is read without initialization. 1286. uchar *data, *end; 1287. uchar *best_data= 0; 1288. uint best_bits= (uint) -1, UNINIT_VAR(best_pos); ^ 1289. my_bool first_pattern= 0; /* if doing insert_order */ 1290. my_bool first_found= 1; #1547 storage/maria/ma_bitmap.c:1412: error: Uninitialized Value `best_pos` is read without initialization. 1410. uchar *data, *end, *best_data= 0; 1411. my_bool first_found= 1; 1412. uint best_bits= (uint) -1, UNINIT_VAR(best_pos); ^ 1413. DBUG_ENTER("allocate_tail"); 1414. DBUG_PRINT("enter", ("size: %u", size)); #1548 storage/maria/ma_bitmap.c:1522: error: Uninitialized Value `best_prefix_area_size` is read without initialization. 1520. uchar *best_data= 0; 1521. uint min_size; 1522. uint best_area_size, UNINIT_VAR(best_prefix_area_size); ^ 1523. uint page, size; 1524. ulonglong UNINIT_VAR(best_prefix_bits); #1549 storage/maria/ma_bitmap.c:1524: error: Uninitialized Value `best_prefix_bits` is read without initialization. 1522. uint best_area_size, UNINIT_VAR(best_prefix_area_size); 1523. uint page, size; 1524. ulonglong UNINIT_VAR(best_prefix_bits); ^ 1525. DBUG_ENTER("allocate_full_pages"); 1526. DBUG_PRINT("enter", ("pages_needed: %lu", pages_needed)); #1550 storage/maria/ma_bitmap.c:1826: error: Dead Store The value written to `&first_block_pos` is never used. 1824. ulong pages; 1825. uint rest_length, used; 1826. uint UNINIT_VAR(first_block_pos); ^ 1827. MARIA_BITMAP_BLOCK *first_block= 0; 1828. DBUG_ENTER("find_blob"); #1551 storage/maria/ma_bitmap.c:1826: error: Uninitialized Value `first_block_pos` is read without initialization. 1824. ulong pages; 1825. uint rest_length, used; 1826. uint UNINIT_VAR(first_block_pos); ^ 1827. MARIA_BITMAP_BLOCK *first_block= 0; 1828. DBUG_ENTER("find_blob"); #1552 storage/maria/ma_bitmap.c:2778: error: Dead Store The value written to `&page_count` is never used. 2776. current_bitmap_value= FULL_TAIL_PAGE; 2777. /* The bitmap page is only one page */ 2778. page_count= 1; ^ 2779. if (block->used & BLOCKUSED_USED) 2780. { #1553 storage/maria/ma_blockrec.c:2644: error: Uninitialized Value `row_extents_first_part` is read without initialization. 2642. { 2643. uchar *data, *end_of_data, *tmp_data_used, *tmp_data; 2644. uchar *UNINIT_VAR(row_extents_first_part), *UNINIT_VAR(row_extents_second_part); ^ 2645. uchar *field_length_data; 2646. uchar *page_buff; #1554 storage/maria/ma_blockrec.c:2644: error: Uninitialized Value `row_extents_second_part` is read without initialization. 2642. { 2643. uchar *data, *end_of_data, *tmp_data_used, *tmp_data; 2644. uchar *UNINIT_VAR(row_extents_first_part), *UNINIT_VAR(row_extents_second_part); ^ 2645. uchar *field_length_data; 2646. uchar *page_buff; #1555 storage/maria/ma_blockrec.c:2882: error: Dead Store The value written to `&data` is never used. 2880. uint diff_length= share->base.min_block_length - head_length; 2881. bzero(data, diff_length); 2882. data+= diff_length; ^ 2883. head_length= share->base.min_block_length; 2884. } #1556 storage/maria/ma_blockrec.c:3413: error: Dead Store The value written to `&log_pos` is never used. 3411. int2store(log_pos, cur_head_length); 3412. pagerange_store(log_pos + 2, info->cur_row.extents_count); 3413. log_pos+= 2 + PAGERANGE_STORE_SIZE; ^ 3414. log_array[TRANSLOG_INTERNAL_PARTS + 0].length+= (2 + 3415. PAGERANGE_STORE_SIZE); #1557 storage/maria/ma_blockrec.c:4746: error: Uninitialized Value `blob_buffer` is read without initialization. 4744. { 4745. MARIA_SHARE *share= info->s; 4746. uchar *field_length_data= 0, *UNINIT_VAR(blob_buffer), *start_of_data; ^ 4747. uint flag, null_bytes, cur_null_bytes, row_extents, field_lengths; 4748. my_bool found_blob= 0; #1558 storage/maria/ma_blockrec.c:7368: error: Uninitialized Value `checksum_delta` is read without initialization. 7366. uchar *current_record, *orig_record; 7367. pgcache_page_no_t page; 7368. ha_checksum UNINIT_VAR(checksum_delta); ^ 7369. uint rownr, field_length_header, extent_count, length_on_head_page; 7370. int error; #1559 storage/maria/ma_check.c:218: error: Uninitialized Value `old_link` is read without initialization. 216. reg2 ha_rows i; 217. uint delete_link_length; 218. my_off_t empty,next_link,UNINIT_VAR(old_link); ^ 219. char buff[22],buff2[22]; 220. DBUG_ENTER("maria_chk_del"); #1560 storage/maria/ma_check.c:1307: error: Uninitialized Value `start_recpos` is read without initialization. 1305. MARIA_BLOCK_INFO block_info; 1306. MARIA_SHARE *share= info->s; 1307. my_off_t UNINIT_VAR(start_recpos), start_block, pos; ^ 1308. uchar *UNINIT_VAR(to); 1309. ulong UNINIT_VAR(left_length); #1561 storage/maria/ma_check.c:1308: error: Uninitialized Value `to` is read without initialization. 1306. MARIA_SHARE *share= info->s; 1307. my_off_t UNINIT_VAR(start_recpos), start_block, pos; 1308. uchar *UNINIT_VAR(to); ^ 1309. ulong UNINIT_VAR(left_length); 1310. uint b_type; #1562 storage/maria/ma_check.c:1309: error: Uninitialized Value `left_length` is read without initialization. 1307. my_off_t UNINIT_VAR(start_recpos), start_block, pos; 1308. uchar *UNINIT_VAR(to); 1309. ulong UNINIT_VAR(left_length); ^ 1310. uint b_type; 1311. char llbuff[22],llbuff2[22],llbuff3[22]; #1563 storage/maria/ma_check.c:1881: error: Uninitialized Value `full_dir` is read without initialization. 1879. uint block_size= share->block_size; 1880. ha_rows full_page_count, tail_count; 1881. my_bool UNINIT_VAR(full_dir), now_transactional; ^ 1882. uint offset_page, offset, free_count; 1883. LSN lsn; #1564 storage/maria/ma_check.c:1906: error: Uninitialized Value `row_count` is read without initialization. 1904. pos+= block_size, page++) 1905. { 1906. uint UNINIT_VAR(row_count), real_row_count, UNINIT_VAR(empty_space), ^ 1907. page_type, bitmap_pattern; 1908. uint bitmap_for_page; #1565 storage/maria/ma_check.c:1906: error: Uninitialized Value `empty_space` is read without initialization. 1904. pos+= block_size, page++) 1905. { 1906. uint UNINIT_VAR(row_count), real_row_count, UNINIT_VAR(empty_space), ^ 1907. page_type, bitmap_pattern; 1908. uint bitmap_for_page; #1566 storage/maria/ma_check.c:3800: error: Uninitialized Value `key_map` is read without initialization. 3798. char llbuff[22]; 3799. MARIA_SORT_INFO sort_info; 3800. ulonglong UNINIT_VAR(key_map); ^ 3801. myf sync_dir= ((share->now_transactional && !share->temporary) ? 3802. MY_SYNC_DIR : 0); #1567 storage/maria/ma_check.c:4339: error: Uninitialized Value `key_map` is read without initialization. 4337. MARIA_SORT_INFO sort_info; 4338. MARIA_SHARE backup_share; 4339. ulonglong UNINIT_VAR(key_map); ^ 4340. pthread_attr_t thr_attr; 4341. myf sync_dir= ((share->now_transactional && !share->temporary) ? #1568 storage/maria/ma_check.c:5104: error: Uninitialized Value `to` is read without initialization. 5102. case DYNAMIC_RECORD: 5103. { 5104. uchar *UNINIT_VAR(to); ^ 5105. ha_checksum checksum= 0; 5106. #1569 storage/maria/ma_check.c:6186: error: Dead Store The value written to `&error` is never used. 6184. printf("Recreating table '%s'\n", param->isam_file_name); 6185. 6186. error=1; /* Default error */ ^ 6187. info= **org_info; 6188. status_info= (*org_info)->state[0]; #1570 storage/maria/ma_check.c:6191: error: Dead Store The value written to `&unpack` is never used. 6189. info.state= &status_info; 6190. share= *(*org_info)->s; 6191. unpack= ((share.data_file_type == COMPRESSED_RECORD) && ^ 6192. (param->testflag & T_UNPACK)); 6193. if (!(keyinfo=(MARIA_KEYDEF*) my_alloca(sizeof(MARIA_KEYDEF) * #1571 storage/maria/ma_checkpoint.c:574: error: Uninitialized Value `pages_bunch_size` is read without initialization. 572. ulonglong pagecache_flushes_at_last_checkpoint= 573. maria_pagecache->global_cache_write; 574. uint UNINIT_VAR(pages_bunch_size); ^ 575. struct st_filter_param filter_param; 576. PAGECACHE_FILE *UNINIT_VAR(dfile); /**< data file currently being flushed */ #1572 storage/maria/ma_checkpoint.c:576: error: Uninitialized Value `dfile` is read without initialization. 574. uint UNINIT_VAR(pages_bunch_size); 575. struct st_filter_param filter_param; 576. PAGECACHE_FILE *UNINIT_VAR(dfile); /**< data file currently being flushed */ ^ 577. PAGECACHE_FILE *UNINIT_VAR(kfile); /**< index file currently being flushed */ 578. #1573 storage/maria/ma_checkpoint.c:577: error: Uninitialized Value `kfile` is read without initialization. 575. struct st_filter_param filter_param; 576. PAGECACHE_FILE *UNINIT_VAR(dfile); /**< data file currently being flushed */ 577. PAGECACHE_FILE *UNINIT_VAR(kfile); /**< index file currently being flushed */ ^ 578. 579. my_thread_init(); #1574 storage/maria/ma_checkpoint.c:780: error: Uninitialized Value `state_copies_horizon` is read without initialization. 778. *state_copies_end, /**< cache ends here */ 779. *state_copy; /**< iterator in cache */ 780. TRANSLOG_ADDRESS UNINIT_VAR(state_copies_horizon); /**< horizon of states' _copies_ */ ^ 781. struct st_filter_param filter_param; 782. PAGECACHE_FLUSH_FILTER filter; #1575 storage/maria/ma_commit.c:66: error: Uninitialized Value `commit_lsn` is read without initialization. 64. sizeof(log_array)/sizeof(log_array[0]), 65. log_array, NULL, NULL) | 66. translog_flush(commit_lsn)); ^ 67. 68. DBUG_EXECUTE_IF("maria_sleep_in_commit", #1576 storage/maria/ma_create.c:65: error: Uninitialized Value `dfile` is read without initialization. 63. { 64. uint i,j; 65. File UNINIT_VAR(dfile), UNINIT_VAR(file); ^ 66. int errpos,save_errno, create_mode= O_RDWR | O_TRUNC, res; 67. myf create_flag, common_flag= MY_WME, sync_dir= 0; #1577 storage/maria/ma_create.c:65: error: Uninitialized Value `file` is read without initialization. 63. { 64. uint i,j; 65. File UNINIT_VAR(dfile), UNINIT_VAR(file); ^ 66. int errpos,save_errno, create_mode= O_RDWR | O_TRUNC, res; 67. myf create_flag, common_flag= MY_WME, sync_dir= 0; #1578 storage/maria/ma_create.c:539: error: Dead Store The value written to `&real_length_diff` is never used. 537. length++; /* At least one length uchar */ 538. min_key_length+= 1 + HA_FT_WLEN; 539. real_length_diff=HA_FT_MAXBYTELEN-FT_MAX_WORD_LEN_FOR_SORT; ^ 540. } 541. else #1579 storage/maria/ma_create.c:998: error: Dead Store The value written to `&keyseg` is never used. 996. { 997. HA_KEYSEG *keyseg_end; 998. keyseg= uniquedefs[i].seg; ^ 999. if (_ma_uniquedef_write(file, &uniquedefs[i])) 1000. goto err; #1580 storage/maria/ma_crypt.c:106: error: Null Dereference `crypt_data` could be null (from the call to `my_malloc()` on line 105) and is dereferenced. 104. MARIA_CRYPT_DATA *crypt_data= 105. (MARIA_CRYPT_DATA*)my_malloc(PSI_INSTRUMENT_ME, sizeof(MARIA_CRYPT_DATA), MYF(MY_ZEROFILL)); 106. crypt_data->scheme.type= CRYPT_SCHEME_1; ^ 107. crypt_data->scheme.locker= crypt_data_scheme_locker; 108. mysql_mutex_init(key_CRYPT_DATA_lock, &crypt_data->lock, MY_MUTEX_INIT_FAST); #1581 storage/maria/ma_delete.c:686: error: Dead Store The value written to `&ret_value` is never used. 684. { 685. /* Underflow, leaf_page will be written by caller */ 686. ret_value= 1; ^ 687. } 688. else #1582 storage/maria/ma_delete.c:1384: error: Dead Store The value written to `&old_key` is never used. 1382. /* keypos points here on start of next key */ 1383. get_key_length(next_length,keypos); 1384. get_key_pack_length(prev_length,prev_pack_length,old_key); ^ 1385. if (next_length > prev_length) 1386. { #1583 storage/maria/ma_delete.c:1384: error: Dead Store The value written to `&old_key` is never used. 1382. /* keypos points here on start of next key */ 1383. get_key_length(next_length,keypos); 1384. get_key_pack_length(prev_length,prev_pack_length,old_key); ^ 1385. if (next_length > prev_length) 1386. { #1584 storage/maria/ma_delete.c:1621: error: Dead Store The value written to `&log_pos` is never used. 1619. log_array[translog_parts + 1].str= data; 1620. log_array[translog_parts + 1].length= length; 1621. log_pos+= 3; ^ 1622. translog_parts+= 2; 1623. current_size+= length; #1585 storage/maria/ma_dynrec.c:947: error: Uninitialized Value `_.next_filepos` is read without initialization. 945. goto err; 946. } 947. if (_ma_write_part_record(info,filepos,length,block_info.next_filepos, ^ 948. &record,&reclength,&flag)) 949. goto err; #1586 storage/maria/ma_dynrec.c:957: error: Uninitialized Value `_.next_filepos` is read without initialization. 955. } 956. 957. if (block_info.next_filepos != HA_OFFSET_ERROR) ^ 958. if (delete_dynamic_record(info,block_info.next_filepos,1)) 959. goto err; #1587 storage/maria/ma_dynrec.c:1488: error: Uninitialized Value `to` is read without initialization. 1486. MARIA_BLOCK_INFO block_info; 1487. File file; 1488. uchar *UNINIT_VAR(to); ^ 1489. uint UNINIT_VAR(left_length); 1490. MARIA_SHARE *share= info->s; #1588 storage/maria/ma_dynrec.c:1489: error: Uninitialized Value `left_length` is read without initialization. 1487. File file; 1488. uchar *UNINIT_VAR(to); 1489. uint UNINIT_VAR(left_length); ^ 1490. MARIA_SHARE *share= info->s; 1491. DBUG_ENTER("_ma_read_dynamic_record"); #1589 storage/maria/ma_dynrec.c:1635: error: Dead Store The value written to `&buffer_length` is never used. 1633. MARIA_BLOCK_INFO block_info; 1634. my_bool error= 1, buff_alloced= 0; 1635. size_t UNINIT_VAR(buffer_length); ^ 1636. DBUG_ENTER("_ma_cmp_dynamic_record"); 1637. #1590 storage/maria/ma_dynrec.c:1635: error: Uninitialized Value `buffer_length` is read without initialization. 1633. MARIA_BLOCK_INFO block_info; 1634. my_bool error= 1, buff_alloced= 0; 1635. size_t UNINIT_VAR(buffer_length); ^ 1636. DBUG_ENTER("_ma_cmp_dynamic_record"); 1637. #1591 storage/maria/ma_dynrec.c:1681: error: Dead Store The value written to `&flag` is never used. 1679. if (flag == 0) /* First block */ 1680. { 1681. flag=1; ^ 1682. if (reclength != block_info.rec_len) 1683. { #1592 storage/maria/ma_dynrec.c:1784: error: Uninitialized Value `to` is read without initialization. 1782. #endif 1783. uint left_len,b_type; 1784. uchar *UNINIT_VAR(to); ^ 1785. MARIA_BLOCK_INFO block_info; 1786. MARIA_SHARE *share= info->s; #1593 storage/maria/ma_ft_boolean_search.c:300: error: Uninitialized Value `_.pos` is read without initialization. 298. info.quot= 0; 299. while (maria_ft_get_word(cs, start, end, &w, &info)) 300. param->mysql_add_word(param, (char*)w.pos, w.len, &info); ^ 301. return(0); 302. } #1594 storage/maria/ma_ft_boolean_search.c:300: error: Uninitialized Value `_.len` is read without initialization. 298. info.quot= 0; 299. while (maria_ft_get_word(cs, start, end, &w, &info)) 300. param->mysql_add_word(param, (char*)w.pos, w.len, &info); ^ 301. return(0); 302. } #1595 storage/maria/ma_ft_boolean_search.c:352: error: Uninitialized Value `off` is read without initialization. 350. my_bool can_go_down; 351. MARIA_HA *info=ftb->info; 352. uint UNINIT_VAR(off), extra=HA_FT_WLEN+info->s->base.rec_reflength; ^ 353. uchar *lastkey_buf= ftbw->word+ftbw->off; 354. MARIA_KEY key; #1596 storage/maria/ma_ft_boolean_search.c:467: error: Dead Store The value written to `&r` is never used. 465. ftbw->key_root= info->cur_row.lastpos; 466. ftbw->keyinfo= info->last_key.keyinfo= & info->s->ft2_keyinfo; 467. r= _ma_search_first(info, ftbw->keyinfo, ftbw->key_root); ^ 468. DBUG_ASSERT(r==0); /* found something */ 469. memcpy(lastkey_buf+off, info->last_key.data, #1597 storage/maria/ma_ft_nlq_search.c:80: error: Dead Store The value written to `&keyinfo` is never used. 78. MARIA_SHARE *share= info->s; 79. uchar *keybuff= aio->keybuff; 80. MARIA_KEYDEF *keyinfo= share->keyinfo+aio->keynr; ^ 81. my_off_t key_root; 82. uint extra=HA_FT_WLEN+share->rec_reflength; #1598 storage/maria/ma_key_recover.c:630: error: Dead Store The value written to `&log_pos` is never used. 628. log_array[translog_parts+1].str= data; 629. log_array[translog_parts+1].length= length; 630. log_pos+= 3; ^ 631. translog_parts+= 2; 632. current_size+= length; #1599 storage/maria/ma_loghandler.c:1417: error: Uninitialized Value `fc_ptr` is read without initialization. 1415. { 1416. int i; 1417. struct st_file_counter *UNINIT_VAR(fc_ptr); ^ 1418. DBUG_ENTER("translog_mark_file_finished"); 1419. DBUG_PRINT("enter", ("file: %lu", (ulong) file)); #1600 storage/maria/ma_loghandler.c:2960: error: Dead Store The value written to `&page_pos` is never used. 2958. DBUG_RETURN(1); 2959. } 2960. page_pos+= CRC_SIZE; /* Skip crc */ ^ 2961. } 2962. if (flags & TRANSLOG_SECTOR_PROTECTION && #1601 storage/maria/ma_loghandler.c:3623: error: Uninitialized Value `sure_page` is read without initialization. 3621. uint old_flags= flags; 3622. uint32 start_file_num= 1; 3623. TRANSLOG_ADDRESS UNINIT_VAR(sure_page), last_page, last_valid_page, ^ 3624. checkpoint_lsn; 3625. my_bool version_changed= 0; #1602 storage/maria/ma_loghandler.c:4138: error: Dead Store The value written to `&chunk_1byte` is never used. 4136. if (scanner.page == END_OF_LOG) 4137. break; /* it was the last record */ 4138. chunk_1byte= scanner.page[scanner.page_offset]; ^ 4139. continue; /* try to find other record on this page */ 4140. } #1603 storage/maria/ma_loghandler.c:6103: error: Dead Store The value written to `&rc` is never used. 6101. translog_buffer_decrease_writers(buffer_to_flush); 6102. if (!rc) 6103. rc= translog_buffer_flush(buffer_to_flush); ^ 6104. translog_buffer_unlock(buffer_to_flush); 6105. buffer_to_flush= NULL; #1604 storage/maria/ma_loghandler.c:7097: error: Uninitialized Value `_.page` is read without initialization. 7095. translog_scanner_init(base_lsn, 1, scanner, scanner == &internal_scanner); 7096. /* first group chunk is always chunk type 2 */ 7097. page= scanner->page; ^ 7098. page_offset= scanner->page_offset; 7099. src= page + page_offset + 1; #1605 storage/maria/ma_loghandler.c:7230: error: Dead Store The value written to `&addr` is never used. 7228. data.was_recovered= 0; 7229. addr= lsn; 7230. addr-= page_offset; /* offset decreasing */ ^ 7231. res= (!(page= translog_get_page(&data, psize_buff.buffer, &direct_link))) ? 7232. RECHEADER_READ_ERROR : #1606 storage/maria/ma_loghandler.c:7231: error: Uninitialized Value `addr` is read without initialization during the call to `translog_get_page()`. 7229. addr= lsn; 7230. addr-= page_offset; /* offset decreasing */ 7231. res= (!(page= translog_get_page(&data, psize_buff.buffer, &direct_link))) ? ^ 7232. RECHEADER_READ_ERROR : 7233. translog_read_record_header_from_buffer(page, page_offset, buff, 0); #1607 storage/maria/ma_loghandler.c:7535: error: Uninitialized Value `_.current_offset` is read without initialization. 7533. } 7534. if (lsn || 7535. (offset < data->current_offset && ^ 7536. !(offset < data->read_header && offset + length < data->read_header))) 7537. { #1608 storage/maria/ma_loghandler.c:7536: error: Uninitialized Value `_.read_header` is read without initialization. 7534. if (lsn || 7535. (offset < data->current_offset && 7536. !(offset < data->read_header && offset + length < data->read_header))) ^ 7537. { 7538. if (translog_init_reader_data(lsn, data)) #1609 storage/maria/ma_loghandler.c:7551: error: Uninitialized Value `_.read_header` is read without initialization. 7549. (uint) data->scanner.page_offset, 7550. data->scanner.fixed_horizon)); 7551. if (offset < data->read_header) ^ 7552. { 7553. uint16 len= MY_MIN(data->read_header, end) - offset; #1610 storage/maria/ma_loghandler.c:7561: error: Uninitialized Value `scanner.scanner.direct_link` is read without initialization during the call to `translog_destroy_reader_data()`. 7559. if (length == 0) 7560. { 7561. translog_destroy_reader_data(data); ^ 7562. DBUG_RETURN(requested_length); 7563. } #1611 storage/maria/ma_loghandler.c:7576: error: Uninitialized Value `_.chunk_size` is read without initialization. 7574. for(;;) 7575. { 7576. uint page_end= data->current_offset + data->chunk_size; ^ 7577. DBUG_PRINT("info", 7578. ("enter body offset: %lu curr: %lu " #1612 storage/maria/ma_loghandler.c:7588: error: Uninitialized Value `_.scanner.page` is read without initialization. 7586. DBUG_ASSERT(offset >= data->current_offset); 7587. memcpy(buffer, 7588. data->scanner.page + data->body_offset + ^ 7589. (offset - data->current_offset), len); 7590. length-= len; #1613 storage/maria/ma_loghandler.c:7588: error: Uninitialized Value `_.body_offset` is read without initialization. 7586. DBUG_ASSERT(offset >= data->current_offset); 7587. memcpy(buffer, 7588. data->scanner.page + data->body_offset + ^ 7589. (offset - data->current_offset), len); 7590. length-= len; #1614 storage/maria/ma_loghandler.c:7593: error: Uninitialized Value `scanner.scanner.direct_link` is read without initialization during the call to `translog_destroy_reader_data()`. 7591. if (length == 0) 7592. { 7593. translog_destroy_reader_data(data); ^ 7594. DBUG_RETURN(requested_length); 7595. } #1615 storage/maria/ma_loghandler.c:7603: error: Uninitialized Value `data.eor` is read without initialization during the call to `translog_record_read_next_chunk()`. 7601. (ulong) length)); 7602. } 7603. if (translog_record_read_next_chunk(data)) ^ 7604. { 7605. translog_destroy_reader_data(data); #1616 storage/maria/ma_loghandler.c:7605: error: Uninitialized Value `buff.header.groups_no` is read without initialization during the call to `translog_destroy_reader_data()`. 7603. if (translog_record_read_next_chunk(data)) 7604. { 7605. translog_destroy_reader_data(data); ^ 7606. DBUG_RETURN(requested_length - length); 7607. } #1617 storage/maria/ma_loghandler.c:7605: error: Uninitialized Value `internal_data.scanner.direct_link` is read without initialization during the call to `translog_destroy_reader_data()`. 7603. if (translog_record_read_next_chunk(data)) 7604. { 7605. translog_destroy_reader_data(data); ^ 7606. DBUG_RETURN(requested_length - length); 7607. } #1618 storage/maria/ma_loghandler.c:7605: error: Uninitialized Value `scanner.scanner.direct_link` is read without initialization during the call to `translog_destroy_reader_data()`. 7603. if (translog_record_read_next_chunk(data)) 7604. { 7605. translog_destroy_reader_data(data); ^ 7606. DBUG_RETURN(requested_length - length); 7607. } #1619 storage/maria/ma_loghandler.c:7629: error: Uninitialized Value `current_page_fill` is read without initialization. 7627. uchar *data= log_descriptor.bc.ptr - log_descriptor.bc.current_page_fill; 7628. uint16 left= TRANSLOG_PAGE_SIZE - log_descriptor.bc.current_page_fill; 7629. uint16 UNINIT_VAR(current_page_fill), write_counter, previous_offset; ^ 7630. DBUG_ENTER("translog_force_current_buffer_to_finish"); 7631. #1620 storage/maria/ma_loghandler.c:7962: error: Dead Store The value written to `&last_buffer_no` is never used. 7960. dirty_buffer_mask_t dirty_buffer_mask; 7961. uint i; 7962. uint8 UNINIT_VAR(last_buffer_no), start_buffer_no; ^ 7963. DBUG_ENTER("translog_flush_buffers"); 7964. #1621 storage/maria/ma_loghandler.c:7962: error: Uninitialized Value `last_buffer_no` is read without initialization. 7960. dirty_buffer_mask_t dirty_buffer_mask; 7961. uint i; 7962. uint8 UNINIT_VAR(last_buffer_no), start_buffer_no; ^ 7963. DBUG_ENTER("translog_flush_buffers"); 7964. #1622 storage/maria/ma_loghandler.c:8111: error: Uninitialized Value `flush_interval` is read without initialization. 8109. { 8110. struct timespec abstime; 8111. ulonglong UNINIT_VAR(flush_interval); ^ 8112. ulonglong time_spent; 8113. LSN sent_to_disk= LSN_IMPOSSIBLE; #1623 storage/maria/ma_open.c:159: error: Uninitialized Value `changed_fields_bitmap` is read without initialization. 157. 158. _ma_set_data_pagecache_callbacks(&info.dfile, share); 159. my_bitmap_init(&info.changed_fields, changed_fields_bitmap, ^ 160. share->base.fields, 0); 161. if ((*share->init)(&info)) #1624 storage/maria/ma_open.c:208: error: Uninitialized Value `m_info` is read without initialization. 206. bzero(info.rec_buff, share->base.default_rec_buff_size); 207. 208. *m_info=info; ^ 209. thr_lock_data_init(&share->lock,&m_info->lock,(void*) m_info); 210. #1625 storage/maria/ma_open.c:240: error: Uninitialized Value `m_info` is read without initialization. 238. (*share->end)(&info); 239. delete_dynamic(&info.pinned_pages); 240. my_free(m_info->s3); ^ 241. my_free(m_info); 242. /* fall through */ #1626 storage/maria/ma_open.c:276: error: Uninitialized Value `disk_cache` is read without initialization. 274. char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN], 275. data_name[FN_REFLEN]; 276. uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; ^ 277. MARIA_HA info, *UNINIT_VAR(m_info), *old_info= NULL; 278. MARIA_SHARE share_buff,*share; #1627 storage/maria/ma_open.c:277: error: Dead Store The value written to `&m_info` is never used. 275. data_name[FN_REFLEN]; 276. uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; 277. MARIA_HA info, *UNINIT_VAR(m_info), *old_info= NULL; ^ 278. MARIA_SHARE share_buff,*share; 279. double *rec_per_key_part; #1628 storage/maria/ma_open.c:277: error: Uninitialized Value `m_info` is read without initialization. 275. data_name[FN_REFLEN]; 276. uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; 277. MARIA_HA info, *UNINIT_VAR(m_info), *old_info= NULL; ^ 278. MARIA_SHARE share_buff,*share; 279. double *rec_per_key_part; #1629 storage/maria/ma_packrec.c:379: error: Dead Store The value written to `&ptr` is never used. 377. offset_bits=get_bits(bit_buff,5); 378. intervall_length=0; 379. ptr=tmp_buff; ^ 380. ptr=tmp_buff; 381. DBUG_PRINT("info", ("byte value compression")); #1630 storage/maria/ma_packrec.c:756: error: Uninitialized Value `_.offset` is read without initialization. 754. filepos)) 755. goto err; 756. if (mysql_file_read(file, info->rec_buff + block_info.offset , ^ 757. block_info.rec_len - block_info.offset, MYF(MY_NABP))) 758. goto panic; #1631 storage/maria/ma_packrec.c:1392: error: Uninitialized Value `_.offset` is read without initialization. 1390. else 1391. { 1392. if (mysql_file_read(info->dfile.file, info->rec_buff + block_info.offset, ^ 1393. block_info.rec_len-block_info.offset, 1394. MYF(MY_NABP))) #1632 storage/maria/ma_packrec.c:1418: error: Uninitialized Value `ref_length` is read without initialization. 1416. { 1417. uchar *header= info->header; 1418. uint head_length,UNINIT_VAR(ref_length); ^ 1419. MARIA_SHARE *share= maria->s; 1420. #1633 storage/maria/ma_pagecache.c:3758: error: Uninitialized Value `page_st` is read without initialization. 3756. PAGECACHE_BLOCK_LINK *block; 3757. uint status; 3758. int UNINIT_VAR(page_st); ^ 3759. 3760. pagecache_pthread_mutex_lock(&pagecache->cache_lock); #1634 storage/maria/ma_range.c:216: error: Uninitialized Value `max_keynr` is read without initialization. 214. { 215. int flag; 216. uint keynr, UNINIT_VAR(max_keynr); ^ 217. my_bool last_key_on_page; 218. uchar *keypos; #1635 storage/maria/ma_recovery.c:221: error: Dead Store The value written to `&res` is never used. 219. int maria_recovery_from_log(void) 220. { 221. int res= 1; ^ 222. FILE *trace_file; 223. uint warnings_count; #1636 storage/maria/ma_recovery.c:789: error: Dead Store The value written to `&dfile` is never used. 787. prototype_redo_exec_hook(REDO_CREATE_TABLE) 788. { 789. File dfile= -1, kfile= -1; ^ 790. char *linkname_ptr, filename[FN_REFLEN], *name, *ptr, *ptr2, 791. *data_file_name, *index_file_name; #1637 storage/maria/ma_recovery.c:898: error: Dead Store The value written to `&ptr` is never used. 896. ptr+= strlen(data_file_name) + 1; 897. index_file_name= ptr; 898. ptr+= strlen(index_file_name) + 1; ^ 899. /** @todo handle symlinks */ 900. if (data_file_name[0] || index_file_name[0]) #1638 storage/maria/ma_recovery.c:3122: error: Uninitialized Value `page` is read without initialization. 3120. { 3121. uint16 sid; 3122. pgcache_page_no_t UNINIT_VAR(page); ^ 3123. MARIA_HA *info; 3124. MARIA_SHARE *share; #1639 storage/maria/ma_rt_index.c:573: error: Uninitialized Value `best_area` is read without initialization. 571. double best_incr= DBL_MAX; 572. double area; 573. double UNINIT_VAR(best_area); ^ 574. const uchar *best_key= NULL; 575. const uchar *k= rt_PAGE_FIRST_KEY(share, page->buff, page->node); #1640 storage/maria/ma_rt_split.c:188: error: Uninitialized Value `a` is read without initialization. 186. { 187. SplitStruct *cur; 188. SplitStruct *UNINIT_VAR(a); ^ 189. SplitStruct *UNINIT_VAR(b); 190. double *g1= reserve_coords(d_buffer, n_dim); #1641 storage/maria/ma_rt_split.c:189: error: Uninitialized Value `b` is read without initialization. 187. SplitStruct *cur; 188. SplitStruct *UNINIT_VAR(a); 189. SplitStruct *UNINIT_VAR(b); ^ 190. double *g1= reserve_coords(d_buffer, n_dim); 191. double *g2= reserve_coords(d_buffer, n_dim); #1642 storage/maria/ma_rt_split.c:192: error: Uninitialized Value `next` is read without initialization. 190. double *g1= reserve_coords(d_buffer, n_dim); 191. double *g2= reserve_coords(d_buffer, n_dim); 192. SplitStruct *UNINIT_VAR(next); ^ 193. int UNINIT_VAR(next_node); 194. int i; #1643 storage/maria/ma_rt_split.c:193: error: Uninitialized Value `next_node` is read without initialization. 191. double *g2= reserve_coords(d_buffer, n_dim); 192. SplitStruct *UNINIT_VAR(next); 193. int UNINIT_VAR(next_node); ^ 194. int i; 195. SplitStruct *end= node + n_entries; #1644 storage/maria/ma_search.c:289: error: Uninitialized Value `flag` is read without initialization. 287. uchar *buff __attribute__((unused)), my_bool *last_key) 288. { 289. int UNINIT_VAR(flag); ^ 290. uint page_flag; 291. uint start, mid, end, save_end, totlength, nod_flag; #1645 storage/maria/ma_search.c:374: error: Uninitialized Value `flag` is read without initialization. 372. uchar *buff, my_bool *last_key) 373. { 374. int UNINIT_VAR(flag); ^ 375. uint page_flag, nod_flag, UNINIT_VAR(length), not_used[2]; 376. uchar t_buff[MARIA_MAX_KEY_BUFF], *end; #1646 storage/maria/ma_search.c:375: error: Uninitialized Value `length` is read without initialization. 373. { 374. int UNINIT_VAR(flag); 375. uint page_flag, nod_flag, UNINIT_VAR(length), not_used[2]; ^ 376. uchar t_buff[MARIA_MAX_KEY_BUFF], *end; 377. uchar *page; #1647 storage/maria/ma_search.c:442: error: Uninitialized Value `length` is read without initialization. 440. */ 441. int flag=0, my_flag=-1; 442. uint nod_flag, UNINIT_VAR(length), len, matched, cmplen, kseg_len; ^ 443. uint page_flag, UNINIT_VAR(prefix_len),suffix_len; 444. int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left; #1648 storage/maria/ma_search.c:443: error: Uninitialized Value `prefix_len` is read without initialization. 441. int flag=0, my_flag=-1; 442. uint nod_flag, UNINIT_VAR(length), len, matched, cmplen, kseg_len; 443. uint page_flag, UNINIT_VAR(prefix_len),suffix_len; ^ 444. int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left; 445. uchar *end, *vseg, *UNINIT_VAR(saved_vseg), *UNINIT_VAR(saved_from); #1649 storage/maria/ma_search.c:444: error: Uninitialized Value `seg_len_pack` is read without initialization. 442. uint nod_flag, UNINIT_VAR(length), len, matched, cmplen, kseg_len; 443. uint page_flag, UNINIT_VAR(prefix_len),suffix_len; 444. int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left; ^ 445. uchar *end, *vseg, *UNINIT_VAR(saved_vseg), *UNINIT_VAR(saved_from); 446. uchar *page; #1650 storage/maria/ma_search.c:445: error: Uninitialized Value `saved_vseg` is read without initialization. 443. uint page_flag, UNINIT_VAR(prefix_len),suffix_len; 444. int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left; 445. uchar *end, *vseg, *UNINIT_VAR(saved_vseg), *UNINIT_VAR(saved_from); ^ 446. uchar *page; 447. uchar tt_buff[MARIA_MAX_KEY_BUFF+2], *t_buff=tt_buff+2; #1651 storage/maria/ma_search.c:445: error: Uninitialized Value `saved_from` is read without initialization. 443. uint page_flag, UNINIT_VAR(prefix_len),suffix_len; 444. int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left; 445. uchar *end, *vseg, *UNINIT_VAR(saved_vseg), *UNINIT_VAR(saved_from); ^ 446. uchar *page; 447. uchar tt_buff[MARIA_MAX_KEY_BUFF+2], *t_buff=tt_buff+2; #1652 storage/maria/ma_search.c:448: error: Uninitialized Value `saved_to` is read without initialization. 446. uchar *page; 447. uchar tt_buff[MARIA_MAX_KEY_BUFF+2], *t_buff=tt_buff+2; 448. uchar *UNINIT_VAR(saved_to); ^ 449. const uchar *kseg; 450. uint saved_length=0, saved_prefix_len=0; #1653 storage/maria/ma_search.c:1939: error: Dead Store The value written to `&length_pack` is never used. 1937. 1938. key= int_key->data; 1939. length_pack=s_temp->ref_length=s_temp->n_ref_length=s_temp->n_length=0; ^ 1940. same_length=0; keyseg=keyinfo->seg; 1941. key_length= int_key->data_length + int_key->ref_length + nod_flag; #1654 storage/maria/ma_sort.c:130: error: Uninitialized Value `keys` is read without initialization. 128. size_t memavl, old_memavl; 129. DYNAMIC_ARRAY buffpek; 130. ha_rows records, UNINIT_VAR(keys); ^ 131. uchar **sort_keys; 132. IO_CACHE tempfile, tempfile_for_exceptions; #1655 storage/maria/ma_sort.c:392: error: Uninitialized Value `keys` is read without initialization. 390. ulonglong memavl, old_memavl; 391. longlong sortbuff_size; 392. ha_keys UNINIT_VAR(keys), idx; ^ 393. uint sort_length; 394. uint maxbuffer; #1656 storage/maria/ma_sort.c:586: error: Uninitialized Value `length` is read without initialization. 584. MARIA_SORT_INFO *sort_info=sort_param->sort_info; 585. HA_CHECK *param=sort_info->param; 586. size_t UNINIT_VAR(length), keys; ^ 587. double *rec_per_key_part= param->new_rec_per_key_part; 588. int got_error=sort_info->got_error; #1657 storage/maria/ma_sort.c:1032: error: Uninitialized Value `to_start_filepos` is read without initialization. 1030. ha_keys maxcount; 1031. ha_rows count; 1032. my_off_t UNINIT_VAR(to_start_filepos), read_length; ^ 1033. uchar *strpos; 1034. BUFFPEK *buffpek,**refpek; #1658 storage/maria/ma_test2.c:1069: error: Dead Store The value written to `&pos` is never used. 1067. break; 1068. case 'd': 1069. remove_count= atoi(++pos); ^ 1070. break; 1071. case 'i': #1659 storage/maria/ma_test2.c:1087: error: Dead Store The value written to `&pos` is never used. 1085. break; 1086. case 'm': /* records */ 1087. if ((recant=atoi(++pos)) < 10 && testflag > 2) ^ 1088. { 1089. fprintf(stderr,"record count must be >= 10 (if testflag > 2)\n"); #1660 storage/maria/ma_test2.c:1100: error: Dead Store The value written to `&pos` is never used. 1098. case 'e': /* maria_block_length */ 1099. case 'E': 1100. if ((maria_block_size= atoi(++pos)) < MARIA_MIN_KEY_BLOCK_LENGTH || ^ 1101. maria_block_size > MARIA_MAX_KEY_BLOCK_LENGTH) 1102. { #1661 storage/maria/ma_test2.c:1109: error: Dead Store The value written to `&pos` is never used. 1107. break; 1108. case 'f': 1109. if ((first_key=atoi(++pos)) < 0 || first_key >= MARIA_KEYS) ^ 1110. first_key=0; 1111. break; #1662 storage/maria/ma_test2.c:1113: error: Dead Store The value written to `&pos` is never used. 1111. break; 1112. case 'H': 1113. checkpoint= atoi(++pos); ^ 1114. break; 1115. case 'h': #1663 storage/maria/ma_test2.c:1116: error: Dead Store The value written to `&pos` is never used. 1114. break; 1115. case 'h': 1116. maria_data_root= ++pos; ^ 1117. break; 1118. case 'k': #1664 storage/maria/ma_test2.c:1119: error: Dead Store The value written to `&pos` is never used. 1117. break; 1118. case 'k': 1119. if ((keys=(uint) atoi(++pos)) < 1 || ^ 1120. keys > (uint) (MARIA_KEYS-first_key)) 1121. keys=MARIA_KEYS-first_key; #1665 storage/maria/ma_test2.c:1131: error: Dead Store The value written to `&pos` is never used. 1129. break; 1130. case 'R': /* Length of record pointer */ 1131. rec_pointer_size=atoi(++pos); ^ 1132. if (rec_pointer_size > 7) 1133. rec_pointer_size=0; #1666 storage/maria/ma_test2.c:1143: error: Dead Store The value written to `&pos` is never used. 1141. break; 1142. case 't': 1143. testflag=atoi(++pos); /* testmod */ ^ 1144. break; 1145. case 'T': #1667 storage/maria/ma_test2.c:1149: error: Dead Store The value written to `&pos` is never used. 1147. break; 1148. case 'A': 1149. die_in_middle_of_transaction= atoi(++pos); ^ 1150. break; 1151. case 'u': #1668 storage/maria/ma_test2.c:1152: error: Dead Store The value written to `&pos` is never used. 1150. break; 1151. case 'u': 1152. update_count=atoi(++pos); ^ 1153. if (!update_count) 1154. skip_update= 1; #1669 storage/maria/ma_test3.c:136: error: Dead Store The value written to `&pos` is never used. 134. switch(*++pos) { 135. case 'f': 136. forks=atoi(++pos); ^ 137. break; 138. case 't': #1670 storage/maria/ma_test3.c:139: error: Dead Store The value written to `&pos` is never used. 137. break; 138. case 't': 139. tests=atoi(++pos); ^ 140. break; 141. case 'K': /* Use key cacheing */ #1671 storage/maria/ma_update.c:30: error: Dead Store The value written to `&new_key_buff` is never used. 28. reg3 my_off_t pos; 29. uint i; 30. uchar old_key_buff[MARIA_MAX_KEY_BUFF], *UNINIT_VAR(new_key_buff); ^ 31. my_bool auto_key_changed= 0; 32. ulonglong UNINIT_VAR(changed); #1672 storage/maria/ma_update.c:30: error: Uninitialized Value `new_key_buff` is read without initialization. 28. reg3 my_off_t pos; 29. uint i; 30. uchar old_key_buff[MARIA_MAX_KEY_BUFF], *UNINIT_VAR(new_key_buff); ^ 31. my_bool auto_key_changed= 0; 32. ulonglong UNINIT_VAR(changed); #1673 storage/maria/ma_update.c:32: error: Dead Store The value written to `&changed` is never used. 30. uchar old_key_buff[MARIA_MAX_KEY_BUFF], *UNINIT_VAR(new_key_buff); 31. my_bool auto_key_changed= 0; 32. ulonglong UNINIT_VAR(changed); ^ 33. MARIA_SHARE *share= info->s; 34. MARIA_KEYDEF *keyinfo; #1674 storage/maria/ma_update.c:32: error: Uninitialized Value `changed` is read without initialization. 30. uchar old_key_buff[MARIA_MAX_KEY_BUFF], *UNINIT_VAR(new_key_buff); 31. my_bool auto_key_changed= 0; 32. ulonglong UNINIT_VAR(changed); ^ 33. MARIA_SHARE *share= info->s; 34. MARIA_KEYDEF *keyinfo; #1675 storage/maria/ma_write.c:994: error: Uninitialized Value `after_key` is read without initialization. 992. uint length,a_length,key_ref_length,t_length,nod_flag,key_length; 993. uint page_length, split_length, page_flag; 994. uchar *key_pos, *pos, *UNINIT_VAR(after_key); ^ 995. MARIA_KEY_PARAM s_temp; 996. MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link; #1676 storage/maria/ma_write.c:1983: error: Dead Store The value written to `&page` is never used. 1981. uint offset= (uint) (key_pos - ma_page->buff), translog_parts; 1982. MARIA_HA *info= ma_page->info; 1983. my_off_t page= ma_page->pos / info->s->block_size; ^ 1984. DBUG_ENTER("_ma_log_change"); 1985. DBUG_PRINT("enter", ("page: %lu length: %u", (ulong) page, length)); #1677 storage/maria/s3_func.c:188: error: Uninitialized Value `protocol_version` is read without initialization during the call to `ms3_set_option()`. 186. } 187. 188. ms3_set_option(s3_client, MS3_OPT_FORCE_PROTOCOL_VERSION, ^ 189. &protocol_version); 190. } #1678 storage/maria/s3_func.c:476: error: Dead Store The value written to `&end` is never used. 474. 475. /* The 000000 will be update with block number by fix_suffix() */ 476. end= strmov(end, "/000000"); ^ 477. 478. error= copy_from_file(s3_client, aws_bucket, aws_path, file, cap.header_size, #1679 storage/maria/s3_func.c:499: error: Dead Store The value written to `&end` is never used. 497. 498. /* The 000000 will be update with block number by fix_suffix() */ 499. end= strmov(end, "/000000"); ^ 500. 501. error= copy_from_file(s3_client, aws_bucket, aws_path, file, 0, file_size, #1680 storage/maria/s3_func.c:513: error: Dead Store The value written to `&end` is never used. 511. if (frm_created) 512. { 513. end= strmov(aws_path_end,"/frm"); ^ 514. (void) s3_delete_object(s3_client, aws_bucket, aws_path, MYF(ME_NOTE)); 515. } #1681 storage/maria/s3_func.c:554: error: Uninitialized Value `block.length` is read without initialization. 552. goto err; 553. 554. error= my_write(file, block.str, block.length, MYF(MY_WME | MY_FNABP)); ^ 555. s3_free(&block); 556. if (error == MY_FILE_ERROR) #1682 storage/maria/s3_func.c:627: error: Uninitialized Value `block.length` is read without initialization. 625. goto err; 626. } 627. if (block.length < MARIA_STATE_INFO_SIZE) ^ 628. { 629. fprintf(stderr, "Wrong block length for first block: %lu\n", #1683 storage/maria/s3_func.c:654: error: Dead Store The value written to `&end` is never used. 652. printf("Copying index information %s\n", aws_path); 653. 654. end= strmov(aws_path_end,"/index/000000"); ^ 655. 656. error= copy_to_file(s3_client, aws_bucket, aws_path, file, block.length, #1684 storage/maria/s3_func.c:703: error: Dead Store The value written to `&file` is never used. 701. s3_free(&block); 702. my_close(file, MYF(MY_WME)); 703. file= -1; ^ 704. } 705. #1685 storage/maria/s3_func.c:895: error: Uninitialized Value `frm_length` is read without initialization. 893. } 894. if ((error= s3_put_object(s3_client, aws_bucket, aws_path, alloc_block, 895. frm_length, 0))) ^ 896. goto err; 897. #1686 storage/maria/test_ma_backup.c:97: error: Dead Store The value written to `&org_file` is never used. 95. ARIA_TABLE_CAPABILITIES cap; 96. ulonglong block; 97. File org_file= -1; ^ 98. int error= 1; 99. #1687 storage/maria/unittest/ma_pagecache_single.c:591: error: Null Dereference `i` could be null (from the call to `my_malloc()` on line 582) and is dereferenced. 589. { 590. bfill(buffw, TEST_PAGE_SIZE, (unsigned char) (i & 0xff)); 591. desc[i].length= TEST_PAGE_SIZE; ^ 592. desc[i].content= (i & 0xff); 593. pagecache_write(&pagecache, &file1, i, 3, buffw, #1688 storage/maria/unittest/ma_pagecache_single.c:591: error: Null Dereference `i` could be null (null value originating from line 582) and is dereferenced. 589. { 590. bfill(buffw, TEST_PAGE_SIZE, (unsigned char) (i & 0xff)); 591. desc[i].length= TEST_PAGE_SIZE; ^ 592. desc[i].content= (i & 0xff); 593. pagecache_write(&pagecache, &file1, i, 3, buffw, #1689 storage/mroonga/ha_mroonga.cpp:1276: error: Static Initialization Order Fiasco Initializer of Show::i_s_mrn_stats_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 1274. 1275. namespace Show { 1276. static ST_FIELD_INFO i_s_mrn_stats_fields_info[] = ^ 1277. { 1278. Column("VERSION", Varchar(40), NOT_NULL), #1690 storage/mroonga/ha_mroonga.cpp:3006: error: Dead Store The value written to `&create_info` is never used. 3004. st_mrn_slot_data *slot_data = mrn_get_slot_data(thd, false); 3005. if (slot_data && slot_data->alter_create_info) { 3006. create_info = slot_data->alter_create_info; ^ 3007. if (slot_data->alter_connect_string) { 3008. table_share_for_create.connect_string.str = #1691 storage/mroonga/ha_mroonga.cpp:5335: error: Uninitialized Value `column_id` is read without initialization. 5333. /* grn_id id __attribute__((unused)); */ 5334. grn_id *column_id; 5335. GRN_HASH_EACH(ctx, columns, id, &column_id, NULL, NULL, { ^ 5336. grn_obj *column = grn_ctx_at(ctx, *column_id); 5337. stats.data_file_length += file_size(grn_obj_path(ctx, column)); #1692 storage/mroonga/ha_mroonga.cpp:6329: error: Uninitialized Value `added` is read without initialization. 6327. DBUG_RETURN(ER_ERROR_ON_WRITE); 6328. } 6329. if (!added) { ^ 6330. // duplicated error 6331. error = HA_ERR_FOUND_DUPP_KEY; #1693 storage/mroonga/ha_mroonga.cpp:8757: error: Uninitialized Value `key` is read without initialization. 8755. int key_length; 8756. key_length = grn_table_cursor_get_key(ctx, mrn_ft_info->cursor, &key); 8757. GRN_TEXT_SET(ctx, &key_buffer, key, key_length); ^ 8758. } 8759. error = wrapper_get_record(buf, (const uchar *)GRN_TEXT_VALUE(&key_buffer)); #1694 storage/mroonga/ha_mroonga.cpp:8757: error: Uninitialized Value `key` is read without initialization. 8755. int key_length; 8756. key_length = grn_table_cursor_get_key(ctx, mrn_ft_info->cursor, &key); 8757. GRN_TEXT_SET(ctx, &key_buffer, key, key_length); ^ 8758. } 8759. error = wrapper_get_record(buf, (const uchar *)GRN_TEXT_VALUE(&key_buffer)); #1695 storage/mroonga/ha_mroonga.cpp:9149: error: Memory Leak Memory dynamically allocated by `malloc` on line 9138 is not freed after the last access at line 9149, column 5. 9147. while (tmp_wrap_hton->next) 9148. tmp_wrap_hton = tmp_wrap_hton->next; 9149. tmp_wrap_hton->next = wrap_hton; ^ 9150. } else { 9151. slot_data->first_wrap_hton = wrap_hton; #1696 storage/mroonga/ha_mroonga.cpp:9151: error: Memory Leak Memory dynamically allocated by `malloc` on line 9138 is not freed after the last access at line 9151, column 5. 9149. tmp_wrap_hton->next = wrap_hton; 9150. } else { 9151. slot_data->first_wrap_hton = wrap_hton; ^ 9152. } 9153. DBUG_RETURN(0); #1697 storage/mroonga/ha_mroonga.cpp:9313: error: Uninitialized Value `key` is read without initialization. 9311. void *key; 9312. grn_table_cursor_get_key(ctx, cursor, &key); 9313. grn_id *id = reinterpret_cast(key); ^ 9314. mrn::SmartGrnObj column(ctx, grn_ctx_at(ctx, *id)); 9315. if (!column.get()) { #1698 storage/mroonga/ha_mroonga.cpp:10502: error: Uninitialized Value `micro_seconds` is read without initialization. 10500. my_time_t seconds = field->get_timestamp(µ_seconds); 10501. DBUG_PRINT("info", ("mroonga: my_time_t seconds=%ld", seconds)); 10502. grn_time = GRN_TIME_PACK(seconds, micro_seconds); ^ 10503. #else 10504. my_bool is_null_value; #1699 storage/mroonga/ha_mroonga.cpp:10553: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 10551. Field_time *time_field = (Field_time *)field; 10552. MYSQL_TIME mysql_time; 10553. time_field->get_date(&mysql_time, Time::Options(current_thd)); ^ 10554. mrn::TimeConverter time_converter; 10555. long long int time = time_converter.mysql_time_to_grn_time(&mysql_time, #1700 storage/mroonga/ha_mroonga.cpp:10573: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 10571. Field_datetime *datetime_field = (Field_datetime *)field; 10572. MYSQL_TIME mysql_time; 10573. datetime_field->get_date(&mysql_time, Time::Options(current_thd)); ^ 10574. mrn::TimeConverter time_converter; 10575. long long int time = time_converter.mysql_time_to_grn_time(&mysql_time, #1701 storage/mroonga/ha_mroonga.cpp:10659: error: Uninitialized Value `this.time_type` is read without initialization during the call to `Field::get_date()`. 10657. bool truncated = false; 10658. MYSQL_TIME mysql_time; 10659. field->get_date(&mysql_time, Time::Options(current_thd)); ^ 10660. mrn::TimeConverter time_converter; 10661. long long int time = time_converter.mysql_time_to_grn_time(&mysql_time, #1702 storage/mroonga/ha_mroonga.cpp:14955: error: Dead Store The value written to `&i` is never used. 14953. my_printf_error(ER_DUP_UNIQUE, ER(ER_DUP_UNIQUE), MYF(0), 14954. table_share->table_name); 14955. ++i; ^ 14956. break; 14957. } #1703 storage/mroonga/ha_mroonga.cpp:15018: error: Dead Store The value written to `&mapper` is never used. 15016. uint i, j = 0; 15017. KEY *key_info = table_share->key_info; 15018. mrn::PathMapper mapper(share->table_name); ^ 15019. n_keys = ha_alter_info->index_drop_count; 15020. for (i = 0; i < n_keys; ++i) { #1704 storage/mroonga/ha_mroonga.cpp:15112: error: Dead Store The value written to `&error` is never used. 15110. col_type = find_column_type(field, tmp_share, i, column_type_error_code); 15111. if (!col_type) { 15112. error = column_type_error_code; ^ 15113. have_error = true; 15114. break; #1705 storage/mroonga/ha_mroonga.cpp:15220: error: Dead Store The value written to `&error` is never used. 15218. int end_error = storage_rnd_end(); 15219. if (end_error != 0 && error == 0) { 15220. error = end_error; ^ 15221. grn_obj_remove(ctx, column_obj); 15222. break; #1706 storage/mroonga/ha_mroonga.cpp:17066: error: Dead Store The value written to `&flags` is never used. 17064. namespace variables { 17065. ulonglong get_boolean_mode_syntax_flags(THD *thd) { 17066. ulonglong flags = BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT; ^ 17067. #ifdef MRN_SUPPORT_THDVAR_SET 17068. flags = THDVAR(thd, boolean_mode_syntax_flags); #1707 storage/mroonga/lib/mrn_database_manager.cpp:130: error: Uninitialized Value `db_address` is read without initialization. 128. mapper.db_name(), strlen(mapper.db_name()), 129. &db_address, NULL); 130. memcpy(db_address, db, sizeof(Database *)); ^ 131. error = ensure_normalizers_registered((*db)->get()); 132. if (!error) { #1708 storage/mroonga/lib/mrn_multiple_column_key_codec.cpp:604: error: Uninitialized Value `int_value` is read without initialization. 602. int max_bit = (grn_key_size * 8 - 1); 603. *((int *)mysql_key) = 604. int_value ^ (((int_value ^ (1 << max_bit)) >> max_bit) | ^ 605. (1 << max_bit)); 606. DBUG_VOID_RETURN; #1709 storage/mroonga/lib/mrn_multiple_column_key_codec.cpp:629: error: Uninitialized Value `long_long_value` is read without initialization. 627. int max_bit = (grn_key_size * 8 - 1); 628. long_long_value = 629. long_long_value ^ (((long_long_value ^ (1LL << max_bit)) >> max_bit) | ^ 630. (1LL << max_bit)); 631. memcpy(mysql_key, &long_long_value, sizeof(long_long_value)); #1710 storage/mroonga/udf/mrn_udf_highlight_html.cpp:387: error: Uninitialized Value `rest` is read without initialization. 385. } 386. 387. chunk_length = rest - target; ^ 388. if ((chunk_length - previous) > 0) { 389. grn_text_escape_xml(ctx, #1711 storage/mroonga/udf/mrn_udf_snippet.cpp:297: error: Uninitialized Value `max_tagged_length` is read without initialization. 295. result_str->length(0); 296. if (result_str->reserve((args->lengths[6] + args->lengths[7] + 297. max_tagged_length) * n_results)) { ^ 298. my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); 299. goto error; #1712 storage/mroonga/udf/mrn_udf_snippet_html.cpp:373: error: Uninitialized Value `max_tagged_length` is read without initialization. 371. size_t end_tag_length = strlen(end_tag); 372. unsigned int max_length_per_snippet = 373. start_tag_length + end_tag_length + max_tagged_length; ^ 374. if (result_str->reserve(max_length_per_snippet * n_results)) { 375. my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); #1713 storage/mroonga/vendor/groonga/lib/cache.c:680: error: Dead Store The value written to `&rc` is never used. 678. grn_cache_statistics *statistics) 679. { 680. grn_rc rc = GRN_INVALID_ARGUMENT; ^ 681. grn_hash *keys = cache->impl.persistent.keys; 682. grn_cache_entry_persistent *metadata_entry; #1714 storage/mroonga/vendor/groonga/lib/com.c:522: error: Uninitialized Value `ncs` is read without initialization. 520. return; 521. } 522. ncs->has_sid = 0; ^ 523. ncs->closed = 0; 524. ncs->opaque = NULL; #1715 storage/mroonga/vendor/groonga/lib/com.c:540: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `grn_msg_open()` on line 529 is not freed after the last access at line 540, column 5. 538. } 539. msg->acceptor = ev->acceptor; 540. ev->msg_handler(ctx, (grn_obj *)msg); ^ 541. } 542. } #1716 storage/mroonga/vendor/groonga/lib/com.c:1168: error: Uninitialized Value `edge` is read without initialization. 1166. grn_io_unlock(grn_edges->io); 1167. if (id) { edge->id = id; } 1168. return edge; ^ 1169. } 1170. } #1717 storage/mroonga/vendor/groonga/lib/com.c:1186: error: Uninitialized Value `added` is read without initialization. 1184. int added; 1185. grn_edge *edge = grn_edges_add(ctx, addr, &added); 1186. if (added) { ^ 1187. grn_ctx_init(&edge->ctx, 0); 1188. GRN_COM_QUEUE_INIT(&edge->recv_new); #1718 storage/mroonga/vendor/groonga/lib/config.c:80: error: Uninitialized Value `packed_value` is read without initialization. 78. } 79. 80. *((uint32_t *)packed_value) = (uint32_t)value_size; ^ 81. grn_memcpy((char *)packed_value + sizeof(uint32_t), 82. value, value_size); #1719 storage/mroonga/vendor/groonga/lib/config.c:249: error: Uninitialized Value `key_raw` is read without initialization. 247. 248. key_size = grn_hash_cursor_get_key(ctx, config_cursor->hash_cursor, &key_raw); 249. *key = key_raw; ^ 250. 251. GRN_API_RETURN(key_size); #1720 storage/mroonga/vendor/groonga/lib/config.c:264: error: Dead Store The value written to `&value_size_raw` is never used. 262. GRN_API_ENTER; 263. 264. value_size_raw = grn_hash_cursor_get_value(ctx, ^ 265. config_cursor->hash_cursor, 266. &value_raw); #1721 storage/mroonga/vendor/groonga/lib/config.c:267: error: Uninitialized Value `value_raw` is read without initialization. 265. config_cursor->hash_cursor, 266. &value_raw); 267. *value = (char *)value_raw + sizeof(uint32_t); ^ 268. value_size = *((uint32_t *)value_raw); 269. #1722 storage/mroonga/vendor/groonga/lib/ctx.c:453: error: Uninitialized Value `o` is read without initialization. 451. #ifndef USE_MEMORY_DEBUG 452. grn_db_obj *o; 453. GRN_ARRAY_EACH(ctx, ctx->impl->values, 0, 0, id, &o, { ^ 454. grn_obj_close(ctx, *((grn_obj **)o)); 455. }); #1723 storage/mroonga/vendor/groonga/lib/ctx.c:480: error: Dead Store The value written to `&rc` is never used. 478. } 479. grn_ctx_send(ctx, "ACK", 3, GRN_CTX_HEAD); 480. rc = grn_com_close(ctx, ctx->impl->com); ^ 481. } 482. GRN_OBJ_FIN(ctx, &ctx->impl->query_log_buf); #1724 storage/mroonga/vendor/groonga/lib/db.c:465: error: Uninitialized Value `o` is read without initialization. 463. if (ctx->impl->values) { 464. grn_db_obj *o; 465. GRN_ARRAY_EACH(ctx, ctx->impl->values, 0, 0, id, &o, { ^ 466. grn_obj_close(ctx, *((grn_obj **)o)); 467. }); #1725 storage/mroonga/vendor/groonga/lib/db.c:542: error: Uninitialized Value `alias_column_name` is read without initialization. 540. "alias.column", -1, 541. &alias_column_name, &alias_column_name_size); 542. if (!alias_column_name) { ^ 543. break; 544. } #1726 storage/mroonga/vendor/groonga/lib/db.c:548: error: Uninitialized Value `alias_column_name_size` is read without initialization. 546. s->keys, 547. alias_column_name, 548. alias_column_name_size); ^ 549. if (!alias_column_id) { 550. break; #1727 storage/mroonga/vendor/groonga/lib/db.c:787: error: Uninitialized Value `_.tv_sec` is read without initialization. 785. case GRN_COLUMN_INDEX : 786. if (!IS_TEMP(obj)) { 787. grn_obj_get_io(ctx, obj)->header->last_modified = tv->tv_sec; ^ 788. grn_obj_touch(ctx, DB_OBJ(obj)->db, tv); 789. } #1728 storage/mroonga/vendor/groonga/lib/db.c:2280: error: Uninitialized Value `tokenizer` is read without initialization. 2278. } 2279. if (table->header.type != GRN_TABLE_NO_KEY) { 2280. grn_obj_set_info(ctx, table, GRN_INFO_DEFAULT_TOKENIZER, tokenizer); ^ 2281. grn_obj_set_info(ctx, table, GRN_INFO_NORMALIZER, normalizer); 2282. grn_obj_set_info(ctx, table, GRN_INFO_TOKEN_FILTERS, &token_filters); #1729 storage/mroonga/vendor/groonga/lib/db.c:2281: error: Uninitialized Value `normalizer` is read without initialization. 2279. if (table->header.type != GRN_TABLE_NO_KEY) { 2280. grn_obj_set_info(ctx, table, GRN_INFO_DEFAULT_TOKENIZER, tokenizer); 2281. grn_obj_set_info(ctx, table, GRN_INFO_NORMALIZER, normalizer); ^ 2282. grn_obj_set_info(ctx, table, GRN_INFO_TOKEN_FILTERS, &token_filters); 2283. GRN_OBJ_FIN(ctx, &token_filters); #1730 storage/mroonga/vendor/groonga/lib/db.c:3310: error: Uninitialized Value `_.index` is read without initialization. 3308. { 3309. grn_obj *lexicon; 3310. lexicon = grn_ctx_at(ctx, index_datum.index->header.domain); ^ 3311. if (grn_obj_id(ctx, lexicon) != current_res->header.domain) { 3312. char index_name[GRN_TABLE_MAX_KEY_SIZE]; #1731 storage/mroonga/vendor/groonga/lib/db.c:5711: error: Dead Store The value written to `&done` is never used. 5709. if (GRN_TABLE_IS_MULTI_KEYS_GROUPED(obj)) { 5710. (*rp)->action = GRN_ACCESSOR_GET_KEY; 5711. done++; ^ 5712. break; 5713. } #1732 storage/mroonga/vendor/groonga/lib/db.c:6359: error: Uninitialized Value `key_size` is read without initialization. 6357. key = _grn_table_key(ctx, src_table, GRN_RECORD_VALUE(src), &key_size); 6358. if (add_record_if_not_exist) { 6359. dest_id = grn_table_add(ctx, dest_table, key, key_size, NULL); ^ 6360. } else { 6361. dest_id = grn_table_get(ctx, dest_table, key, key_size); #1733 storage/mroonga/vendor/groonga/lib/db.c:6361: error: Uninitialized Value `key_size` is read without initialization. 6359. dest_id = grn_table_add(ctx, dest_table, key, key_size, NULL); 6360. } else { 6361. dest_id = grn_table_get(ctx, dest_table, key, key_size); ^ 6362. } 6363. GRN_RECORD_SET(ctx, dest, dest_id); #1734 storage/mroonga/vendor/groonga/lib/db.c:7565: error: Dead Store The value written to `&rc` is never used. 7563. grn_obj *value, int flags) 7564. { 7565. grn_rc rc = GRN_INVALID_ARGUMENT; ^ 7566. grn_id range = DB_OBJ(obj)->range; 7567. void *v = GRN_BULK_HEAD(value); #1735 storage/mroonga/vendor/groonga/lib/db.c:8647: error: Uninitialized Value `tokenizer` is read without initialization. 8645. grn_obj *tokenizer; 8646. grn_table_get_info(ctx, lexicon, NULL, NULL, &tokenizer, NULL, NULL); 8647. lexicon_have_tokenizer = (tokenizer != NULL); ^ 8648. } 8649. #1736 storage/mroonga/vendor/groonga/lib/db.c:10345: error: Uninitialized Value `name_size` is read without initialization. 10343. uint32_t name_size; 10344. name = _grn_table_key(ctx, db, id, &name_size); 10345. GRN_LOG((ctx), GRN_LOG_ERROR, ^ 10346. "%s: failed to decode spec: <%u>(<%.*s>):<%u>: %s", 10347. error_message_tag, #1737 storage/mroonga/vendor/groonga/lib/db.c:12555: error: Uninitialized Value `tokenizer` is read without initialization. 12553. 12554. grn_table_get_info(ctx, lexicon, NULL, NULL, &tokenizer, NULL, NULL); 12555. return tokenizer; ^ 12556. } 12557. #1738 storage/mroonga/vendor/groonga/lib/db.c:13411: error: Uninitialized Value `key` is read without initialization. 13409. grn_id *key; 13410. grn_table_columns(ctx, table, p, r - p - 1, (grn_obj *)cols); 13411. GRN_HASH_EACH(ctx, cols, id, &key, NULL, NULL, { ^ 13412. if ((col = grn_ctx_at(ctx, *key))) { GRN_PTR_PUT(ctx, res, col); } 13413. }); #1739 storage/mroonga/vendor/groonga/lib/db.c:13438: error: Uninitialized Value `key` is read without initialization. 13436. grn_table_columns(ctx, target_table, 13437. p, r - p - 1, (grn_obj *)cols); 13438. GRN_HASH_EACH(ctx, cols, id, &key, NULL, NULL, { ^ 13439. if ((col = grn_ctx_at(ctx, *key))) { 13440. grn_accessor *a; #1740 storage/mroonga/vendor/groonga/lib/db.c:13785: error: Uninitialized Value `key` is read without initialization. 13783. 13784. name_size = grn_table_cursor_get_key(ctx, cursor, &key); 13785. name = key; ^ 13786. 13787. #define NAME_EQUAL(value) \ #1741 storage/mroonga/vendor/groonga/lib/error.c:205: error: Dead Store The value written to `&message` is never used. 203. grn_rc_to_string(grn_rc rc) 204. { 205. const char *message = "invalid grn_rc"; ^ 206. 207. switch (rc) { #1742 storage/mroonga/vendor/groonga/lib/expr.c:444: error: Dead Store The value written to `&offset` is never used. 442. { 443. uint32_t offset; 444. GRN_B_DEC(offset, p); ^ 445. code->value = &e->vars[i].value; 446. } #1743 storage/mroonga/vendor/groonga/lib/expr.c:921: error: Dead Store The value written to `&dfi` is never used. 919. } else { 920. PUSH_CODE(e, op, obj, nargs, code); 921. dfi = grn_expr_dfi_pop(e); ^ 922. } 923. break; #1744 storage/mroonga/vendor/groonga/lib/expr.c:991: error: Dead Store The value written to `&dfi` is never used. 989. { 990. int i = nargs - 1; 991. while (i--) { dfi = grn_expr_dfi_pop(e); } ^ 992. } 993. if (!obj) { dfi = grn_expr_dfi_pop(e); } #1745 storage/mroonga/vendor/groonga/lib/expr.c:993: error: Dead Store The value written to `&dfi` is never used. 991. while (i--) { dfi = grn_expr_dfi_pop(e); } 992. } 993. if (!obj) { dfi = grn_expr_dfi_pop(e); } ^ 994. // todo : increment e->values_tail. 995. /* cannot identify type of return value */ #1746 storage/mroonga/vendor/groonga/lib/expr.c:1086: error: Dead Store The value written to `&dfi` is never used. 1084. if (nargs) { 1085. int i = nargs - 1; 1086. if (!obj) { dfi = grn_expr_dfi_pop(e); } ^ 1087. while (i--) { dfi = grn_expr_dfi_pop(e); } 1088. } #1747 storage/mroonga/vendor/groonga/lib/expr.c:1087: error: Dead Store The value written to `&dfi` is never used. 1085. int i = nargs - 1; 1086. if (!obj) { dfi = grn_expr_dfi_pop(e); } 1087. while (i--) { dfi = grn_expr_dfi_pop(e); } ^ 1088. } 1089. grn_expr_dfi_put(ctx, e, type, domain, code); #1748 storage/mroonga/vendor/groonga/lib/expr.c:1121: error: Dead Store The value written to `&dfi` is never used. 1119. case GRN_OP_PLUS : 1120. if (nargs > 1) { 1121. PUSH_N_ARGS_ARITHMETIC_OP(e, op, obj, nargs, code); ^ 1122. } 1123. break; #1749 storage/mroonga/vendor/groonga/lib/expr.c:1128: error: Dead Store The value written to `&dfi` is never used. 1126. APPEND_UNARY_MINUS_OP(e); 1127. } else { 1128. PUSH_N_ARGS_ARITHMETIC_OP(e, op, obj, nargs, code); ^ 1129. } 1130. break; #1750 storage/mroonga/vendor/groonga/lib/expr.c:1161: error: Dead Store The value written to `&dfi` is never used. 1159. case GRN_OP_BITWISE_XOR : 1160. case GRN_OP_BITWISE_AND : 1161. PUSH_N_ARGS_ARITHMETIC_OP(e, op, obj, nargs, code); ^ 1162. break; 1163. case GRN_OP_INCR : #1751 storage/mroonga/vendor/groonga/lib/expr.c:1282: error: Dead Store The value written to `&dfi` is never used. 1280. break; 1281. case GRN_OP_JUMP : 1282. dfi = grn_expr_dfi_pop(e); ^ 1283. PUSH_CODE(e, op, obj, nargs, code); 1284. break; #1752 storage/mroonga/vendor/groonga/lib/expr.c:1286: error: Dead Store The value written to `&dfi` is never used. 1284. break; 1285. case GRN_OP_CJUMP : 1286. dfi = grn_expr_dfi_pop(e); ^ 1287. PUSH_CODE(e, op, obj, nargs, code); 1288. break; #1753 storage/mroonga/vendor/groonga/lib/expr.c:1293: error: Dead Store The value written to `&dfi` is never used. 1291. break; 1292. case GRN_OP_GET_MEMBER : 1293. dfi = grn_expr_dfi_pop(e); ^ 1294. dfi = grn_expr_dfi_pop(e); 1295. if (dfi) { #1754 storage/mroonga/vendor/groonga/lib/expr.c:2662: error: Dead Store The value written to `&obj` is never used. 2660. { 2661. grn_obj *obj; 2662. POP1(obj); ^ 2663. code++; 2664. } #1755 storage/mroonga/vendor/groonga/lib/expr.c:2842: error: Dead Store The value written to `&res` is never used. 2840. break; 2841. case GRN_OP_STAR_ASSIGN : 2842. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2843. INTEGER_ARITHMETIC_OPERATION_STAR, 2844. INTEGER_ARITHMETIC_OPERATION_STAR, #1756 storage/mroonga/vendor/groonga/lib/expr.c:2842: error: Dead Store The value written to `&res` is never used. 2840. break; 2841. case GRN_OP_STAR_ASSIGN : 2842. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2843. INTEGER_ARITHMETIC_OPERATION_STAR, 2844. INTEGER_ARITHMETIC_OPERATION_STAR, #1757 storage/mroonga/vendor/groonga/lib/expr.c:2856: error: Dead Store The value written to `&res` is never used. 2854. break; 2855. case GRN_OP_SLASH_ASSIGN : 2856. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2857. INTEGER_ARITHMETIC_OPERATION_SLASH, 2858. INTEGER_ARITHMETIC_OPERATION_SLASH, #1758 storage/mroonga/vendor/groonga/lib/expr.c:2856: error: Dead Store The value written to `&res` is never used. 2854. break; 2855. case GRN_OP_SLASH_ASSIGN : 2856. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2857. INTEGER_ARITHMETIC_OPERATION_SLASH, 2858. INTEGER_ARITHMETIC_OPERATION_SLASH, #1759 storage/mroonga/vendor/groonga/lib/expr.c:2870: error: Dead Store The value written to `&res` is never used. 2868. break; 2869. case GRN_OP_MOD_ASSIGN : 2870. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2871. INTEGER_ARITHMETIC_OPERATION_MOD, 2872. INTEGER_ARITHMETIC_OPERATION_MOD, #1760 storage/mroonga/vendor/groonga/lib/expr.c:2870: error: Dead Store The value written to `&res` is never used. 2868. break; 2869. case GRN_OP_MOD_ASSIGN : 2870. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2871. INTEGER_ARITHMETIC_OPERATION_MOD, 2872. INTEGER_ARITHMETIC_OPERATION_MOD, #1761 storage/mroonga/vendor/groonga/lib/expr.c:2884: error: Dead Store The value written to `&res` is never used. 2882. break; 2883. case GRN_OP_PLUS_ASSIGN : 2884. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2885. INTEGER_ARITHMETIC_OPERATION_PLUS, 2886. INTEGER_ARITHMETIC_OPERATION_PLUS, #1762 storage/mroonga/vendor/groonga/lib/expr.c:2884: error: Dead Store The value written to `&res` is never used. 2882. break; 2883. case GRN_OP_PLUS_ASSIGN : 2884. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2885. INTEGER_ARITHMETIC_OPERATION_PLUS, 2886. INTEGER_ARITHMETIC_OPERATION_PLUS, #1763 storage/mroonga/vendor/groonga/lib/expr.c:2898: error: Dead Store The value written to `&res` is never used. 2896. break; 2897. case GRN_OP_MINUS_ASSIGN : 2898. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2899. INTEGER_ARITHMETIC_OPERATION_MINUS, 2900. INTEGER_ARITHMETIC_OPERATION_MINUS, #1764 storage/mroonga/vendor/groonga/lib/expr.c:2898: error: Dead Store The value written to `&res` is never used. 2896. break; 2897. case GRN_OP_MINUS_ASSIGN : 2898. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2899. INTEGER_ARITHMETIC_OPERATION_MINUS, 2900. INTEGER_ARITHMETIC_OPERATION_MINUS, #1765 storage/mroonga/vendor/groonga/lib/expr.c:2912: error: Dead Store The value written to `&res` is never used. 2910. break; 2911. case GRN_OP_SHIFTL_ASSIGN : 2912. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2913. INTEGER_ARITHMETIC_OPERATION_SHIFTL, 2914. INTEGER_ARITHMETIC_OPERATION_SHIFTL, #1766 storage/mroonga/vendor/groonga/lib/expr.c:2912: error: Dead Store The value written to `&res` is never used. 2910. break; 2911. case GRN_OP_SHIFTL_ASSIGN : 2912. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2913. INTEGER_ARITHMETIC_OPERATION_SHIFTL, 2914. INTEGER_ARITHMETIC_OPERATION_SHIFTL, #1767 storage/mroonga/vendor/groonga/lib/expr.c:2926: error: Dead Store The value written to `&res` is never used. 2924. break; 2925. case GRN_OP_SHIFTR_ASSIGN : 2926. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2927. INTEGER_ARITHMETIC_OPERATION_SHIFTR, 2928. INTEGER_ARITHMETIC_OPERATION_SHIFTR, #1768 storage/mroonga/vendor/groonga/lib/expr.c:2926: error: Dead Store The value written to `&res` is never used. 2924. break; 2925. case GRN_OP_SHIFTR_ASSIGN : 2926. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2927. INTEGER_ARITHMETIC_OPERATION_SHIFTR, 2928. INTEGER_ARITHMETIC_OPERATION_SHIFTR, #1769 storage/mroonga/vendor/groonga/lib/expr.c:2940: error: Dead Store The value written to `&res` is never used. 2938. break; 2939. case GRN_OP_SHIFTRR_ASSIGN : 2940. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2941. INTEGER8_ARITHMETIC_OPERATION_SHIFTRR, 2942. INTEGER16_ARITHMETIC_OPERATION_SHIFTRR, #1770 storage/mroonga/vendor/groonga/lib/expr.c:2940: error: Dead Store The value written to `&res` is never used. 2938. break; 2939. case GRN_OP_SHIFTRR_ASSIGN : 2940. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2941. INTEGER8_ARITHMETIC_OPERATION_SHIFTRR, 2942. INTEGER16_ARITHMETIC_OPERATION_SHIFTRR, #1771 storage/mroonga/vendor/groonga/lib/expr.c:2955: error: Dead Store The value written to `&res` is never used. 2953. break; 2954. case GRN_OP_AND_ASSIGN : 2955. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2956. INTEGER_ARITHMETIC_OPERATION_BITWISE_AND, 2957. INTEGER_ARITHMETIC_OPERATION_BITWISE_AND, #1772 storage/mroonga/vendor/groonga/lib/expr.c:2955: error: Dead Store The value written to `&res` is never used. 2953. break; 2954. case GRN_OP_AND_ASSIGN : 2955. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2956. INTEGER_ARITHMETIC_OPERATION_BITWISE_AND, 2957. INTEGER_ARITHMETIC_OPERATION_BITWISE_AND, #1773 storage/mroonga/vendor/groonga/lib/expr.c:2969: error: Dead Store The value written to `&res` is never used. 2967. break; 2968. case GRN_OP_OR_ASSIGN : 2969. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2970. INTEGER_ARITHMETIC_OPERATION_BITWISE_OR, 2971. INTEGER_ARITHMETIC_OPERATION_BITWISE_OR, #1774 storage/mroonga/vendor/groonga/lib/expr.c:2969: error: Dead Store The value written to `&res` is never used. 2967. break; 2968. case GRN_OP_OR_ASSIGN : 2969. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2970. INTEGER_ARITHMETIC_OPERATION_BITWISE_OR, 2971. INTEGER_ARITHMETIC_OPERATION_BITWISE_OR, #1775 storage/mroonga/vendor/groonga/lib/expr.c:2983: error: Dead Store The value written to `&res` is never used. 2981. break; 2982. case GRN_OP_XOR_ASSIGN : 2983. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2984. INTEGER_ARITHMETIC_OPERATION_BITWISE_XOR, 2985. INTEGER_ARITHMETIC_OPERATION_BITWISE_XOR, #1776 storage/mroonga/vendor/groonga/lib/expr.c:2983: error: Dead Store The value written to `&res` is never used. 2981. break; 2982. case GRN_OP_XOR_ASSIGN : 2983. ARITHMETIC_OPERATION_AND_ASSIGN_DISPATCH( ^ 2984. INTEGER_ARITHMETIC_OPERATION_BITWISE_XOR, 2985. INTEGER_ARITHMETIC_OPERATION_BITWISE_XOR, #1777 storage/mroonga/vendor/groonga/lib/expr.c:3072: error: Dead Store The value written to `&s1` is never used. 3070. POP1(table); 3071. table = GRN_OBJ_RESOLVE(ctx, table); 3072. WITH_SPSAVE({ ^ 3073. grn_table_select(ctx, table, expr, res, (grn_operator)GRN_UINT32_VALUE(op)); 3074. }); #1778 storage/mroonga/vendor/groonga/lib/expr.c:3269: error: Dead Store The value written to `&s1` is never used. 3267. POP1(y); 3268. POP1(x); 3269. WITH_SPSAVE({ ^ 3270. matched = grn_operator_exec_match(ctx, x, y); 3271. }); #1779 storage/mroonga/vendor/groonga/lib/expr.c:3306: error: Dead Store The value written to `&s1` is never used. 3304. POP1(y); 3305. POP1(x); 3306. WITH_SPSAVE({ ^ 3307. matched = grn_operator_exec_prefix(ctx, x, y); 3308. }); #1780 storage/mroonga/vendor/groonga/lib/expr.c:3539: error: Dead Store The value written to `&ln1` is never used. 3537. la0 = GRN_INT32_VALUE(value); 3538. POP1(value); 3539. ln1 = GRN_INT32_VALUE(value); ^ 3540. POP1(value); 3541. la1 = GRN_INT32_VALUE(value); #1781 storage/mroonga/vendor/groonga/lib/expr.c:3541: error: Dead Store The value written to `&la1` is never used. 3539. ln1 = GRN_INT32_VALUE(value); 3540. POP1(value); 3541. la1 = GRN_INT32_VALUE(value); ^ 3542. POP1(value); 3543. ln2 = GRN_INT32_VALUE(value); #1782 storage/mroonga/vendor/groonga/lib/expr.c:3807: error: Dead Store The value written to `&s1` is never used. 3805. POP1(pattern); 3806. POP1(target); 3807. WITH_SPSAVE({ ^ 3808. matched = grn_operator_exec_regexp(ctx, target, pattern); 3809. }); #1783 storage/mroonga/vendor/groonga/lib/expr.c:6027: error: Dead Store The value written to `&weight` is never used. 6025. 6026. sid = GRN_UINT32_VALUE_AT(&(si->wv), 0); 6027. weight = GRN_INT32_VALUE_AT(&(si->wv), 1); ^ 6028. ii_cursor = grn_ii_cursor_open(ctx, ii, tid, 6029. GRN_ID_NIL, GRN_ID_MAX, #1784 storage/mroonga/vendor/groonga/lib/expr.c:6101: error: Uninitialized Value `key` is read without initialization. 6099. GRN_BULK_HEAD(&dest), GRN_BULK_VSIZE(&dest), 6100. si->op, (grn_obj *)pres, GRN_OP_OR); 6101. GRN_HASH_EACH(ctx, pres, id, &key, NULL, NULL, { ^ 6102. posting.rid = *key; 6103. grn_ii_posting_add(ctx, &posting, (grn_hash *)res, #1785 storage/mroonga/vendor/groonga/lib/expr.c:6212: error: Uninitialized Value `_.match_info.flags` is read without initialization. 6210. optarg.proc = NULL; 6211. optarg.max_size = 0; 6212. optarg.match_info.flags |= GRN_MATCH_INFO_GET_MIN_RECORD_ID; ^ 6213. ctx->flags |= GRN_CTX_TEMPORARY_DISABLE_II_RESOLVE_SEL_AND; 6214. for (j = 0; j < n_indexes; j++, ip++, wp += 2) { #1786 storage/mroonga/vendor/groonga/lib/expr.c:7045: error: Dead Store The value written to `&start` is never used. 7043. *mode = GRN_OP_EXACT; 7044. *option = 0; 7045. start = ++end; ^ 7046. q->cur = end; 7047. break; #1787 storage/mroonga/vendor/groonga/lib/expr.c:8493: error: Dead Store The value written to `&rc` is never used. 8491. 8492. caller = grn_expr_create(ctx, NULL, 0); 8493. rc = grn_proc_call(ctx, expander, nargs, caller); ^ 8494. GRN_OBJ_FIN(ctx, &grn_term); 8495. rc_object = grn_ctx_pop(ctx); #1788 storage/mroonga/vendor/groonga/lib/geo.c:946: error: Dead Store The value written to `¢er_longitude` is never used. 944. } 945. center = GRN_GEO_POINT_VALUE_RAW(center_point); 946. center_longitude = GRN_GEO_INT2RAD(center->longitude); ^ 947. center_latitude = GRN_GEO_INT2RAD(center->latitude); 948. #1789 storage/mroonga/vendor/groonga/lib/geo.c:947: error: Dead Store The value written to `¢er_latitude` is never used. 945. center = GRN_GEO_POINT_VALUE_RAW(center_point); 946. center_longitude = GRN_GEO_INT2RAD(center->longitude); 947. center_latitude = GRN_GEO_INT2RAD(center->latitude); ^ 948. 949. distance_raw_func = grn_geo_resolve_distance_raw_func(ctx, #1790 storage/mroonga/vendor/groonga/lib/hash.c:2839: error: Dead Store The value written to `&m` is never used. 2837. grn_id e, *ep; 2838. /* lock */ 2839. m = *hash->max_offset; ^ 2840. for (i = h; ; i += s) { 2841. if (!(ep = grn_hash_idx_at(ctx, hash, i))) { return GRN_NO_MEMORY_AVAILABLE; } #1791 storage/mroonga/vendor/groonga/lib/hash.c:2861: error: Null Dereference null (null value originating from line 2861) is dereferenced. 2859. _grn_hash_strkey_by_val(void *v, uint16_t *size) 2860. { 2861. entry_astr *n = (entry_astr *)((uintptr_t)v - ^ 2862. (uintptr_t)&((entry_astr *)0)->dummy); 2863. *size = n->size; #1792 storage/mroonga/vendor/groonga/lib/hash.c:3348: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `grn_malloc_default()` on line 3342 is not freed after the last access at line 3348, column 9. 3346. if (limit < 0) { 3347. limit += *hash->n_entries + 1; 3348. if (limit < 0) { ^ 3349. GRN_LOG(ctx, GRN_LOG_ALERT, "limit is too small in grn_hash_sort !"); 3350. return 0; #1793 storage/mroonga/vendor/groonga/lib/ii.c:492: error: Dead Store The value written to `&aligned_size` is never used. 490. m = GRN_II_W_LEAST_CHUNK; 491. } 492. aligned_size = 1 << (m - GRN_II_W_LEAST_CHUNK); ^ 493. if (ii->header->ngarbages[m - GRN_II_W_LEAST_CHUNK] > N_GARBAGES_TH) { 494. grn_ii_ginfo *ginfo; #1794 storage/mroonga/vendor/groonga/lib/ii.c:531: error: Uninitialized Value `_.pos` is read without initialization. 529. } 530. if (iw_.addr) { grn_io_win_unmap(&iw_); } 531. iw_ = iw; ^ 532. gseg = &ginfo->next; 533. } #1795 storage/mroonga/vendor/groonga/lib/ii.c:531: error: Uninitialized Value `_.pseg` is read without initialization. 529. } 530. if (iw_.addr) { grn_io_win_unmap(&iw_); } 531. iw_ = iw; ^ 532. gseg = &ginfo->next; 533. } #1796 storage/mroonga/vendor/groonga/lib/ii.c:531: error: Uninitialized Value `_.uncompressed_value` is read without initialization. 529. } 530. if (iw_.addr) { grn_io_win_unmap(&iw_); } 531. iw_ = iw; ^ 532. gseg = &ginfo->next; 533. } #1797 storage/mroonga/vendor/groonga/lib/ii.c:603: error: Uninitialized Value `_.pos` is read without initialization. 601. if (ginfo->nrecs < N_GARBAGES) { break; } 602. if (iw_.addr) { grn_io_win_unmap(&iw_); } 603. iw_ = iw; ^ 604. gseg = &ginfo->next; 605. } #1798 storage/mroonga/vendor/groonga/lib/ii.c:603: error: Uninitialized Value `_.pseg` is read without initialization. 601. if (ginfo->nrecs < N_GARBAGES) { break; } 602. if (iw_.addr) { grn_io_win_unmap(&iw_); } 603. iw_ = iw; ^ 604. gseg = &ginfo->next; 605. } #1799 storage/mroonga/vendor/groonga/lib/ii.c:603: error: Uninitialized Value `_.uncompressed_value` is read without initialization. 601. if (ginfo->nrecs < N_GARBAGES) { break; } 602. if (iw_.addr) { grn_io_win_unmap(&iw_); } 603. iw_ = iw; ^ 604. gseg = &ginfo->next; 605. } #1800 storage/mroonga/vendor/groonga/lib/ii.c:657: error: Dead Store The value written to `&p` is never used. 655. v += *p++ << 2; 656. v += *p++ << 1; 657. *rp++ = v + *p++; ^ 658. return rp; 659. } #1801 storage/mroonga/vendor/groonga/lib/ii.c:670: error: Dead Store The value written to `&p` is never used. 668. *p++ = ((*dp >> 2) & 0x1); 669. *p++ = ((*dp >> 1) & 0x1); 670. *p++ = (*dp++ & 0x1); ^ 671. return dp; 672. } #1802 storage/mroonga/vendor/groonga/lib/ii.c:684: error: Dead Store The value written to `&p` is never used. 682. v += *p++ << 4; 683. v += *p++ << 2; 684. *rp++ = v + *p++; ^ 685. return rp; 686. } #1803 storage/mroonga/vendor/groonga/lib/ii.c:697: error: Dead Store The value written to `&p` is never used. 695. *p++ = ((*dp >> 4) & 0x3); 696. *p++ = ((*dp >> 2) & 0x3); 697. *p++ = (*dp++ & 0x3); ^ 698. return dp; 699. } #1804 storage/mroonga/vendor/groonga/lib/ii.c:711: error: Dead Store The value written to `&p` is never used. 709. *rp++ = v + (*p >> 2); v = *p++ << 6; 710. v += *p++ << 3; 711. *rp++ = v + *p++; ^ 712. return rp; 713. } #1805 storage/mroonga/vendor/groonga/lib/ii.c:725: error: Dead Store The value written to `&p` is never used. 723. v = ((*dp++ << 2) & 0x7); *p++ = v + (*dp >> 6); 724. *p++ = ((*dp >> 3) & 0x7); 725. *p++ = (*dp++ & 0x7); ^ 726. return dp; 727. } #1806 storage/mroonga/vendor/groonga/lib/ii.c:739: error: Dead Store The value written to `&p` is never used. 737. *rp++ = v + *p++; 738. v = *p++ << 4; 739. *rp++ = v + *p++; ^ 740. return rp; 741. } #1807 storage/mroonga/vendor/groonga/lib/ii.c:752: error: Dead Store The value written to `&p` is never used. 750. *p++ = (*dp++ & 0xf); 751. *p++ = (*dp >> 4); 752. *p++ = (*dp++ & 0xf); ^ 753. return dp; 754. } #1808 storage/mroonga/vendor/groonga/lib/ii.c:766: error: Dead Store The value written to `&p` is never used. 764. v += *p++ << 2; 765. *rp++ = v + (*p >> 3); v = *p++ << 5; 766. *rp++ = v + *p++; ^ 767. return rp; 768. } #1809 storage/mroonga/vendor/groonga/lib/ii.c:780: error: Dead Store The value written to `&p` is never used. 778. *p++ = ((*dp >> 2) & 0x1f); 779. v = ((*dp++ << 3) & 0x1f); *p++ = v + (*dp >> 5); 780. *p++ = (*dp++ & 0x1f); ^ 781. return dp; 782. } #1810 storage/mroonga/vendor/groonga/lib/ii.c:794: error: Dead Store The value written to `&p` is never used. 792. *rp++ = v + (*p >> 4); v = *p++ << 4; 793. *rp++ = v + (*p >> 2); v = *p++ << 6; 794. *rp++ = v + *p++; ^ 795. return rp; 796. } #1811 storage/mroonga/vendor/groonga/lib/ii.c:808: error: Dead Store The value written to `&p` is never used. 806. v = ((*dp++ << 4) & 0x3f); *p++ = v + (*dp >> 4); 807. v = ((*dp++ << 2) & 0x3f); *p++ = v + (*dp >> 6); 808. *p++ = (*dp++ & 0x3f); ^ 809. return dp; 810. } #1812 storage/mroonga/vendor/groonga/lib/ii.c:822: error: Dead Store The value written to `&p` is never used. 820. *rp++ = v + (*p >> 2); v = *p++ << 6; 821. *rp++ = v + (*p >> 1); v = *p++ << 7; 822. *rp++ = v + *p++; ^ 823. return rp; 824. } #1813 storage/mroonga/vendor/groonga/lib/ii.c:836: error: Dead Store The value written to `&p` is never used. 834. v = ((*dp++ << 2) & 0x7f); *p++ = v + (*dp >> 6); 835. v = ((*dp++ << 1) & 0x7f); *p++ = v + (*dp >> 7); 836. *p++ = (*dp++ & 0x7f); ^ 837. return dp; 838. } #1814 storage/mroonga/vendor/groonga/lib/ii.c:849: error: Dead Store The value written to `&p` is never used. 847. *rp++ = *p++; 848. *rp++ = *p++; 849. *rp++ = *p++; ^ 850. return rp; 851. } #1815 storage/mroonga/vendor/groonga/lib/ii.c:862: error: Dead Store The value written to `&p` is never used. 860. *p++ = *dp++; 861. *p++ = *dp++; 862. *p++ = *dp++; ^ 863. return dp; 864. } #1816 storage/mroonga/vendor/groonga/lib/ii.c:876: error: Dead Store The value written to `&p` is never used. 874. *rp++ = v + (*p >> 6); v = *p++ << 2; 875. *rp++ = v + (*p >> 7); v = *p++ << 1; 876. *rp++ = v + (*p >> 8); *rp++ = *p++; ^ 877. return rp; 878. } #1817 storage/mroonga/vendor/groonga/lib/ii.c:890: error: Dead Store The value written to `&p` is never used. 888. v = ((*dp++ << 6) & 0x1ff); *p++ = v + (*dp >> 2); 889. v = ((*dp++ << 7) & 0x1ff); *p++ = v + (*dp >> 1); 890. v = ((*dp++ << 8) & 0x1ff); *p++ = v + *dp++; ^ 891. return dp; 892. } #1818 storage/mroonga/vendor/groonga/lib/ii.c:904: error: Dead Store The value written to `&p` is never used. 902. *rp++ = v + (*p >> 4); v = *p++ << 4; 903. *rp++ = v + (*p >> 6); v = *p++ << 2; 904. *rp++ = v + (*p >> 8); *rp++ = *p++; ^ 905. return rp; 906. } #1819 storage/mroonga/vendor/groonga/lib/ii.c:918: error: Dead Store The value written to `&p` is never used. 916. v = ((*dp++ << 4) & 0x3ff); *p++ = v + (*dp >> 4); 917. v = ((*dp++ << 6) & 0x3ff); *p++ = v + (*dp >> 2); 918. v = ((*dp++ << 8) & 0x3ff); *p++ = v + *dp++; ^ 919. return dp; 920. } #1820 storage/mroonga/vendor/groonga/lib/ii.c:932: error: Dead Store The value written to `&p` is never used. 930. *rp++ = v + (*p >> 10); *rp++ = (*p >> 2); v = *p++ << 6; 931. *rp++ = v + (*p >> 5); v = *p++ << 3; 932. *rp++ = v + (*p >> 8); *rp++ = *p++; ^ 933. return rp; 934. } #1821 storage/mroonga/vendor/groonga/lib/ii.c:946: error: Dead Store The value written to `&p` is never used. 944. v = ((*dp++ << 10) & 0x7ff); v += *dp++ << 2; *p++ = v + (*dp >> 6); 945. v = ((*dp++ << 5) & 0x7ff); *p++ = v + (*dp >> 3); 946. v = ((*dp++ << 8) & 0x7ff); *p++ = v + *dp++; ^ 947. return dp; 948. } #1822 storage/mroonga/vendor/groonga/lib/ii.c:960: error: Dead Store The value written to `&p` is never used. 958. *rp++ = v + (*p >> 8); *rp++ = *p++; 959. *rp++ = (*p >> 4); v = *p++ << 4; 960. *rp++ = v + (*p >> 8); *rp++ = *p++; ^ 961. return rp; 962. } #1823 storage/mroonga/vendor/groonga/lib/ii.c:974: error: Dead Store The value written to `&p` is never used. 972. v = ((*dp++ << 8) & 0xfff); *p++ = v + *dp++; 973. v = *dp++ << 4; *p++ = v + (*dp >> 4); 974. v = ((*dp++ << 8) & 0xfff); *p++ = v + *dp++; ^ 975. return dp; 976. } #1824 storage/mroonga/vendor/groonga/lib/ii.c:988: error: Dead Store The value written to `&p` is never used. 986. *rp++ = v + (*p >> 6); v = *p++ << 2; 987. *rp++ = v + (*p >> 11); *rp++ = (*p >> 3); v = *p++ << 5; 988. *rp++ = v + (*p >> 8); *rp++ = *p++; ^ 989. return rp; 990. } #1825 storage/mroonga/vendor/groonga/lib/ii.c:1002: error: Dead Store The value written to `&p` is never used. 1000. v = ((*dp++ << 6) & 0x1fff); *p++ = v + (*dp >> 2); 1001. v = ((*dp++ << 11) & 0x1fff); v += *dp++ << 3; *p++ = v + (*dp >> 5); 1002. v = ((*dp++ << 8) & 0x1fff); *p++ = v + *dp++; ^ 1003. return dp; 1004. } #1826 storage/mroonga/vendor/groonga/lib/ii.c:1016: error: Dead Store The value written to `&p` is never used. 1014. *rp++ = v + (*p >> 12); *rp++ = (*p >> 4); v = *p++ << 4; 1015. *rp++ = v + (*p >> 10); *rp++ = (*p >> 2); v = *p++ << 6; 1016. *rp++ = v + (*p >> 8); *rp++ = *p++; ^ 1017. return rp; 1018. } #1827 storage/mroonga/vendor/groonga/lib/ii.c:1030: error: Dead Store The value written to `&p` is never used. 1028. v = ((*dp++ << 12) & 0x3fff); v += *dp++ << 4; *p++ = v + (*dp >> 4); 1029. v = ((*dp++ << 10) & 0x3fff); v += *dp++ << 2; *p++ = v + (*dp >> 6); 1030. v = ((*dp++ << 8) & 0x3fff); *p++ = v + *dp++; ^ 1031. return dp; 1032. } #1828 storage/mroonga/vendor/groonga/lib/ii.c:1044: error: Dead Store The value written to `&p` is never used. 1042. *rp++ = v + (*p >> 10); *rp++ = (*p >> 2); v = *p++ << 6; 1043. *rp++ = v + (*p >> 9); *rp++ = (*p >> 1); v = *p++ << 7; 1044. *rp++ = v + (*p >> 8); *rp++ = *p++; ^ 1045. return rp; 1046. } #1829 storage/mroonga/vendor/groonga/lib/ii.c:1058: error: Dead Store The value written to `&p` is never used. 1056. v = ((*dp++ << 10) & 0x7fff); v += *dp++ << 2; *p++ = v + (*dp >> 6); 1057. v = ((*dp++ << 9) & 0x7fff); v += *dp++ << 1; *p++ = v + (*dp >> 7); 1058. v = ((*dp++ << 8) & 0x7fff); *p++ = v + *dp++; ^ 1059. return dp; 1060. } #1830 storage/mroonga/vendor/groonga/lib/ii.c:1071: error: Dead Store The value written to `&p` is never used. 1069. *rp++ = (*p >> 8); *rp++ = *p++; 1070. *rp++ = (*p >> 8); *rp++ = *p++; 1071. *rp++ = (*p >> 8); *rp++ = *p++; ^ 1072. return rp; 1073. } #1831 storage/mroonga/vendor/groonga/lib/ii.c:1085: error: Dead Store The value written to `&p` is never used. 1083. v = *dp++ << 8; *p++ = v + *dp++; 1084. v = *dp++ << 8; *p++ = v + *dp++; 1085. v = *dp++ << 8; *p++ = v + *dp++; ^ 1086. return dp; 1087. } #1832 storage/mroonga/vendor/groonga/lib/ii.c:1099: error: Dead Store The value written to `&p` is never used. 1097. *rp++ = v + (*p >> 14); *rp++ = (*p >> 6); v = *p++ << 2; 1098. *rp++ = v + (*p >> 15); *rp++ = (*p >> 7); v = *p++ << 1; 1099. *rp++ = v + (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1100. return rp; 1101. } #1833 storage/mroonga/vendor/groonga/lib/ii.c:1113: error: Dead Store The value written to `&p` is never used. 1111. v = ((*dp++ << 14) & 0x1ffff); v += *dp++ << 6; *p++ = v + (*dp >> 2); 1112. v = ((*dp++ << 15) & 0x1ffff); v += *dp++ << 7; *p++ = v + (*dp >> 1); 1113. v = ((*dp++ << 16) & 0x1ffff); v += *dp++ << 8; *p++ = v + *dp++; ^ 1114. return dp; 1115. } #1834 storage/mroonga/vendor/groonga/lib/ii.c:1127: error: Dead Store The value written to `&p` is never used. 1125. *rp++ = v + (*p >> 12); *rp++ = (*p >> 4); v = *p++ << 4; 1126. *rp++ = v + (*p >> 14); *rp++ = (*p >> 6); v = *p++ << 2; 1127. *rp++ = v + (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1128. return rp; 1129. } #1835 storage/mroonga/vendor/groonga/lib/ii.c:1141: error: Dead Store The value written to `&p` is never used. 1139. v = ((*dp++ << 12) & 0x3ffff); v += *dp++ << 4; *p++ = v + (*dp >> 4); 1140. v = ((*dp++ << 14) & 0x3ffff); v += *dp++ << 6; *p++ = v + (*dp >> 2); 1141. v = ((*dp++ << 16) & 0x3ffff); v += *dp++ << 8; *p++ = v + *dp++; ^ 1142. return dp; 1143. } #1836 storage/mroonga/vendor/groonga/lib/ii.c:1155: error: Dead Store The value written to `&p` is never used. 1153. *rp++ = v + (*p >> 18); *rp++ = (*p >> 10); *rp++ = (*p >> 2); v = *p++ << 6; 1154. *rp++ = v + (*p >> 13); *rp++ = (*p >> 5); v = *p++ << 3; 1155. *rp++ = v + (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1156. return rp; 1157. } #1837 storage/mroonga/vendor/groonga/lib/ii.c:1171: error: Dead Store The value written to `&p` is never used. 1169. *p++ = v + (*dp >> 6); 1170. v = ((*dp++ << 13) & 0x7ffff); v += *dp++ << 5; *p++ = v + (*dp >> 3); 1171. v = ((*dp++ << 16) & 0x7ffff); v += *dp++ << 8; *p++ = v + *dp++; ^ 1172. return dp; 1173. } #1838 storage/mroonga/vendor/groonga/lib/ii.c:1185: error: Dead Store The value written to `&p` is never used. 1183. *rp++ = v + (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; 1184. *rp++ = (*p >> 12); *rp++ = (*p >> 4); v = *p++ << 4; 1185. *rp++ = v + (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1186. return rp; 1187. } #1839 storage/mroonga/vendor/groonga/lib/ii.c:1199: error: Dead Store The value written to `&p` is never used. 1197. v = ((*dp++ << 16) & 0xfffff); v += *dp++ << 8; *p++ = v + *dp++; 1198. v = *dp++ << 12; v += *dp++ << 4; *p++ = v + (*dp >> 4); 1199. v = ((*dp++ << 16) & 0xfffff); v += *dp++ << 8; *p++ = v + *dp++; ^ 1200. return dp; 1201. } #1840 storage/mroonga/vendor/groonga/lib/ii.c:1213: error: Dead Store The value written to `&p` is never used. 1211. *rp++ = v + (*p >> 14); *rp++ = (*p >> 6); v = *p++ << 2; 1212. *rp++ = v + (*p >> 19); *rp++ = (*p >> 11); *rp++ = (*p >> 3); v = *p++ << 5; 1213. *rp++ = v + (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1214. return rp; 1215. } #1841 storage/mroonga/vendor/groonga/lib/ii.c:1231: error: Dead Store The value written to `&p` is never used. 1229. v = ((*dp++ << 19) & 0x1fffff); v += *dp++ << 11; v += *dp++ << 3; 1230. *p++ = v + (*dp >> 5); 1231. v = ((*dp++ << 16) & 0x1fffff); v += *dp++ << 8; *p++ = v + *dp++; ^ 1232. return dp; 1233. } #1842 storage/mroonga/vendor/groonga/lib/ii.c:1245: error: Dead Store The value written to `&p` is never used. 1243. *rp++ = v + (*p >> 20); *rp++ = (*p >> 12); *rp++ = (*p >> 4); v = *p++ << 4; 1244. *rp++ = v + (*p >> 18); *rp++ = (*p >> 10); *rp++ = (*p >> 2); v = *p++ << 6; 1245. *rp++ = v + (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1246. return rp; 1247. } #1843 storage/mroonga/vendor/groonga/lib/ii.c:1263: error: Dead Store The value written to `&p` is never used. 1261. v = ((*dp++ << 18) & 0x3fffff); v += *dp++ << 10; v += *dp++ << 2; 1262. *p++ = v + (*dp >> 6); 1263. v = ((*dp++ << 16) & 0x3fffff); v += *dp++ << 8; *p++ = v + *dp++; ^ 1264. return dp; 1265. } #1844 storage/mroonga/vendor/groonga/lib/ii.c:1277: error: Dead Store The value written to `&p` is never used. 1275. *rp++ = v + (*p >> 18); *rp++ = (*p >> 10); *rp++ = (*p >> 2); v = *p++ << 6; 1276. *rp++ = v + (*p >> 17); *rp++ = (*p >> 9); *rp++ = (*p >> 1); v = *p++ << 7; 1277. *rp++ = v + (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1278. return rp; 1279. } #1845 storage/mroonga/vendor/groonga/lib/ii.c:1297: error: Dead Store The value written to `&p` is never used. 1295. v = ((*dp++ << 17) & 0x7fffff); v += *dp++ << 9; v += *dp++ << 1; 1296. *p++ = v + (*dp >> 7); 1297. v = ((*dp++ << 16) & 0x7fffff); v += *dp++ << 8; *p++ = v + *dp++; ^ 1298. return dp; 1299. } #1846 storage/mroonga/vendor/groonga/lib/ii.c:1310: error: Dead Store The value written to `&p` is never used. 1308. *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; 1309. *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; 1310. *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1311. return rp; 1312. } #1847 storage/mroonga/vendor/groonga/lib/ii.c:1324: error: Dead Store The value written to `&p` is never used. 1322. v = *dp++ << 16; v += *dp++ << 8; *p++ = v + *dp++; 1323. v = *dp++ << 16; v += *dp++ << 8; *p++ = v + *dp++; 1324. v = *dp++ << 16; v += *dp++ << 8; *p++ = v + *dp++; ^ 1325. return dp; 1326. } #1848 storage/mroonga/vendor/groonga/lib/ii.c:1338: error: Dead Store The value written to `&p` is never used. 1336. *rp++ = v + (*p >> 22); *rp++ = (*p >> 14); *rp++ = (*p >> 6); v = *p++ << 2; 1337. *rp++ = v + (*p >> 23); *rp++ = (*p >> 15); *rp++ = (*p >> 7); v = *p++ << 1; 1338. *rp++ = v + (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1339. return rp; 1340. } #1849 storage/mroonga/vendor/groonga/lib/ii.c:1359: error: Dead Store The value written to `&p` is never used. 1357. *p++ = v + (*dp >> 1); 1358. v = ((*dp++ << 24) & 0x1ffffff); v += *dp++ << 16; v += *dp++ << 8; 1359. *p++ = v + *dp++; ^ 1360. return dp; 1361. } #1850 storage/mroonga/vendor/groonga/lib/ii.c:1373: error: Dead Store The value written to `&p` is never used. 1371. *rp++ = v + (*p >> 20); *rp++ = (*p >> 12); *rp++ = (*p >> 4); v = *p++ << 4; 1372. *rp++ = v + (*p >> 22); *rp++ = (*p >> 14); *rp++ = (*p >> 6); v = *p++ << 2; 1373. *rp++ = v + (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1374. return rp; 1375. } #1851 storage/mroonga/vendor/groonga/lib/ii.c:1393: error: Dead Store The value written to `&p` is never used. 1391. *p++ = v + (*dp >> 2); 1392. v = ((*dp++ << 24) & 0x3ffffff); v += *dp++ << 16; v += *dp++ << 8; 1393. *p++ = v + *dp++; ^ 1394. return dp; 1395. } #1852 storage/mroonga/vendor/groonga/lib/ii.c:1409: error: Dead Store The value written to `&p` is never used. 1407. *rp++ = (*p >> 2); v = *p++ << 6; 1408. *rp++ = v + (*p >> 21); *rp++ = (*p >> 13); *rp++ = (*p >> 5); v = *p++ << 3; 1409. *rp++ = v + (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1410. return rp; 1411. } #1853 storage/mroonga/vendor/groonga/lib/ii.c:1430: error: Dead Store The value written to `&p` is never used. 1428. *p++ = v + (*dp >> 3); 1429. v = ((*dp++ << 24) & 0x7ffffff); v += *dp++ << 16; v += *dp++ << 8; 1430. *p++ = v + *dp++; ^ 1431. return dp; 1432. } #1854 storage/mroonga/vendor/groonga/lib/ii.c:1444: error: Dead Store The value written to `&p` is never used. 1442. *rp++ = v + (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; 1443. *rp++ = (*p >> 20); *rp++ = (*p >> 12); *rp++ = (*p >> 4); v = *p++ << 4; 1444. *rp++ = v + (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1445. return rp; 1446. } #1855 storage/mroonga/vendor/groonga/lib/ii.c:1462: error: Dead Store The value written to `&p` is never used. 1460. v = *dp++ << 20; v += *dp++ << 12; v += *dp++ << 4; *p++ = v + (*dp >> 4); 1461. v = ((*dp++ << 24) & 0xfffffff); v += *dp++ << 16; v += *dp++ << 8; 1462. *p++ = v + *dp++; ^ 1463. return dp; 1464. } #1856 storage/mroonga/vendor/groonga/lib/ii.c:1480: error: Dead Store The value written to `&p` is never used. 1478. *rp++ = v + (*p >> 27); *rp++ = (*p >> 19); *rp++ = (*p >> 11); 1479. *rp++ = (*p >> 3); v = *p++ << 5; 1480. *rp++ = v + (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1481. return rp; 1482. } #1857 storage/mroonga/vendor/groonga/lib/ii.c:1501: error: Dead Store The value written to `&p` is never used. 1499. v += *dp++ << 3; *p++ = v + (*dp >> 5); 1500. v = ((*dp++ << 24) & 0x1fffffff); v += *dp++ << 16; v += *dp++ << 8; 1501. *p++ = v + *dp++; ^ 1502. return dp; 1503. } #1858 storage/mroonga/vendor/groonga/lib/ii.c:1520: error: Dead Store The value written to `&p` is never used. 1518. *rp++ = (*p >> 2); v = *p++ << 6; 1519. *rp++ = v + (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); 1520. *rp++ = *p++; ^ 1521. return rp; 1522. } #1859 storage/mroonga/vendor/groonga/lib/ii.c:1540: error: Dead Store The value written to `&p` is never used. 1538. v += *dp++ << 2; *p++ = v + (*dp >> 6); 1539. v = ((*dp++ << 24) & 0x3fffffff); v += *dp++ << 16; v += *dp++ << 8; 1540. *p++ = v + *dp++; ^ 1541. return dp; 1542. } #1860 storage/mroonga/vendor/groonga/lib/ii.c:1561: error: Dead Store The value written to `&p` is never used. 1559. *rp++ = (*p >> 1); v = *p++ << 7; 1560. *rp++ = v + (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); 1561. *rp++ = *p++; ^ 1562. return rp; 1563. } #1861 storage/mroonga/vendor/groonga/lib/ii.c:1582: error: Dead Store The value written to `&p` is never used. 1580. v += *dp++ << 1; *p++ = v + (*dp >> 7); 1581. v = ((*dp++ << 24) & 0x7fffffff); v += *dp++ << 16; v += *dp++ << 8; 1582. *p++ = v + *dp++; ^ 1583. return dp; 1584. } #1862 storage/mroonga/vendor/groonga/lib/ii.c:1595: error: Dead Store The value written to `&p` is never used. 1593. *rp++ = (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; 1594. *rp++ = (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; 1595. *rp++ = (*p >> 24); *rp++ = (*p >> 16); *rp++ = (*p >> 8); *rp++ = *p++; ^ 1596. return rp; 1597. } #1863 storage/mroonga/vendor/groonga/lib/ii.c:1609: error: Dead Store The value written to `&p` is never used. 1607. v = *dp++ << 24; v += *dp++ << 16; v += *dp++ << 8; *p++ = v + *dp++; 1608. v = *dp++ << 24; v += *dp++ << 16; v += *dp++ << 8; *p++ = v + *dp++; 1609. v = *dp++ << 24; v += *dp++ << 16; v += *dp++ << 8; *p++ = v + *dp++; ^ 1610. return dp; 1611. } #1864 storage/mroonga/vendor/groonga/lib/ii.c:2867: error: Dead Store The value written to `&snn` is never used. 2865. stp = rdv[j++].data; 2866. if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; } 2867. snn = rdv[j].data_size; ^ 2868. snp = rdv[j].data; 2869. } #1865 storage/mroonga/vendor/groonga/lib/ii.c:3120: error: Dead Store The value written to `&snn` is never used. 3118. stp = rdv[j++].data; 3119. if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; } 3120. snn = rdv[j].data_size; ^ 3121. snp = rdv[j].data; 3122. } #1866 storage/mroonga/vendor/groonga/lib/ii.c:3568: error: Dead Store The value written to `&size` is never used. 3566. } 3567. if (sce > scp) { 3568. size += grn_p_decv(ctx, scp, sce - scp, rdv, ii->n_elements); ^ 3569. { 3570. int j = 0; #1867 storage/mroonga/vendor/groonga/lib/ii.c:3573: error: Dead Store The value written to `&srp` is never used. 3571. sdf = rdv[j].data_size; 3572. GRN_OUTPUT_INT64(sdf); 3573. srp = rdv[j++].data; ^ 3574. if ((ii->header->flags & GRN_OBJ_WITH_SECTION)) { ssp = rdv[j++].data; } 3575. if (sdf != rdv[j].data_size) { #1868 storage/mroonga/vendor/groonga/lib/ii.c:3574: error: Dead Store The value written to `&ssp` is never used. 3572. GRN_OUTPUT_INT64(sdf); 3573. srp = rdv[j++].data; 3574. if ((ii->header->flags & GRN_OBJ_WITH_SECTION)) { ssp = rdv[j++].data; } ^ 3575. if (sdf != rdv[j].data_size) { 3576. nterms_with_corrupt_chunk++; #1869 storage/mroonga/vendor/groonga/lib/ii.c:3578: error: Dead Store The value written to `&stp` is never used. 3576. nterms_with_corrupt_chunk++; 3577. } 3578. stp = rdv[j++].data; ^ 3579. if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; } 3580. GRN_OUTPUT_INT64(rdv[j].data_size); #1870 storage/mroonga/vendor/groonga/lib/ii.c:3579: error: Dead Store The value written to `&sop` is never used. 3577. } 3578. stp = rdv[j++].data; 3579. if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; } ^ 3580. GRN_OUTPUT_INT64(rdv[j].data_size); 3581. snn = rdv[j].data_size; #1871 storage/mroonga/vendor/groonga/lib/ii.c:3581: error: Dead Store The value written to `&snn` is never used. 3579. if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; } 3580. GRN_OUTPUT_INT64(rdv[j].data_size); 3581. snn = rdv[j].data_size; ^ 3582. snp = rdv[j].data; 3583. } #1872 storage/mroonga/vendor/groonga/lib/ii.c:3582: error: Dead Store The value written to `&snp` is never used. 3580. GRN_OUTPUT_INT64(rdv[j].data_size); 3581. snn = rdv[j].data_size; 3582. snp = rdv[j].data; ^ 3583. } 3584. nterm_with_chunk++; #1873 storage/mroonga/vendor/groonga/lib/ii.c:4101: error: Dead Store The value written to `¤t_key_size` is never used. 4099. int current_key_size; 4100. 4101. current_key_size = grn_pat_cursor_get_key(ctx, cursor, ¤t_key); ^ 4102. if (memcmp(((char *)current_key) + target_key_size, 4103. key + target_key_size, #1874 storage/mroonga/vendor/groonga/lib/ii.c:6334: error: Uninitialized Value `tokenizer` is read without initialization. 6332. grn_obj *tokenizer; 6333. grn_table_get_info(ctx, ii->lexicon, NULL, NULL, &tokenizer, NULL, NULL); 6334. if (tokenizer) { ^ 6335. grn_obj old_elem, new_elem; 6336. unsigned int i, max_n; #1875 storage/mroonga/vendor/groonga/lib/ii.c:6477: error: Uninitialized Value `tp` is read without initialization. 6475. tid_ = tid; 6476. }); 6477. GRN_ARRAY_EACH(ctx, sorted, 0, 0, id, &tp, { ^ 6478. grn_hash_get_value(ctx, (grn_hash *)new, *tp, &u_); 6479. u_->offset = offset++; #1876 storage/mroonga/vendor/groonga/lib/ii.c:6579: error: Uninitialized Value `u` is read without initialization. 6577. grn_hash *o = (grn_hash *)old; 6578. grn_hash *n = (grn_hash *)new; 6579. GRN_HASH_EACH(ctx, o, id, &tp, NULL, &u, { ^ 6580. if (n && (eid = grn_hash_get(ctx, n, tp, sizeof(grn_id), 6581. (void **) &un))) { #1877 storage/mroonga/vendor/groonga/lib/ii.c:6597: error: Uninitialized Value `u` is read without initialization. 6595. if (new) { 6596. grn_hash *n = (grn_hash *)new; 6597. GRN_HASH_EACH(ctx, n, id, &tp, NULL, &u, { ^ 6598. grn_ii_update_one(ctx, ii, *tp, *u, n); 6599. grn_ii_updspec_close(ctx, *u); #1878 storage/mroonga/vendor/groonga/lib/ii.c:6770: error: Uninitialized Value `tp` is read without initialization. 6768. if ((ti->cursors = cursor_heap_open(ctx, GRN_HASH_SIZE(h)))) { 6769. grn_rset_recinfo *ri; 6770. GRN_HASH_EACH(ctx, h, id, &tp, NULL, (void **)&ri, { ^ 6771. if ((s = grn_ii_estimate_size(ctx, ii, *tp))) { 6772. cursor_heap_push(ctx, ti->cursors, ii, *tp, 0, ri->score - 1, min); #1879 storage/mroonga/vendor/groonga/lib/ii.c:6770: error: Uninitialized Value `ri` is read without initialization. 6768. if ((ti->cursors = cursor_heap_open(ctx, GRN_HASH_SIZE(h)))) { 6769. grn_rset_recinfo *ri; 6770. GRN_HASH_EACH(ctx, h, id, &tp, NULL, (void **)&ri, { ^ 6771. if ((s = grn_ii_estimate_size(ctx, ii, *tp))) { 6772. cursor_heap_push(ctx, ti->cursors, ii, *tp, 0, ri->score - 1, min); #1880 storage/mroonga/vendor/groonga/lib/ii.c:7103: error: Uninitialized Value `size` is read without initialization. 7101. case GRN_TOKEN_CURSOR_DOING : 7102. key = _grn_table_key(ctx, lexicon, node->tid, &size); 7103. ti = token_info_open(ctx, lexicon, ii, key, size, node->pos, ^ 7104. EX_NONE, NULL, min); 7105. break; #1881 storage/mroonga/vendor/groonga/lib/ii.c:7109: error: Uninitialized Value `size` is read without initialization. 7107. if (node->tid) { 7108. key = _grn_table_key(ctx, lexicon, node->tid, &size); 7109. ti = token_info_open(ctx, lexicon, ii, key, size, node->pos, ^ 7110. node->ef & EX_PREFIX, NULL, min); 7111. break; #1882 storage/mroonga/vendor/groonga/lib/ii.c:9601: error: Uninitialized Value `flags` is read without initialization. 9599. grn_table_get_info(ctx, ii_buffer->lexicon, &flags, NULL, 9600. &tokenizer, &normalizer, &token_filters); 9601. flags &= ~GRN_OBJ_PERSISTENT; ^ 9602. tmp_lexicon = grn_table_create(ctx, NULL, 0, NULL, flags, domain, range); 9603. if (tmp_lexicon) { #1883 storage/mroonga/vendor/groonga/lib/ii.c:9606: error: Uninitialized Value `tokenizer` is read without initialization. 9604. ii_buffer->tmp_lexicon = tmp_lexicon; 9605. grn_obj_set_info(ctx, tmp_lexicon, 9606. GRN_INFO_DEFAULT_TOKENIZER, tokenizer); ^ 9607. grn_obj_set_info(ctx, tmp_lexicon, 9608. GRN_INFO_NORMALIZER, normalizer); #1884 storage/mroonga/vendor/groonga/lib/ii.c:9608: error: Uninitialized Value `normalizer` is read without initialization. 9606. GRN_INFO_DEFAULT_TOKENIZER, tokenizer); 9607. grn_obj_set_info(ctx, tmp_lexicon, 9608. GRN_INFO_NORMALIZER, normalizer); ^ 9609. grn_obj_set_info(ctx, tmp_lexicon, 9610. GRN_INFO_TOKEN_FILTERS, token_filters); #1885 storage/mroonga/vendor/groonga/lib/ii.c:9610: error: Uninitialized Value `token_filters` is read without initialization. 9608. GRN_INFO_NORMALIZER, normalizer); 9609. grn_obj_set_info(ctx, tmp_lexicon, 9610. GRN_INFO_TOKEN_FILTERS, token_filters); ^ 9611. if ((flags & GRN_OBJ_TABLE_TYPE_MASK) == GRN_OBJ_TABLE_PAT_KEY) { 9612. grn_pat_cache_enable(ctx, (grn_pat *)tmp_lexicon, PAT_CACHE_SIZE); #1886 storage/mroonga/vendor/groonga/lib/ii.c:9837: error: Uninitialized Value `chunk_number` is read without initialization. 9835. chunk_number, ii_buffer->packed_len); 9836. fake_map(ctx, ii_buffer->ii->chunk, &io_win, ii_buffer->packed_buf, 9837. chunk_number, ii_buffer->packed_len); ^ 9838. grn_io_win_unmap(&io_win); 9839. ii_buffer->term_buffer->header.chunk = chunk_number; #1887 storage/mroonga/vendor/groonga/lib/ii.c:9900: error: Dead Store The value written to `&j` is never used. 9898. } 9899. if (flags & GRN_OBJ_WITH_POSITION) { 9900. posp = ii_buffer->data_vectors[j++].data; ^ 9901. } 9902. } #1888 storage/mroonga/vendor/groonga/lib/ii.c:9961: error: Dead Store The value written to `&j` is never used. 9959. (nposts <= (spos >> 13))) ? 0 : USE_P_ENC); 9960. ii_buffer->data_vectors[j].data_size = nposts; 9961. ii_buffer->data_vectors[j++].flags = f_p|ODD; ^ 9962. } 9963. } #1889 storage/mroonga/vendor/groonga/lib/ii.c:10377: error: Uninitialized Value `flags` is read without initialization. 10375. grn_table_get_info(ctx, ii_buffer->ii->lexicon, &flags, NULL, NULL, NULL, 10376. NULL); 10377. if ((flags & GRN_OBJ_TABLE_TYPE_MASK) == GRN_OBJ_TABLE_PAT_KEY) { ^ 10378. grn_pat_cache_disable(ctx, (grn_pat *)ii_buffer->ii->lexicon); 10379. } #1890 storage/mroonga/vendor/groonga/lib/ii.c:11282: error: Dead Store The value written to `&shift` is never used. 11280. pos_use_p_enc = chunk->pos_offset >= 32 && 11281. chunk->pos_offset > (chunk->pos_sum >> 13); 11282. use_p_enc_flags |= pos_use_p_enc << shift++; ^ 11283. } 11284. #1891 storage/mroonga/vendor/groonga/lib/index_column.c:114: error: Uninitialized Value `flags` is read without initialization. 112. grn_obj *tokenizer = NULL; 113. grn_table_get_info(ctx, ii->lexicon, &flags, NULL, &tokenizer, NULL, NULL); 114. switch (flags & GRN_OBJ_TABLE_TYPE_MASK) { ^ 115. case GRN_OBJ_TABLE_PAT_KEY : 116. case GRN_OBJ_TABLE_DAT_KEY : #1892 storage/mroonga/vendor/groonga/lib/io.c:627: error: Dead Store The value written to `&flags` is never used. 625. segment_size = h.segment_size; 626. max_segment = h.max_segment; 627. flags = h.flags; ^ 628. grn_close(fd); 629. if (segment_size == 0) { #1893 storage/mroonga/vendor/groonga/lib/io.c:1227: error: Dead Store The value written to `&path_exist` is never used. 1225. if (!grn_fileinfo_opened(fi)) { 1226. char path[PATH_MAX]; 1227. grn_bool path_exist = GRN_TRUE; ^ 1228. gen_pathname(io->path, path, fno); 1229. path_exist = grn_path_exist(path); #1894 storage/mroonga/vendor/groonga/lib/io.c:1496: error: Dead Store The value written to `&nth_file_info` is never used. 1494. } 1495. 1496. nth_file_info = grn_io_compute_nth_file_info(io, i); ^ 1497. msync_result = GRN_MSYNC(ctx, 1498. io->fis[nth_file_info].fh, #1895 storage/mroonga/vendor/groonga/lib/logger.c:116: error: Uninitialized Value `tv.tv_sec` is read without initialization during the call to `grn_timeval2tm()`. 114. 115. grn_timeval_now(ctx, &now); 116. tm = grn_timeval2tm(ctx, &now, &tm_buffer); ^ 117. grn_snprintf(rotated_path, PATH_MAX, PATH_MAX, 118. "%s.%04d-%02d-%02d-%02d-%02d-%02d-%06d", #1896 storage/mroonga/vendor/groonga/lib/logger.c:117: error: Uninitialized Value `_.tv_nsec` is read without initialization. 115. grn_timeval_now(ctx, &now); 116. tm = grn_timeval2tm(ctx, &now, &tm_buffer); 117. grn_snprintf(rotated_path, PATH_MAX, PATH_MAX, ^ 118. "%s.%04d-%02d-%02d-%02d-%02d-%02d-%06d", 119. current_path, #1897 storage/mroonga/vendor/groonga/lib/logger.c:419: error: Uninitialized Value `tv.tv_sec` is read without initialization during the call to `grn_timeval2str()`. 417. grn_timeval tv; 418. grn_timeval_now(ctx, &tv); 419. grn_timeval2str(ctx, &tv, tbuf, TBUFSIZE); ^ 420. } 421. if (current_logger.flags & GRN_LOG_MESSAGE) { #1898 storage/mroonga/vendor/groonga/lib/logger.c:749: error: Uninitialized Value `tv.tv_sec` is read without initialization during the call to `grn_timeval2str()`. 747. timestamp[0] = '\0'; 748. grn_timeval_now(ctx, &tv); 749. grn_timeval2str(ctx, &tv, timestamp, TIMESTAMP_BUFFER_SIZE); ^ 750. } 751. #1899 storage/mroonga/vendor/groonga/lib/logger.c:761: error: Uninitialized Value `_.tv_sec` is read without initialization. 759. grn_timeval_now(ctx, &tv); 760. elapsed_time = 761. (uint64_t)(tv.tv_sec - ctx->impl->tv.tv_sec) * GRN_TIME_NSEC_PER_SEC + ^ 762. (tv.tv_nsec - ctx->impl->tv.tv_nsec); 763. #1900 storage/mroonga/vendor/groonga/lib/logger.c:762: error: Uninitialized Value `_.tv_nsec` is read without initialization. 760. elapsed_time = 761. (uint64_t)(tv.tv_sec - ctx->impl->tv.tv_sec) * GRN_TIME_NSEC_PER_SEC + 762. (tv.tv_nsec - ctx->impl->tv.tv_nsec); ^ 763. 764. grn_snprintf(info, INFO_BUFFER_SIZE, INFO_BUFFER_SIZE, #1901 storage/mroonga/vendor/groonga/lib/normalizer.c:453: error: Dead Store The value written to `&c3` is never used. 451. break; 452. case 2 : 453. c3 = c2 - 0x1f; ^ 454. if (0x4f <= c2 && c2 <= 0x58) { 455. ctype = GRN_CHAR_DIGIT; #1902 storage/mroonga/vendor/groonga/lib/operator.c:700: error: Dead Store The value written to `&element` is never used. 698. grn_bool r = GRN_FALSE; 699. GRN_API_ENTER; 700. DO_COMPARE(x, y, r, <); ^ 701. GRN_API_RETURN(r); 702. } #1903 storage/mroonga/vendor/groonga/lib/operator.c:709: error: Dead Store The value written to `&element` is never used. 707. grn_bool r = GRN_FALSE; 708. GRN_API_ENTER; 709. DO_COMPARE(x, y, r, >); ^ 710. GRN_API_RETURN(r); 711. } #1904 storage/mroonga/vendor/groonga/lib/operator.c:718: error: Dead Store The value written to `&element` is never used. 716. grn_bool r = GRN_FALSE; 717. GRN_API_ENTER; 718. DO_COMPARE(x, y, r, <=); ^ 719. GRN_API_RETURN(r); 720. } #1905 storage/mroonga/vendor/groonga/lib/operator.c:727: error: Dead Store The value written to `&element` is never used. 725. grn_bool r = GRN_FALSE; 726. GRN_API_ENTER; 727. DO_COMPARE(x, y, r, >=); ^ 728. GRN_API_RETURN(r); 729. } #1906 storage/mroonga/vendor/groonga/lib/operator.c:1077: error: Uninitialized Value `normalizer` is read without initialization. 1075. record_key, GRN_TABLE_MAX_KEY_SIZE); 1076. grn_table_get_info(ctx, table, NULL, NULL, NULL, &normalizer, NULL); 1077. if (normalizer) { ^ 1078. grn_obj *norm_query; 1079. const char *norm_query_raw; #1907 storage/mroonga/vendor/groonga/lib/output.c:232: error: Uninitialized Value `name` is read without initialization. 230. &name, NULL, NULL); 231. GRN_TEXT_PUTS(ctx, outbuf, "'); 234. } #1908 storage/mroonga/vendor/groonga/lib/output.c:312: error: Uninitialized Value `name` is read without initialization. 310. &name, NULL, NULL); 311. GRN_TEXT_PUTS(ctx, outbuf, "'); 314. } #1909 storage/mroonga/vendor/groonga/lib/output.c:2679: error: Uninitialized Value `_.tv_sec` is read without initialization. 2677. started = ctx->impl->tv.tv_sec; 2678. started += ctx->impl->tv.tv_nsec / GRN_TIME_NSEC_PER_SEC_F; 2679. finished = tv_now.tv_sec; ^ 2680. finished += tv_now.tv_nsec / GRN_TIME_NSEC_PER_SEC_F; 2681. elapsed = finished - started; #1910 storage/mroonga/vendor/groonga/lib/output.c:2680: error: Uninitialized Value `_.tv_nsec` is read without initialization. 2678. started += ctx->impl->tv.tv_nsec / GRN_TIME_NSEC_PER_SEC_F; 2679. finished = tv_now.tv_sec; 2680. finished += tv_now.tv_nsec / GRN_TIME_NSEC_PER_SEC_F; ^ 2681. elapsed = finished - started; 2682. #1911 storage/mroonga/vendor/groonga/lib/pat.c:1521: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `fuzzy_heap_open()` on line 1510 is not freed after the last access at line 1521, column 9. 1519. grn_id tid; 1520. tid = common_prefix_pat_node_get(ctx, pat, key, prefix_match_size); 1521. if (tid != GRN_ID_NIL) { ^ 1522. id = tid; 1523. } else { #1912 storage/mroonga/vendor/groonga/lib/pat.c:1531: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `fuzzy_heap_open()` on line 1510 is not freed after the last access at line 1531, column 8. 1529. } 1530. dists = GRN_MALLOC((lx + 1) * (lx + max_distance + 1) * sizeof(uint16_t)); 1531. if (!dists) { ^ 1532. return GRN_NO_MEMORY_AVAILABLE; 1533. } #1913 storage/mroonga/vendor/groonga/lib/pat.c:1864: error: Dead Store The value written to `&key_` is never used. 1862. if (keybuf && bufsize >= len) { 1863. if (KEY_NEEDS_CONVERT(pat, len)) { 1864. KEY_DEC(pat, keybuf, key, len); ^ 1865. } else { 1866. grn_memcpy(keybuf, key, len); #1914 storage/mroonga/vendor/groonga/lib/pat.c:1864: error: Uninitialized Value `v` is read without initialization. 1862. if (keybuf && bufsize >= len) { 1863. if (KEY_NEEDS_CONVERT(pat, len)) { 1864. KEY_DEC(pat, keybuf, key, len); ^ 1865. } else { 1866. grn_memcpy(keybuf, key, len); #1915 storage/mroonga/vendor/groonga/lib/pat.c:1893: error: Dead Store The value written to `&key_` is never used. 1891. if (!grn_bulk_reserve(ctx, bulk, len)) { 1892. char *curr = GRN_BULK_CURR(bulk); 1893. KEY_DEC(pat, curr, key, len); ^ 1894. grn_bulk_truncate(ctx, bulk, GRN_BULK_VSIZE(bulk) + len); 1895. } #1916 storage/mroonga/vendor/groonga/lib/pat.c:1893: error: Uninitialized Value `v` is read without initialization. 1891. if (!grn_bulk_reserve(ctx, bulk, len)) { 1892. char *curr = GRN_BULK_CURR(bulk); 1893. KEY_DEC(pat, curr, key, len); ^ 1894. grn_bulk_truncate(ctx, bulk, GRN_BULK_VSIZE(bulk) + len); 1895. } #1917 storage/mroonga/vendor/groonga/lib/pat.c:3591: error: Dead Store The value written to `&len` is never used. 3589. if (flags & GRN_CURSOR_SIZE_BY_BIT) { return GRN_OPERATION_NOT_SUPPORTED; } 3590. byte_len = rk_conv(key, key_len, keybuf, GRN_TABLE_MAX_KEY_SIZE, &state); 3591. len = byte_len * 16; ^ 3592. PAT_AT(pat, 0, pn); 3593. id = pn->lr[1]; #1918 storage/mroonga/vendor/groonga/lib/plugin.c:127: error: Dead Store The value written to `&value_size` is never used. 125. 126. CRITICAL_SECTION_ENTER(grn_plugins_lock); 127. value_size = grn_hash_get_value(&grn_plugins_ctx, grn_plugins, id, &plugin); ^ 128. CRITICAL_SECTION_LEAVE(grn_plugins_lock); 129. #1919 storage/mroonga/vendor/groonga/lib/plugin.c:130: error: Uninitialized Value `plugin` is read without initialization. 128. CRITICAL_SECTION_LEAVE(grn_plugins_lock); 129. 130. if (!plugin) { ^ 131. return NULL; 132. } #1920 storage/mroonga/vendor/groonga/lib/proc.c:268: error: Uninitialized Value `_.tv_sec` is read without initialization. 266. GRN_OUTPUT_INT32(grn_starttime.tv_sec); 267. GRN_OUTPUT_CSTR("uptime"); 268. GRN_OUTPUT_INT32(now.tv_sec - grn_starttime.tv_sec); ^ 269. GRN_OUTPUT_CSTR("version"); 270. GRN_OUTPUT_CSTR(grn_get_version()); #1921 storage/mroonga/vendor/groonga/lib/proc.c:272: error: Uninitialized Value `_.nfetches` is read without initialization. 270. GRN_OUTPUT_CSTR(grn_get_version()); 271. GRN_OUTPUT_CSTR("n_queries"); 272. GRN_OUTPUT_INT64(statistics.nfetches); ^ 273. GRN_OUTPUT_CSTR("cache_hit_rate"); 274. if (statistics.nfetches == 0) { #1922 storage/mroonga/vendor/groonga/lib/proc.c:278: error: Uninitialized Value `_.nhits` is read without initialization. 276. } else { 277. double cache_hit_rate; 278. cache_hit_rate = (double)statistics.nhits / (double)statistics.nfetches; ^ 279. GRN_OUTPUT_FLOAT(cache_hit_rate * 100.0); 280. } #1923 storage/mroonga/vendor/groonga/lib/proc.c:562: error: Dead Store The value written to `&rc` is never used. 560. proc_delete(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data) 561. { 562. grn_rc rc = GRN_INVALID_ARGUMENT; ^ 563. grn_obj *table_name = VAR(0); 564. grn_obj *key = VAR(1); #1924 storage/mroonga/vendor/groonga/lib/proc.c:1034: error: Dead Store The value written to `&name` is never used. 1032. char_type_name(grn_char_type type) 1033. { 1034. const char *name = "unknown"; ^ 1035. 1036. #define CHAR_TYPE_NAME_WITH_BLANK(type_name) do { \ #1925 storage/mroonga/vendor/groonga/lib/proc.c:2199: error: Null Dereference The call to `run_query` may trigger the following issue: null (from the call to `run_query()` on line 2199) is dereferenced in the call to `run_query()`. 2197. grn_obj *res, grn_operator op) 2198. { 2199. return run_query(ctx, table, nargs - 1, args + 1, res, op); ^ 2200. } 2201. #1926 storage/mroonga/vendor/groonga/lib/proc.c:2308: error: Null Dereference The call to `run_sub_filter` may trigger the following issue: null (from the call to `run_sub_filter()` on line 2308) is dereferenced in the call to `run_sub_filter()`. 2306. grn_obj *res, grn_operator op) 2307. { 2308. return run_sub_filter(ctx, table, nargs - 1, args + 1, res, op); ^ 2309. } 2310. #1927 storage/mroonga/vendor/groonga/lib/proc.c:2731: error: Uninitialized Value `key` is read without initialization. 2729. long long int *key; 2730. grn_table_cursor_get_key(ctx, cursor, (void **)&key); 2731. all_min = *key; ^ 2732. } 2733. grn_table_cursor_close(ctx, cursor); #1928 storage/mroonga/vendor/groonga/lib/proc.c:2902: error: Null Dereference null (null value originating from line 2902) is dereferenced in the call to `between_parse_args()`. 2900. 2901. between_data_init(ctx, &data); 2902. rc = between_parse_args(ctx, nargs - 1, args + 1, &data); ^ 2903. if (rc != GRN_SUCCESS) { 2904. goto exit; #1929 storage/mroonga/vendor/groonga/lib/proc.c:2910: error: Uninitialized Value `_.max_border_type` is read without initialization. 2908. flags |= GRN_CURSOR_GT; 2909. } 2910. if (data.max_border_type == BETWEEN_BORDER_EXCLUDE) { ^ 2911. flags |= GRN_CURSOR_LT; 2912. } #1930 storage/mroonga/vendor/groonga/lib/proc/proc_column.c:573: error: Dead Store The value written to `&column_list_size` is never used. 571. grn_hash *cols; 572. grn_obj *col; 573. int column_list_size = -1; ^ 574. 575. table_raw = grn_plugin_proc_get_var(ctx, user_data, "table", -1); #1931 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:57: error: Uninitialized Value `key` is read without initialization. 55. 56. grn_hash_cursor_get_key(ctx, cursor, &key); 57. column_id = *((grn_id *)key); ^ 58. 59. if (dumper->is_close_opened_object_mode) { #1932 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:353: error: Uninitialized Value `key` is read without initialization. 351. 352. grn_hash_cursor_get_key(ctx, cursor, &key); 353. column_id = *((grn_id *)key); ^ 354. 355. if (dumper->is_close_opened_object_mode) { #1933 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:563: error: Uninitialized Value `key` is read without initialization. 561. 562. grn_hash_cursor_get_key(ctx, cursor, &key); 563. column_id = *((grn_id *)key); ^ 564. 565. column = grn_ctx_at(ctx, column_id); #1934 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:646: error: Uninitialized Value `value_raw` is read without initialization. 644. 645. grn_table_cursor_get_value(ctx, cursor, &value_raw); 646. id = *((grn_id *)value_raw); ^ 647. 648. if (is_first_record) { #1935 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:744: error: Uninitialized Value `flags` is read without initialization. 742. GRN_TEXT_PUTC(ctx, dumper->output, ' '); 743. grn_dump_table_create_flags(ctx, 744. flags & ~default_flags, ^ 745. dumper->output); 746. if (domain) { #1936 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:765: error: Uninitialized Value `default_tokenizer` is read without initialization. 763. grn_obj_unlink(ctx, range); 764. } 765. if (default_tokenizer) { ^ 766. GRN_TEXT_PUTS(ctx, dumper->output, " --default_tokenizer "); 767. dump_obj_name(ctx, dumper, default_tokenizer); #1937 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:769: error: Uninitialized Value `normalizer` is read without initialization. 767. dump_obj_name(ctx, dumper, default_tokenizer); 768. } 769. if (normalizer) { ^ 770. GRN_TEXT_PUTS(ctx, dumper->output, " --normalizer "); 771. dump_obj_name(ctx, dumper, normalizer); #1938 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:776: error: Uninitialized Value `token_filters` is read without initialization. 774. int n_token_filters; 775. 776. n_token_filters = GRN_BULK_VSIZE(token_filters) / sizeof(grn_obj *); ^ 777. if (n_token_filters > 0) { 778. int i; #1939 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c:857: error: Uninitialized Value `name` is read without initialization. 855. 856. name_size = grn_table_cursor_get_key(ctx, cursor, &name); 857. if (grn_obj_name_is_column(ctx, name, name_size)) { ^ 858. continue; 859. } #1940 storage/mroonga/vendor/groonga/lib/proc/proc_highlight.c:81: error: Uninitialized Value `rest` is read without initialization. 79. } 80. 81. chunk_length = rest - string; ^ 82. if (chunk_length - previous > 0) { 83. grn_pat_tag_keys_put_original_text(ctx, #1941 storage/mroonga/vendor/groonga/lib/proc/proc_object_list.c:128: error: Uninitialized Value `name` is read without initialization. 126. name_size = grn_table_cursor_get_key(ctx, cursor, &name); 127. 128. grn_ctx_output_str(ctx, name, name_size); ^ 129. 130. GRN_BULK_REWIND(&vector); #1942 storage/mroonga/vendor/groonga/lib/proc/proc_object_list.c:235: error: Uninitialized Value `path` is read without initialization. 233. NULL, 234. NULL); 235. grn_ctx_output_str(ctx, path, path_size); ^ 236. } else { 237. switch (spec->header.type) { #1943 storage/mroonga/vendor/groonga/lib/proc/proc_schema.c:608: error: Uninitialized Value `table_flags` is read without initialization. 606. grn_table_get_info(ctx, table, &table_flags, NULL, NULL, NULL, NULL); 607. grn_dump_table_create_flags(ctx, 608. table_flags & ~ignored_flags, ^ 609. &flags); 610. GRN_TEXT_PUTC(ctx, &flags, '\0'); #1944 storage/mroonga/vendor/groonga/lib/proc/proc_schema.c:1069: error: Uninitialized Value `key` is read without initialization. 1067. { 1068. grn_id *key; 1069. GRN_HASH_EACH(ctx, columns, id, &key, NULL, NULL, { ^ 1070. grn_obj *column; 1071. #1945 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:375: error: Uninitialized Value `added` is read without initialization. 373. &column_raw, 374. &added); 375. if (!added) { ^ 376. return GRN_TRUE; 377. } #1946 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:379: error: Uninitialized Value `column_raw` is read without initialization. 377. } 378. 379. column = column_raw; ^ 380. column->label.value = label; 381. column->label.length = label_len; #1947 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:1868: error: Dead Store The value written to `&succeeded` is never used. 1866. uint32_t n_additional_elements) 1867. { 1868. grn_bool succeeded = GRN_TRUE; ^ 1869. int offset; 1870. grn_obj *output_table; #1948 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:2025: error: Uninitialized Value `slice` is read without initialization. 2023. 2024. grn_hash_cursor_get_value(ctx, cursor, (void **)&slice); 2025. if (!slice->table) { ^ 2026. continue; 2027. } #1949 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:2326: error: Dead Store The value written to `&cycled` is never used. 2324. grn_id id) 2325. { 2326. grn_bool cycled = GRN_TRUE; ^ 2327. uint32_t index = id - 1; 2328. #1950 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:2498: error: Uninitialized Value `added` is read without initialization. 2496. (void **)&drilldown, 2497. &added); 2498. if (added) { ^ 2499. grn_drilldown_data_init(ctx, drilldown, label, label_len); 2500. } #1951 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:2625: error: Uninitialized Value `drilldown` is read without initialization. 2623. 2624. grn_hash_cursor_get_value(ctx, cursor, (void **)&drilldown); 2625. result = &(drilldown->result); ^ 2626. 2627. if (!result->table) { #1952 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:2712: error: Dead Store The value written to `&succeeded` is never used. 2710. grn_select_output(grn_ctx *ctx, grn_select_data *data) 2711. { 2712. grn_bool succeeded = GRN_TRUE; ^ 2713. 2714. if (grn_ctx_get_command_version(ctx) < GRN_COMMAND_VERSION_3) { #1953 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:2985: error: Uninitialized Value `drilldown` is read without initialization. 2983. grn_drilldown_data *drilldown; 2984. grn_hash_cursor_get_value(ctx, cursor, (void **)&drilldown); 2985. cache_key_size += DRILLDOWN_CACHE_SIZE(drilldown); ^ 2986. } GRN_HASH_EACH_END(ctx, cursor); 2987. } #1954 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:3066: error: Dead Store The value written to `&cp` is never used. 3064. cp += sizeof(grn_command_version); 3065. grn_memcpy(cp, &(ctx->impl->output.is_pretty), sizeof(grn_bool)); 3066. cp += sizeof(grn_bool); ^ 3067. #undef PUT_CACHE_KEY 3068. #1955 storage/mroonga/vendor/groonga/lib/proc/proc_select.c:3243: error: Uninitialized Value `added` is read without initialization. 3241. (void **)&slice, 3242. &added); 3243. if (added) { ^ 3244. grn_slice_data_init(ctx, slice, label, label_len); 3245. } #1956 storage/mroonga/vendor/groonga/lib/proc/proc_snippet.c:204: error: Dead Store The value written to `&rc` is never used. 202. grn_obj **keyword_set_args = args + N_REQUIRED_ARGS; 203. for (i = 0; i < n_keyword_sets; i++) { 204. rc = grn_snip_add_cond(ctx, snip, ^ 205. GRN_TEXT_VALUE(keyword_set_args[i * KEYWORD_SET_SIZE]), 206. GRN_TEXT_LEN(keyword_set_args[i * KEYWORD_SET_SIZE]), #1957 storage/mroonga/vendor/groonga/lib/proc/proc_snippet.c:216: error: Dead Store The value written to `&rc` is never used. 214. grn_obj **keyword_args = args + N_REQUIRED_ARGS; 215. for (i = 0; i < n_keywords; i++) { 216. rc = grn_snip_add_cond(ctx, snip, ^ 217. GRN_TEXT_VALUE(keyword_args[i]), 218. GRN_TEXT_LEN(keyword_args[i]), #1958 storage/mroonga/vendor/groonga/lib/proc/proc_table.c:385: error: Uninitialized Value `flags` is read without initialization. 383. &normalizer, 384. &token_filters); 385. grn_dump_table_create_flags(ctx, flags, &o); ^ 386. grn_ctx_output_obj(ctx, &o, NULL); 387. grn_proc_output_object_id_name(ctx, table->header.domain); #1959 storage/mroonga/vendor/groonga/lib/rset.c:94: error: Dead Store The value written to `&values` is never used. 92. double value_raw = GRN_FLOAT_VALUE(&value_float); 93. *((double *)values) += (value_raw - current_average) / ri->n_subrecs; 94. values += GRN_RSET_AVG_SIZE; ^ 95. } 96. #1960 storage/mroonga/vendor/groonga/lib/store.c:1191: error: Dead Store The value written to `&jag` is never used. 1189. uint32_t jag; 1190. if (EHUGE_P(ei)) { 1191. EHUGE_DEC(ei, jag, *size); ^ 1192. *pos = 0; 1193. } else { #1961 storage/mroonga/vendor/groonga/lib/store.c:1194: error: Dead Store The value written to `&jag` is never used. 1192. *pos = 0; 1193. } else { 1194. EINFO_DEC(ei, jag, *pos, *size); ^ 1195. } 1196. } #1962 storage/mroonga/vendor/groonga/lib/store.c:2304: error: Dead Store The value written to `&seg_id` is never used. 2302. grn_memcpy(packed_ptr, seg_addr, size); 2303. GRN_IO_SEG_UNREF(io, seg_id); 2304. seg_id++; ^ 2305. if (uncompress((Bytef *)buf, &dest_size, (Bytef *)reader->packed_buf, 2306. reader->packed_size - sizeof(uint64_t)) != Z_OK) { #1963 storage/mroonga/vendor/groonga/lib/store.c:2482: error: Dead Store The value written to `&seg_id` is never used. 2480. grn_memcpy(buf_ptr, seg_addr, size); 2481. GRN_IO_SEG_UNREF(io, seg_id); 2482. seg_id++; ^ 2483. } else { 2484. if (!reader->body_seg_addr) { #1964 storage/mroonga/vendor/groonga/lib/str.c:161: error: Dead Store The value written to `&p` is never used. 159. /* hankaku-kana */ 160. return 1; 161. } else if (++p >= (unsigned char *)end) { ^ 162. /* This is invalid character */ 163. GRN_LOG(ctx, GRN_LOG_WARNING, "invalid sjis string end on grn_charlen"); #1965 storage/mroonga/vendor/groonga/lib/str.c:672: error: Dead Store The value written to `&c3` is never used. 670. break; 671. case 2 : 672. c3 = c2 - 0x1f; ^ 673. if (0x4f <= c2 && c2 <= 0x58) { 674. ctype = GRN_CHAR_DIGIT; #1966 storage/mroonga/vendor/groonga/lib/str.c:2896: error: Uninitialized Value `weight` is read without initialization. 2894. } 2895. GRN_TEXT_PUTC(ctx, bulk, ':'); 2896. grn_text_ulltoa(ctx, bulk, weight); ^ 2897. } 2898. GRN_TEXT_PUTS(ctx, bulk, "}"); #1967 storage/mroonga/vendor/groonga/lib/time.c:75: error: Uninitialized Value `_.tv_nsec` is read without initialization. 73. grn_timeval tv; 74. grn_timeval_now(ctx, &tv); 75. GRN_TIME_SET(ctx, obj, GRN_TIME_PACK(tv.tv_sec, ^ 76. GRN_TIME_NSEC_TO_USEC(tv.tv_nsec))); 77. } #1968 storage/mroonga/vendor/groonga/lib/time.c:75: error: Uninitialized Value `_.tv_sec` is read without initialization. 73. grn_timeval tv; 74. grn_timeval_now(ctx, &tv); 75. GRN_TIME_SET(ctx, obj, GRN_TIME_PACK(tv.tv_sec, ^ 76. GRN_TIME_NSEC_TO_USEC(tv.tv_nsec))); 77. } #1969 storage/mroonga/vendor/groonga/lib/time.c:129: error: Dead Store The value written to `&usec` is never used. 127. int32_t usec; 128. 129. GRN_TIME_UNPACK(time, sec, usec); ^ 130. return grn_time_t_to_tm(ctx, sec, tm); 131. } #1970 storage/mroonga/vendor/groonga/lib/tokenizer.c:153: error: Uninitialized Value `table_flags` is read without initialization. 151. { 152. grn_obj *normalized_query; 153. if (table_flags & GRN_OBJ_KEY_NORMALIZE) { ^ 154. normalizer = GRN_NORMALIZER_AUTO; 155. } #1971 storage/mroonga/vendor/groonga/lib/tokenizer.c:161: error: Uninitialized Value `table_encoding` is read without initialization. 159. normalizer, 160. normalize_flags, 161. table_encoding); ^ 162. if (!normalized_query) { 163. GRN_PLUGIN_FREE(ctx, query_buf); #1972 storage/mroonga/vendor/groonga/lib/tokenizers.c:607: error: Dead Store The value written to `&n_characters` is never used. 605. memcmp(current, GRN_TOKENIZER_BEGIN_MARK_UTF8, char_len) == 0) { 606. tokenizer->is_start_token = GRN_TRUE; 607. n_characters++; ^ 608. GRN_TEXT_PUT(ctx, buffer, current, char_len); 609. current += char_len; #1973 storage/mroonga/vendor/groonga/lib/ts.c:275: error: Dead Store The value written to `&rc` is never used. 273. grn_rc rc; 274. grn_ts_str rest = str; 275. rc = grn_ts_expr_parser_open(ctx, table, &writer->parser); ^ 276. for ( ; ; ) { 277. grn_ts_str first = { NULL, 0 }; #1974 storage/mroonga/vendor/groonga/lib/ts.c:669: error: Uninitialized Value `_.size` is read without initialization. 667. grn_ts_expr *expr; 668. rest = grn_ts_str_trim_score_assignment(str); 669. if (!rest.size) { ^ 670. return GRN_SUCCESS; 671. } #1975 storage/mroonga/vendor/groonga/lib/ts.c:672: error: Uninitialized Value `str.ptr` is read without initialization during the call to `grn_ts_expr_parse()`. 670. return GRN_SUCCESS; 671. } 672. rc = grn_ts_expr_parse(ctx, table, rest, &expr); ^ 673. if (rc != GRN_SUCCESS) { 674. return rc; #1976 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1291: error: Dead Store The value written to `&key_` is never used. 1289. int8_t tmp; 1290. GRN_TS_TABLE_GET_KEY(pat) 1291. grn_ntohi(&tmp, key_ptr, sizeof(tmp)); ^ 1292. *key = tmp; 1293. return GRN_SUCCESS; #1977 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1292: error: Uninitialized Value `tmp` is read without initialization. 1290. GRN_TS_TABLE_GET_KEY(pat) 1291. grn_ntohi(&tmp, key_ptr, sizeof(tmp)); 1292. *key = tmp; ^ 1293. return GRN_SUCCESS; 1294. } #1978 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1303: error: Dead Store The value written to `&key_` is never used. 1301. int16_t tmp; 1302. GRN_TS_TABLE_GET_KEY(pat) 1303. grn_ntohi(&tmp, key_ptr, sizeof(tmp)); ^ 1304. *key = tmp; 1305. return GRN_SUCCESS; #1979 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1304: error: Uninitialized Value `tmp` is read without initialization. 1302. GRN_TS_TABLE_GET_KEY(pat) 1303. grn_ntohi(&tmp, key_ptr, sizeof(tmp)); 1304. *key = tmp; ^ 1305. return GRN_SUCCESS; 1306. } #1980 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1315: error: Dead Store The value written to `&key_` is never used. 1313. int32_t tmp; 1314. GRN_TS_TABLE_GET_KEY(pat) 1315. grn_ntohi(&tmp, key_ptr, sizeof(tmp)); ^ 1316. *key = tmp; 1317. return GRN_SUCCESS; #1981 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1316: error: Uninitialized Value `tmp` is read without initialization. 1314. GRN_TS_TABLE_GET_KEY(pat) 1315. grn_ntohi(&tmp, key_ptr, sizeof(tmp)); 1316. *key = tmp; ^ 1317. return GRN_SUCCESS; 1318. } #1982 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1326: error: Dead Store The value written to `&key_` is never used. 1324. { 1325. GRN_TS_TABLE_GET_KEY(pat) 1326. grn_ntohi(key, key_ptr, sizeof(grn_ts_int)); ^ 1327. return GRN_SUCCESS; 1328. } #1983 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1348: error: Uninitialized Value `tmp` is read without initialization. 1346. GRN_TS_TABLE_GET_KEY(pat) 1347. grn_ntoh(&tmp, key_ptr, sizeof(tmp)); 1348. *key = tmp; ^ 1349. return GRN_SUCCESS; 1350. } #1984 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1360: error: Uninitialized Value `tmp` is read without initialization. 1358. GRN_TS_TABLE_GET_KEY(pat) 1359. grn_ntoh(&tmp, key_ptr, sizeof(tmp)); 1360. *key = tmp; ^ 1361. return GRN_SUCCESS; 1362. } #1985 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1382: error: Uninitialized Value `tmp` is read without initialization. 1380. GRN_TS_TABLE_GET_KEY(pat) 1381. grn_ntoh(&tmp, key_ptr, sizeof(tmp)); 1382. tmp ^= (((tmp ^ ((int64_t)1 << 63)) >> 63) | ((int64_t)1 << 63)); ^ 1383. *(int64_t *)key = tmp; 1384. return GRN_SUCCESS; #1986 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:1393: error: Dead Store The value written to `&key_` is never used. 1391. { 1392. GRN_TS_TABLE_GET_KEY(pat) 1393. grn_ntohi(key, key_ptr, sizeof(grn_ts_time)); ^ 1394. return GRN_SUCCESS; 1395. } #1987 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:2590: error: Dead Store The value written to `&n_values` is never used. 2588. grn_memcpy(&n_bytes, &out_ptr[i].ptr, sizeof(n_bytes)); 2589. buf_ptr += n_bytes; 2590. GRN_B_DEC(n_values, ptr); ^ 2591. out_ptr[i].ptr = text_ptr; 2592. for (j = 0; j < out_ptr[i].size; j++) { #1988 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:3596: error: Dead Store The value written to `&rc` is never used. 3594. 3595. /* Evaluate the 2nd argument. */ 3596. rc = grn_ts_expr_node_evaluate_to_buf(ctx, node->args[1], tmp_in, count, ^ 3597. &node->bufs[1]); 3598. buf_ptrs[1] = (grn_ts_bool *)node->bufs[1].ptr; #1989 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:3641: error: Dead Store The value written to `&rc` is never used. 3639. 3640. /* Evaluate the 2nd argument. */ 3641. rc = grn_ts_expr_node_evaluate_to_buf(ctx, node->args[1], tmp_in, count, ^ 3642. &node->bufs[1]); 3643. buf_ptrs[1] = (grn_ts_bool *)node->bufs[1].ptr; #1990 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:3686: error: Dead Store The value written to `&rc` is never used. 3684. 3685. /* Evaluate the 2nd argument. */ 3686. rc = grn_ts_expr_node_evaluate_to_buf(ctx, node->args[1], tmp_in, count, ^ 3687. &node->bufs[1]); 3688. buf_ptrs[1] = (grn_ts_bool *)node->bufs[1].ptr; #1991 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:4458: error: Dead Store The value written to `&rc` is never used. 4456. 4457. /* Evaluate the 2nd argument. */ 4458. rc = grn_ts_expr_node_evaluate_to_buf(ctx, node->args[1], tmp_in, count, ^ 4459. &node->bufs[1]); 4460. buf_ptrs[1] = (grn_ts_bool *)node->bufs[1].ptr; #1992 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:4485: error: Dead Store The value written to `&rc` is never used. 4483. return rc; 4484. } 4485. rc = grn_ts_expr_node_evaluate_to_buf(ctx, node->args[1], out, n, ^ 4486. &node->bufs[0]); 4487. buf_ptr = (grn_ts_bool *)node->bufs[0].ptr; #1993 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:4864: error: Dead Store The value written to `&rc` is never used. 4862. for (i = 0; i < n_io; i++) { 4863. grn_ts_float result; 4864. rc = grn_ts_op_float(ctx, buf_ptr[i], &result); ^ 4865. io[i].score = (grn_ts_score)result; 4866. if (!isfinite(io[i].score)) { #1994 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:4901: error: Dead Store The value written to `&rc` is never used. 4899. grn_ts_record *io, size_t n_io) 4900. { 4901. GRN_TS_OP_ARITH_ADJUST(plus) ^ 4902. } 4903. #1995 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:4909: error: Dead Store The value written to `&rc` is never used. 4907. grn_ts_record *io, size_t n_io) 4908. { 4909. GRN_TS_OP_ARITH_ADJUST(minus) ^ 4910. } 4911. #1996 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:4917: error: Dead Store The value written to `&rc` is never used. 4915. grn_ts_record *io, size_t n_io) 4916. { 4917. GRN_TS_OP_ARITH_ADJUST(multiplication) ^ 4918. } 4919. #1997 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:4925: error: Dead Store The value written to `&rc` is never used. 4923. grn_ts_record *io, size_t n_io) 4924. { 4925. GRN_TS_OP_ARITH_ADJUST(division) ^ 4926. } 4927. #1998 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:4933: error: Dead Store The value written to `&rc` is never used. 4931. grn_ts_record *io, size_t n_io) 4932. { 4933. GRN_TS_OP_ARITH_ADJUST(modulus) ^ 4934. } 4935. #undef GRN_TS_OP_ARITH_ADJUST #1999 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c:5075: error: Dead Store The value written to `&tmp` is never used. 5073. return rc; 5074. } 5075. tmp = (grn_ts_record *)node->bufs[0].ptr; ^ 5076. rc = grn_ts_expr_node_evaluate_to_buf(ctx, node->dest, in, n_in, 5077. &node->bufs[1]); #2000 storage/mroonga/vendor/groonga/lib/ts/ts_expr_parser.c:756: error: Uninitialized Value `_.size` is read without initialization. 754. } 755. rest = grn_ts_str_trim_left(str); 756. if (!rest.size) { ^ 757. return grn_ts_expr_parser_tokenize_end(ctx, parser, rest, token); 758. } #2001 storage/mroonga/vendor/groonga/lib/ts/ts_expr_parser.c:757: error: Uninitialized Value `str.ptr` is read without initialization during the call to `grn_ts_expr_parser_tokenize_end()`. 755. rest = grn_ts_str_trim_left(str); 756. if (!rest.size) { 757. return grn_ts_expr_parser_tokenize_end(ctx, parser, rest, token); ^ 758. } 759. if (grn_ts_str_has_number_prefix(rest)) { #2002 storage/mroonga/vendor/groonga/lib/ts/ts_expr_parser.c:759: error: Uninitialized Value `str.ptr` is read without initialization during the call to `grn_ts_str_has_number_prefix()`. 757. return grn_ts_expr_parser_tokenize_end(ctx, parser, rest, token); 758. } 759. if (grn_ts_str_has_number_prefix(rest)) { ^ 760. grn_ts_expr_token *prev_token; 761. if ((rest.ptr[0] != '+') && (rest.ptr[0] != '-')) { #2003 storage/mroonga/vendor/groonga/lib/ts/ts_expr_parser.c:761: error: Uninitialized Value `_.ptr` is read without initialization. 759. if (grn_ts_str_has_number_prefix(rest)) { 760. grn_ts_expr_token *prev_token; 761. if ((rest.ptr[0] != '+') && (rest.ptr[0] != '-')) { ^ 762. return grn_ts_expr_parser_tokenize_number(ctx, parser, rest, token); 763. } #2004 storage/mroonga/vendor/groonga/lib/ts/ts_expr_parser.c:782: error: Uninitialized Value `_.ptr` is read without initialization. 780. } 781. } 782. if (rest.ptr[0] == '"') { ^ 783. return grn_ts_expr_parser_tokenize_text(ctx, parser, rest, token); 784. } #2005 storage/mroonga/vendor/groonga/lib/ts/ts_sorter.c:1660: error: Dead Store The value written to `&rc` is never used. 1658. size_t next_limit = ((limit > right) ? right : limit) - left; 1659. if (pivot != -1) { 1660. rc = grn_ts_qsort_by_text_asc2(ctx, node, next_offset, next_limit, ^ 1661. vals, recs + left, right - left, 1662. depth + 1); #2006 storage/mroonga/vendor/groonga/plugins/functions/time.c:48: error: Dead Store The value written to `&accept_interval` is never used. 46. uint32_t interval_raw = 1; 47. grn_obj *classed_time; 48. grn_bool accept_interval = GRN_TRUE; ^ 49. 50. switch (unit) { #2007 storage/mroonga/vendor/groonga/plugins/suggest/suggest.c:879: error: Uninitialized Value `added` is read without initialization. 877. pair_id = grn_table_add(ctx, learner->pairs, &key, sizeof(uint64_t), 878. &added); 879. if (added) { ^ 880. grn_obj_set_value(ctx, learner->pairs_pre, pair_id, pre_item, 881. GRN_OBJ_SET); #2008 storage/mroonga/vendor/groonga/plugins/suggest/suggest.c:992: error: Uninitialized Value `value.pre_events.header.type` is read without initialization during the call to `learner_learn()`. 990. learner_init(ctx, &learner, 991. post_event, post_type, post_item, seq, post_time, pairs); 992. learner_learn(ctx, &learner); ^ 993. learn_distance_in_seconds = learner.learn_distance_in_seconds; 994. } #2009 storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/normalizers/mysql.c:349: error: Uninitialized Value `original_length_in_bytes` is read without initialization. 347. { 348. unsigned int max_normalized_length_in_bytes = 349. original_length_in_bytes + 1; ^ 350. normalized = GRN_PLUGIN_MALLOC(ctx, max_normalized_length_in_bytes); 351. } #2010 storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/normalizers/mysql.c:363: error: Uninitialized Value `original` is read without initialization. 361. current_check[0] = 0; 362. } 363. rest = original; ^ 364. rest_length = original_length_in_bytes; 365. while (rest_length > 0) { #2011 storage/myisam/ft_boolean_search.c:365: error: Uninitialized Value `off` is read without initialization. 363. my_bool can_go_down; 364. MI_INFO *info=ftb->info; 365. uint UNINIT_VAR(off), extra= HA_FT_WLEN + info->s->rec_reflength; ^ 366. uchar *lastkey_buf=ftbw->word+ftbw->off; 367. #2012 storage/myisam/ft_boolean_search.c:477: error: Dead Store The value written to `&r` is never used. 475. ftbw->key_root=info->lastpos; 476. ftbw->keyinfo=& info->s->ft2_keyinfo; 477. r=_mi_search_first(info, ftbw->keyinfo, ftbw->key_root); ^ 478. DBUG_ASSERT(r==0); /* found something */ 479. memcpy(lastkey_buf+off, info->lastkey, info->lastkey_length); #2013 storage/myisam/ha_myisam.cc:271: error: Dead Store The value written to `&type` is never used. 269. { 270. uint i, j, recpos, minpos, fieldpos, temp_length, length; 271. enum ha_base_keytype type= HA_KEYTYPE_BINARY; ^ 272. uchar *record; 273. KEY *pos; #2014 storage/myisam/ha_myisam.cc:1074: error: Dead Store The value written to `&error` is never used. 1072. } 1073. 1074. error = chk_status(param, file); // Not fatal ^ 1075. error = chk_size(param, file); 1076. if (!error) #2015 storage/myisam/ha_myisam.cc:2116: error: Uninitialized Value `_.max_data_file_length` is read without initialization. 2114. { 2115. TABLE_SHARE *share= table->s; 2116. stats.max_data_file_length= misam_info.max_data_file_length; ^ 2117. stats.max_index_file_length= misam_info.max_index_file_length; 2118. stats.create_time= (ulong) misam_info.create_time; #2016 storage/myisam/ha_myisam.cc:2117: error: Uninitialized Value `_.max_index_file_length` is read without initialization. 2115. TABLE_SHARE *share= table->s; 2116. stats.max_data_file_length= misam_info.max_data_file_length; 2117. stats.max_index_file_length= misam_info.max_index_file_length; ^ 2118. stats.create_time= (ulong) misam_info.create_time; 2119. /* #2017 storage/myisam/ha_myisam.cc:2118: error: Uninitialized Value `_.create_time` is read without initialization. 2116. stats.max_data_file_length= misam_info.max_data_file_length; 2117. stats.max_index_file_length= misam_info.max_index_file_length; 2118. stats.create_time= (ulong) misam_info.create_time; ^ 2119. /* 2120. We want the value of stats.mrr_length_per_rec to be platform independent. #2018 storage/myisam/ha_myisam.cc:2127: error: Uninitialized Value `_.reflength` is read without initialization. 2125. refills and in a different order of records in the result set. 2126. */ 2127. stats.mrr_length_per_rec= misam_info.reflength + 8; // 8=MY_MAX(sizeof(void *)) ^ 2128. 2129. ref_length= misam_info.reflength; #2019 storage/myisam/ha_myisam.cc:2130: error: Uninitialized Value `_.options` is read without initialization. 2128. 2129. ref_length= misam_info.reflength; 2130. share->db_options_in_use= misam_info.options; ^ 2131. /* record block size. We adjust with IO_SIZE to not make it too small */ 2132. stats.block_size= MY_MAX(myisam_block_size, IO_SIZE); #2020 storage/myisam/mi_check.c:134: error: Uninitialized Value `old_link` is read without initialization. 132. reg2 ha_rows i; 133. uint delete_link_length; 134. my_off_t empty,next_link,UNINIT_VAR(old_link); ^ 135. char buff[22],buff2[22]; 136. DBUG_ENTER("chk_del"); #2021 storage/myisam/mi_check.c:784: error: Dead Store The value written to `&old_keypos` is never used. 782. goto err; 783. } 784. old_keypos=keypos; ^ 785. if (keypos >= endpos || 786. (key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,key)) == 0) #2022 storage/myisam/mi_check.c:934: error: Uninitialized Value `left_length` is read without initialization. 932. { 933. int error,got_error,flag; 934. uint key, UNINIT_VAR(left_length), b_type; ^ 935. ha_rows records,del_blocks; 936. my_off_t used,empty,pos,splits,UNINIT_VAR(start_recpos), #2023 storage/myisam/mi_check.c:936: error: Uninitialized Value `start_recpos` is read without initialization. 934. uint key, UNINIT_VAR(left_length), b_type; 935. ha_rows records,del_blocks; 936. my_off_t used,empty,pos,splits,UNINIT_VAR(start_recpos), ^ 937. del_length,link_used,start_block; 938. uchar *record= 0, *UNINIT_VAR(to); #2024 storage/myisam/mi_check.c:938: error: Uninitialized Value `to` is read without initialization. 936. my_off_t used,empty,pos,splits,UNINIT_VAR(start_recpos), 937. del_length,link_used,start_block; 938. uchar *record= 0, *UNINIT_VAR(to); ^ 939. char llbuff[22],llbuff2[22],llbuff3[22]; 940. ha_checksum intern_record_checksum; #2025 storage/myisam/mi_check.c:2203: error: Uninitialized Value `key_map` is read without initialization. 2201. char llbuff[22], llbuff2[22]; 2202. MI_SORT_INFO sort_info; 2203. ulonglong UNINIT_VAR(key_map); ^ 2204. DBUG_ENTER("mi_repair_by_sort"); 2205. #2026 storage/myisam/mi_check.c:2633: error: Uninitialized Value `key_map` is read without initialization. 2631. IO_CACHE_SHARE io_share; 2632. MI_SORT_INFO sort_info; 2633. ulonglong UNINIT_VAR(key_map); ^ 2634. pthread_attr_t thr_attr; 2635. ulong max_pack_reclength; #2027 storage/myisam/mi_check.c:3252: error: Uninitialized Value `to` is read without initialization. 3250. uint found_record,b_type,left_length; 3251. my_off_t pos; 3252. uchar *UNINIT_VAR(to); ^ 3253. MI_BLOCK_INFO block_info; 3254. MI_SORT_INFO *sort_info=sort_param->sort_info; #2028 storage/myisam/mi_check.c:4275: error: Dead Store The value written to `&error` is never used. 4273. DBUG_ENTER("recreate_table"); 4274. 4275. error=1; /* Default error */ ^ 4276. info= **org_info; 4277. status_info= (*org_info)->state[0]; #2029 storage/myisam/mi_check.c:4280: error: Dead Store The value written to `&unpack` is never used. 4278. info.state= &status_info; 4279. share= *(*org_info)->s; 4280. unpack= (share.options & HA_OPTION_COMPRESS_RECORD) && ^ 4281. (param->testflag & T_UNPACK); 4282. if (!(keyinfo=(MI_KEYDEF*) my_alloca(sizeof(MI_KEYDEF)*share.base.keys))) #2030 storage/myisam/mi_create.c:39: error: Uninitialized Value `dfile` is read without initialization. 37. { 38. register uint i,j; 39. File UNINIT_VAR(dfile),UNINIT_VAR(file); ^ 40. int errpos,save_errno, create_mode= O_RDWR | O_TRUNC; 41. myf create_flag; #2031 storage/myisam/mi_create.c:39: error: Uninitialized Value `file` is read without initialization. 37. { 38. register uint i,j; 39. File UNINIT_VAR(dfile),UNINIT_VAR(file); ^ 40. int errpos,save_errno, create_mode= O_RDWR | O_TRUNC; 41. myf create_flag; #2032 storage/myisam/mi_create.c:774: error: Dead Store The value written to `&keyseg` is never used. 772. { 773. HA_KEYSEG *keyseg_end; 774. keyseg= uniquedefs[i].seg; ^ 775. if (mi_uniquedef_write(file, &uniquedefs[i])) 776. goto err; #2033 storage/myisam/mi_delete.c:223: error: Uninitialized Value `leaf_page` is read without initialization. 221. my_bool last_key; 222. uchar *leaf_buff,*keypos; 223. my_off_t UNINIT_VAR(leaf_page),next_block; ^ 224. uchar lastkey[HA_MAX_KEY_BUFF]; 225. DBUG_ENTER("d_search"); #2034 storage/myisam/mi_delete.c:810: error: Dead Store The value written to `&old_key` is never used. 808. uint next_length,prev_length,prev_pack_length; 809. get_key_length(next_length,keypos); 810. get_key_pack_length(prev_length,prev_pack_length,old_key); ^ 811. if (next_length > prev_length) 812. { #2035 storage/myisam/mi_delete.c:810: error: Dead Store The value written to `&old_key` is never used. 808. uint next_length,prev_length,prev_pack_length; 809. get_key_length(next_length,keypos); 810. get_key_pack_length(prev_length,prev_pack_length,old_key); ^ 811. if (next_length > prev_length) 812. { #2036 storage/myisam/mi_dynrec.c:940: error: Uninitialized Value `_.next_filepos` is read without initialization. 938. goto err; 939. } 940. if (_mi_write_part_record(info,filepos,length,block_info.next_filepos, ^ 941. &record,&reclength,&flag)) 942. goto err; #2037 storage/myisam/mi_dynrec.c:950: error: Uninitialized Value `_.next_filepos` is read without initialization. 948. } 949. 950. if (block_info.next_filepos != HA_OFFSET_ERROR) ^ 951. { 952. /* #2038 storage/myisam/mi_dynrec.c:1445: error: Uninitialized Value `left_length` is read without initialization. 1443. { 1444. int block_of_record; 1445. uint b_type,UNINIT_VAR(left_length); ^ 1446. uchar *UNINIT_VAR(to); 1447. MI_BLOCK_INFO block_info; #2039 storage/myisam/mi_dynrec.c:1446: error: Uninitialized Value `to` is read without initialization. 1444. int block_of_record; 1445. uint b_type,UNINIT_VAR(left_length); 1446. uchar *UNINIT_VAR(to); ^ 1447. MI_BLOCK_INFO block_info; 1448. File file; #2040 storage/myisam/mi_dynrec.c:1619: error: Dead Store The value written to `&flag` is never used. 1617. if (flag == 0) /* First block */ 1618. { 1619. flag=1; ^ 1620. if (reclength != block_info.rec_len) 1621. { #2041 storage/myisam/mi_dynrec.c:1718: error: Uninitialized Value `to` is read without initialization. 1716. int block_of_record, info_read, save_errno; 1717. uint left_len,b_type; 1718. uchar *UNINIT_VAR(to); ^ 1719. MI_BLOCK_INFO block_info; 1720. MYISAM_SHARE *share=info->s; #2042 storage/myisam/mi_log.c:87: error: Dead Store The value written to `&error` is never used. 85. (void) mysql_file_write(myisam_log_file, buffert, length, MYF(0)); 86. if (!error) 87. error=my_lock(myisam_log_file,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE)); ^ 88. mysql_mutex_unlock(&THR_LOCK_myisam); 89. my_errno=old_errno; #2043 storage/myisam/mi_log.c:111: error: Dead Store The value written to `&error` is never used. 109. (void) mysql_file_write(myisam_log_file, buffert, length, MYF(0)); 110. if (!error) 111. error=my_lock(myisam_log_file,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE)); ^ 112. mysql_mutex_unlock(&THR_LOCK_myisam); 113. my_errno=old_errno; #2044 storage/myisam/mi_log.c:154: error: Dead Store The value written to `&error` is never used. 152. } 153. if (!error) 154. error=my_lock(myisam_log_file,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE)); ^ 155. mysql_mutex_unlock(&THR_LOCK_myisam); 156. my_errno=old_errno; #2045 storage/myisam/mi_open.c:91: error: Dead Store The value written to `&disk_cache` is never used. 89. char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN], 90. data_name[FN_REFLEN]; 91. uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; ^ 92. MI_INFO info,*UNINIT_VAR(m_info),*old_info= NULL; 93. MYISAM_SHARE share_buff,*share; #2046 storage/myisam/mi_open.c:91: error: Uninitialized Value `disk_cache` is read without initialization. 89. char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN], 90. data_name[FN_REFLEN]; 91. uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; ^ 92. MI_INFO info,*UNINIT_VAR(m_info),*old_info= NULL; 93. MYISAM_SHARE share_buff,*share; #2047 storage/myisam/mi_open.c:92: error: Uninitialized Value `m_info` is read without initialization. 90. data_name[FN_REFLEN]; 91. uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; 92. MI_INFO info,*UNINIT_VAR(m_info),*old_info= NULL; ^ 93. MYISAM_SHARE share_buff,*share; 94. ulong *rec_per_key_part= 0; #2048 storage/myisam/mi_open.c:738: error: Uninitialized Value `old_length` is read without initialization. 736. { 737. uint extra; 738. uint32 UNINIT_VAR(old_length); ^ 739. 740. if (! *buf || length > (old_length=mi_get_rec_buff_len(info, *buf))) #2049 storage/myisam/mi_packrec.c:724: error: Uninitialized Value `_.offset` is read without initialization. 722. &info->rec_buff, file, filepos)) 723. goto err; 724. if (mysql_file_read(file, (uchar*) info->rec_buff + block_info.offset, ^ 725. block_info.rec_len - block_info.offset, MYF(MY_NABP))) 726. goto panic; #2050 storage/myisam/mi_packrec.c:1372: error: Uninitialized Value `ref_length` is read without initialization. 1370. { 1371. uchar *header=info->header; 1372. uint head_length, UNINIT_VAR(ref_length); ^ 1373. 1374. if (file >= 0) #2051 storage/myisam/mi_range.c:109: error: Dead Store The value written to `&res` is never used. 107. &pages->last_page) 108. : (double) info->state->records); 109. res= (end_pos < start_pos ? (ha_rows) 0 : ^ 110. (end_pos == start_pos ? (ha_rows) 1 : (ha_rows) (end_pos-start_pos))); 111. if (start_pos == (double) HA_POS_ERROR || end_pos == (double) HA_POS_ERROR) #2052 storage/myisam/mi_range.c:231: error: Uninitialized Value `max_keynr` is read without initialization. 229. { 230. int flag; 231. uint nod_flag,keynr,UNINIT_VAR(max_keynr); ^ 232. my_bool after_key; 233. uchar *keypos,*buff; #2053 storage/myisam/mi_search.c:190: error: Uninitialized Value `flag` is read without initialization. 188. { 189. reg4 int start,mid,end,save_end; 190. int UNINIT_VAR(flag); ^ 191. uint totlength,nod_flag,not_used[2]; 192. DBUG_ENTER("_mi_bin_search"); #2054 storage/myisam/mi_search.c:252: error: Uninitialized Value `flag` is read without initialization. 250. uchar *buff, my_bool *last_key) 251. { 252. int UNINIT_VAR(flag); ^ 253. uint nod_flag,UNINIT_VAR(length),not_used[2]; 254. uchar t_buff[HA_MAX_KEY_BUFF],*end; #2055 storage/myisam/mi_search.c:253: error: Uninitialized Value `length` is read without initialization. 251. { 252. int UNINIT_VAR(flag); 253. uint nod_flag,UNINIT_VAR(length),not_used[2]; ^ 254. uchar t_buff[HA_MAX_KEY_BUFF],*end; 255. DBUG_ENTER("_mi_seq_search"); #2056 storage/myisam/mi_search.c:302: error: Uninitialized Value `length` is read without initialization. 300. */ 301. int flag=0, my_flag=-1; 302. uint nod_flag, UNINIT_VAR(length), len, matched, cmplen, kseg_len; ^ 303. uint UNINIT_VAR(prefix_len), suffix_len; 304. int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left; #2057 storage/myisam/mi_search.c:303: error: Uninitialized Value `prefix_len` is read without initialization. 301. int flag=0, my_flag=-1; 302. uint nod_flag, UNINIT_VAR(length), len, matched, cmplen, kseg_len; 303. uint UNINIT_VAR(prefix_len), suffix_len; ^ 304. int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left; 305. uchar *end, *kseg, *vseg; #2058 storage/myisam/mi_search.c:304: error: Uninitialized Value `seg_len_pack` is read without initialization. 302. uint nod_flag, UNINIT_VAR(length), len, matched, cmplen, kseg_len; 303. uint UNINIT_VAR(prefix_len), suffix_len; 304. int key_len_skip, UNINIT_VAR(seg_len_pack), key_len_left; ^ 305. uchar *end, *kseg, *vseg; 306. const uchar *sort_order= keyinfo->seg->charset->sort_order; #2059 storage/myisam/mi_search.c:308: error: Uninitialized Value `saved_from` is read without initialization. 306. const uchar *sort_order= keyinfo->seg->charset->sort_order; 307. uchar tt_buff[HA_MAX_KEY_BUFF+2], *t_buff=tt_buff+2; 308. uchar *UNINIT_VAR(saved_from), *UNINIT_VAR(saved_to); ^ 309. uchar *UNINIT_VAR(saved_vseg); 310. uint saved_length=0, saved_prefix_len=0; #2060 storage/myisam/mi_search.c:308: error: Uninitialized Value `saved_to` is read without initialization. 306. const uchar *sort_order= keyinfo->seg->charset->sort_order; 307. uchar tt_buff[HA_MAX_KEY_BUFF+2], *t_buff=tt_buff+2; 308. uchar *UNINIT_VAR(saved_from), *UNINIT_VAR(saved_to); ^ 309. uchar *UNINIT_VAR(saved_vseg); 310. uint saved_length=0, saved_prefix_len=0; #2061 storage/myisam/mi_search.c:309: error: Uninitialized Value `saved_vseg` is read without initialization. 307. uchar tt_buff[HA_MAX_KEY_BUFF+2], *t_buff=tt_buff+2; 308. uchar *UNINIT_VAR(saved_from), *UNINIT_VAR(saved_to); 309. uchar *UNINIT_VAR(saved_vseg); ^ 310. uint saved_length=0, saved_prefix_len=0; 311. uint length_pack; #2062 storage/myisam/mi_search.c:1480: error: Dead Store The value written to `&length_pack` is never used. 1478. my_bool same_length; 1479. 1480. length_pack=s_temp->ref_length=s_temp->n_ref_length=s_temp->n_length=0; ^ 1481. same_length=0; keyseg=keyinfo->seg; 1482. key_length=_mi_keylength(keyinfo,key)+nod_flag; #2063 storage/myisam/mi_search.c:1903: error: Dead Store The value written to `&key_pos` is never used. 1901. { 1902. s_temp->n_length+= s_temp->store_not_null; 1903. store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_length); ^ 1904. } 1905. } #2064 storage/myisam/mi_search.c:1903: error: Dead Store The value written to `&key_pos` is never used. 1901. { 1902. s_temp->n_length+= s_temp->store_not_null; 1903. store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_length); ^ 1904. } 1905. } #2065 storage/myisam/mi_test2.c:898: error: Dead Store The value written to `&pos` is never used. 896. break; 897. case 'd': 898. remove_count= atoi(++pos); ^ 899. break; 900. case 'i': #2066 storage/myisam/mi_test2.c:919: error: Dead Store The value written to `&pos` is never used. 917. break; 918. case 'm': /* records */ 919. if ((recant=atoi(++pos)) < 10) ^ 920. { 921. fprintf(stderr,"record count must be >= 10\n"); #2067 storage/myisam/mi_test2.c:926: error: Dead Store The value written to `&pos` is never used. 924. break; 925. case 'e': /* myisam_block_length */ 926. if ((myisam_block_size= atoi(++pos)) < MI_MIN_KEY_BLOCK_LENGTH || ^ 927. myisam_block_size > MI_MAX_KEY_BLOCK_LENGTH) 928. { #2068 storage/myisam/mi_test2.c:935: error: Dead Store The value written to `&pos` is never used. 933. break; 934. case 'E': /* myisam_block_length */ 935. if ((key_cache_block_size=atoi(++pos)) < MI_MIN_KEY_BLOCK_LENGTH || ^ 936. key_cache_block_size > MI_MAX_KEY_BLOCK_LENGTH) 937. { #2069 storage/myisam/mi_test2.c:944: error: Dead Store The value written to `&pos` is never used. 942. break; 943. case 'f': 944. if ((first_key=atoi(++pos)) < 0 || first_key >= MYISAM_KEYS) ^ 945. first_key=0; 946. break; #2070 storage/myisam/mi_test2.c:948: error: Dead Store The value written to `&pos` is never used. 946. break; 947. case 'k': 948. if ((keys=(uint) atoi(++pos)) < 1 || ^ 949. keys > (uint) (MYISAM_KEYS-first_key)) 950. keys=MYISAM_KEYS-first_key; #2071 storage/myisam/mi_test2.c:957: error: Dead Store The value written to `&pos` is never used. 955. break; 956. case 'R': /* Length of record pointer */ 957. rec_pointer_size=atoi(++pos); ^ 958. if (rec_pointer_size > 7) 959. rec_pointer_size=0; #2072 storage/myisam/mi_test2.c:968: error: Dead Store The value written to `&pos` is never used. 966. break; 967. case 't': 968. testflag=atoi(++pos); /* testmod */ ^ 969. break; 970. case 'q': #2073 storage/myisam/mi_test3.c:134: error: Dead Store The value written to `&pos` is never used. 132. break; 133. case 'f': 134. forks=atoi(++pos); ^ 135. break; 136. case 't': #2074 storage/myisam/mi_test3.c:137: error: Dead Store The value written to `&pos` is never used. 135. break; 136. case 't': 137. tests=atoi(++pos); ^ 138. break; 139. case 'K': /* Use key cacheing */ #2075 storage/myisam/mi_update.c:32: error: Uninitialized Value `old_checksum` is read without initialization. 30. ulonglong changed; 31. MYISAM_SHARE *share=info->s; 32. ha_checksum UNINIT_VAR(old_checksum); ^ 33. DBUG_ENTER("mi_update"); 34. #2076 storage/myisam/mi_write.c:601: error: Uninitialized Value `after_key` is read without initialization. 599. { 600. uint length,a_length,key_ref_length,t_length,nod_flag,key_length; 601. uchar *key_pos,*pos, *UNINIT_VAR(after_key); ^ 602. my_off_t new_pos; 603. MI_KEY_PARAM s_temp; #2077 storage/myisam/mi_write.c:715: error: Dead Store The value written to `&last_length` is never used. 713. uchar **after_key) 714. { 715. uint keys, length, UNINIT_VAR(last_length), key_ref_length; ^ 716. uchar *end,*lastpos,*prevpos; 717. uchar key_buff[HA_MAX_KEY_BUFF]; #2078 storage/myisam/mi_write.c:715: error: Uninitialized Value `last_length` is read without initialization. 713. uchar **after_key) 714. { 715. uint keys, length, UNINIT_VAR(last_length), key_ref_length; ^ 716. uchar *end,*lastpos,*prevpos; 717. uchar key_buff[HA_MAX_KEY_BUFF]; #2079 storage/myisam/myisamchk.c:707: error: Dead Store The value written to `&method_conv` is never used. 705. { 706. int method; 707. enum_handler_stats_method UNINIT_VAR(method_conv); ^ 708. 709. myisam_stats_method_str= argument; #2080 storage/myisam/myisamchk.c:1067: error: Dead Store The value written to `&datafile` is never used. 1065. (my_bool) !(param->testflag & T_REP_ANY), 1066. update_index); 1067. datafile=info->dfile; /* This is now locked */ ^ 1068. if (!error && !update_index) 1069. { #2081 storage/myisam/myisamchk.c:1092: error: Dead Store The value written to `&error` is never used. 1090. llstr(info->state->records,llbuff), 1091. llstr(info->state->del,llbuff2)); 1092. error =chk_status(param,info); ^ 1093. mi_intersect_keys_active(share->state.key_map, param->keys_in_use); 1094. error =chk_size(param,info); #2082 storage/myisam/myisamchk.c:1385: error: Dead Store The value written to `&keyseg` is never used. 1383. (void) putchar('\n'); 1384. } 1385. keyseg++; ^ 1386. } 1387. if (share->state.header.uniques) #2083 storage/myisam/myisamlog.c:338: error: Uninitialized Value `info.read_pos` is read without initialization during the call to `my_b_read()`. 336. files_open=0; access_time=0; 337. while (access_time++ != number_of_commands && 338. !my_b_read(&cache,(uchar*) head,9)) ^ 339. { 340. isamlog_filepos=my_b_tell(&cache)-9L; #2084 storage/myisam/myisamlog.c:340: error: Uninitialized Value `info.request_pos` is read without initialization during the call to `my_b_tell()`. 338. !my_b_read(&cache,(uchar*) head,9)) 339. { 340. isamlog_filepos=my_b_tell(&cache)-9L; ^ 341. file_info.filenr= mi_uint2korr(head+1); 342. isamlog_process=file_info.process=(long) mi_uint4korr(head+3); #2085 storage/myisam/rt_index.c:63: error: Dead Store The value written to `&saved_key` is never used. 61. uchar *page_buf; 62. int k_len; 63. uint *saved_key = (uint*) (info->rtree_recursion_state) + level; ^ 64. 65. if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length))) #2086 storage/myisam/rt_index.c:301: error: Dead Store The value written to `&saved_key` is never used. 299. uchar *page_buf; 300. uint k_len; 301. uint *saved_key = (uint*) (info->rtree_recursion_state) + level; ^ 302. 303. if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length))) #2087 storage/myisam/rt_index.c:500: error: Uninitialized Value `best_incr` is read without initialization. 498. { 499. double increase; 500. double UNINIT_VAR(best_incr); ^ 501. double area; 502. double UNINIT_VAR(best_area); #2088 storage/myisam/rt_index.c:502: error: Uninitialized Value `best_area` is read without initialization. 500. double UNINIT_VAR(best_incr); 501. double area; 502. double UNINIT_VAR(best_area); ^ 503. uchar *best_key= NULL; 504. uchar *k = rt_PAGE_FIRST_KEY(page_buf, nod_flag); #2089 storage/myisam/rt_split.c:189: error: Uninitialized Value `a` is read without initialization. 187. { 188. SplitStruct *cur; 189. SplitStruct *UNINIT_VAR(a), *UNINIT_VAR(b); ^ 190. double *g1 = reserve_coords(d_buffer, n_dim); 191. double *g2 = reserve_coords(d_buffer, n_dim); #2090 storage/myisam/rt_split.c:189: error: Uninitialized Value `b` is read without initialization. 187. { 188. SplitStruct *cur; 189. SplitStruct *UNINIT_VAR(a), *UNINIT_VAR(b); ^ 190. double *g1 = reserve_coords(d_buffer, n_dim); 191. double *g2 = reserve_coords(d_buffer, n_dim); #2091 storage/myisam/rt_split.c:192: error: Uninitialized Value `next` is read without initialization. 190. double *g1 = reserve_coords(d_buffer, n_dim); 191. double *g2 = reserve_coords(d_buffer, n_dim); 192. SplitStruct *UNINIT_VAR(next); ^ 193. int UNINIT_VAR(next_node); 194. int i; #2092 storage/myisam/rt_split.c:193: error: Uninitialized Value `next_node` is read without initialization. 191. double *g2 = reserve_coords(d_buffer, n_dim); 192. SplitStruct *UNINIT_VAR(next); 193. int UNINIT_VAR(next_node); ^ 194. int i; 195. SplitStruct *end = node + n_entries; #2093 storage/myisam/rt_split.c:263: error: Dead Store The value written to `&new_page` is never used. 261. int n_dim; 262. uchar *source_cur, *cur1, *cur2; 263. uchar *new_page= info->buff; ^ 264. int err_code= 0; 265. uint nod_flag= mi_test_if_nod(page); #2094 storage/myisam/sort.c:130: error: Uninitialized Value `keys` is read without initialization. 128. ulonglong memavl, old_memavl; 129. DYNAMIC_ARRAY buffpek; 130. ha_rows records, UNINIT_VAR(keys); ^ 131. uchar **sort_keys; 132. IO_CACHE tempfile, tempfile_for_exceptions; #2095 storage/myisam/sort.c:372: error: Uninitialized Value `keys` is read without initialization. 370. { 371. ulonglong memavl, old_memavl, sortbuff_size; 372. ha_keys UNINIT_VAR(keys), idx; ^ 373. uint sort_length; 374. uint maxbuffer; #2096 storage/myisam/sort.c:576: error: Uninitialized Value `length` is read without initialization. 574. MI_SORT_INFO *sort_info=sort_param->sort_info; 575. HA_CHECK *param=sort_info->param; 576. ulonglong UNINIT_VAR(length); ^ 577. ha_rows keys; 578. ulong *rec_per_key_part=param->rec_per_key_part; #2097 storage/myisam/sort.c:988: error: Dead Store The value written to `&error` is never used. 986. BUFFPEK *Fb, BUFFPEK *Tb) 987. { 988. int error= 1; ^ 989. uint sort_length; 990. ha_keys maxcount; #2098 storage/myisam/sort.c:992: error: Uninitialized Value `to_start_filepos` is read without initialization. 990. ha_keys maxcount; 991. ha_rows count; 992. my_off_t UNINIT_VAR(to_start_filepos), read_length; ^ 993. uchar *strpos; 994. BUFFPEK *buffpek,**refpek; #2099 storage/myisammrg/ha_myisammrg.cc:1255: error: Uninitialized Value `_.records` is read without initialization. 1253. and one has more than 2^32 rows in the merge tables. 1254. */ 1255. stats.records = (ha_rows) mrg_info.records; ^ 1256. stats.deleted = (ha_rows) mrg_info.deleted; 1257. #if !defined(BIG_TABLES) || SIZEOF_OFF_T == 4 #2100 storage/myisammrg/ha_myisammrg.cc:1256: error: Uninitialized Value `_.deleted` is read without initialization. 1254. */ 1255. stats.records = (ha_rows) mrg_info.records; 1256. stats.deleted = (ha_rows) mrg_info.deleted; ^ 1257. #if !defined(BIG_TABLES) || SIZEOF_OFF_T == 4 1258. if ((mrg_info.records >= (ulonglong) 1 << 32) || #2101 storage/myisammrg/ha_myisammrg.cc:1262: error: Uninitialized Value `_.data_file_length` is read without initialization. 1260. table->s->crashed= 1; 1261. #endif 1262. stats.data_file_length= mrg_info.data_file_length; ^ 1263. if (mrg_info.errkey >= (int) table_share->keys) 1264. { #2102 storage/myisammrg/ha_myisammrg.cc:1263: error: Uninitialized Value `_.errkey` is read without initialization. 1261. #endif 1262. stats.data_file_length= mrg_info.data_file_length; 1263. if (mrg_info.errkey >= (int) table_share->keys) ^ 1264. { 1265. /* #2103 storage/myisammrg/ha_myisammrg.cc:1517: error: Dead Store The value written to `&tables` is never used. 1515. char buff[FN_REFLEN]; 1516. const char **table_names, **pos; 1517. TABLE_LIST *tables= create_info->merge_list; ^ 1518. THD *thd= ha_thd(); 1519. size_t dirlgt= dirname_length(name); #2104 storage/myisammrg/myrg_open.c:40: error: Uninitialized Value `key_parts` is read without initialization. 38. { 39. int save_errno,errpos=0; 40. uint files= 0, i, UNINIT_VAR(key_parts), min_keys= 0; ^ 41. size_t length, dir_length; 42. ulonglong file_offset=0; #2105 storage/myisammrg/myrg_open.c:232: error: Uninitialized Value `m_info` is read without initialization. 230. void *callback_param) 231. { 232. MYRG_INFO *UNINIT_VAR(m_info); ^ 233. int rc; 234. int errpos; #2106 storage/myisammrg/myrg_open.c:245: error: Dead Store The value written to `&rc` is never used. 243. DBUG_ENTER("myrg_parent_open"); 244. 245. rc= 1; ^ 246. errpos= 0; 247. bzero((char*) &file_cache, sizeof(file_cache)); #2107 storage/myisammrg/myrg_open.c:270: error: Dead Store The value written to `&length` is never used. 268. /* Remove line terminator. */ 269. if (child_name_buff[length - 1] == '\n') 270. child_name_buff[--length]= '\0'; ^ 271. 272. /* Skip empty lines. */ #2108 storage/myisammrg/myrg_open.c:316: error: Dead Store The value written to `&length` is never used. 314. /* Remove line terminator. */ 315. if (child_name_buff[length - 1] == '\n') 316. child_name_buff[--length]= '\0'; ^ 317. 318. /* Skip empty lines and comments. */ #2109 storage/myisammrg/myrg_open.c:395: error: Uninitialized Value `key_parts` is read without initialization. 393. uint idx; 394. uint child_nr; 395. uint UNINIT_VAR(key_parts); ^ 396. uint min_keys; 397. my_bool bad_children= FALSE; #2110 storage/myisammrg/myrg_rkey.c:42: error: Uninitialized Value `key_buff` is read without initialization. 40. key_part_map keypart_map, enum ha_rkey_function search_flag) 41. { 42. uchar *UNINIT_VAR(key_buff); ^ 43. uint UNINIT_VAR(pack_key_length); 44. uint16 UNINIT_VAR(last_used_keyseg); #2111 storage/myisammrg/myrg_rkey.c:43: error: Uninitialized Value `pack_key_length` is read without initialization. 41. { 42. uchar *UNINIT_VAR(key_buff); 43. uint UNINIT_VAR(pack_key_length); ^ 44. uint16 UNINIT_VAR(last_used_keyseg); 45. MYRG_TABLE *table; #2112 storage/myisammrg/myrg_rkey.c:44: error: Uninitialized Value `last_used_keyseg` is read without initialization. 42. uchar *UNINIT_VAR(key_buff); 43. uint UNINIT_VAR(pack_key_length); 44. uint16 UNINIT_VAR(last_used_keyseg); ^ 45. MYRG_TABLE *table; 46. MI_INFO *mi; #2113 storage/oqgraph/graphcore.cc:94: error: Const Refable Parameter Function parameter `u` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 92. { } 93. template 94. bool operator()(V u) const ^ 95. { 96. return target(u, m_g) == m_target; #2114 storage/oqgraph/graphcore.cc:118: error: Const Refable Parameter Function parameter `u` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 116. { } 117. template 118. bool operator()(V u) const ^ 119. { 120. return source(u, m_g) == m_source; #2115 storage/oqgraph/graphcore.cc:158: error: Unnecessary Copy Intermediate `e` is copied into field `m_edge` but is not modified afterwards. Rather than copying into the field, move into it instead. 156. : m_flags(HAVE_SEQUENCE | HAVE_EDGE), m_sequence(s), 157. m_vertex(graph_traits::null_vertex()), 158. m_edge(e), m_weight(0) ^ 159. { } 160. #2116 storage/oqgraph/graphcore.cc:173: error: Unnecessary Copy Intermediate `e` is copied into field `m_edge` but is not modified afterwards. Rather than copying into the field, move into it instead. 171. inline reference(int s, Vertex v, Edge e, EdgeWeight w) 172. : m_flags(HAVE_SEQUENCE | HAVE_WEIGHT | HAVE_EDGE), 173. m_sequence(s), m_vertex(v), m_edge(e), m_weight(w) ^ 174. { } 175. #2117 storage/oqgraph/graphcore.cc:405: error: Dead Store The value written to `&v` is never used. 403. break; 404. 405. for (Vertex v= u;; u= v) ^ 406. { 407. optional edge; #2118 storage/oqgraph/oqgraph_shim.h:355: error: Optional Empty Access The call to `oqgraph3::cursor::seek_to` may trigger the following issue: call to `oqgraph3::cursor::seek_to()` eventually accesses memory that is assigned an empty value during the call to `oqgraph3::cursor::seek_to()` on line 355. 353. oqgraph3::cursor* 354. start= new oqgraph3::cursor(const_cast(&g)); 355. start->seek_to(boost::none, v); ^ 356. return std::make_pair( 357. graph_traits::in_edge_iterator(start), #2119 storage/oqgraph/oqgraph_shim.h:480: error: Optional Empty Access The call to `oqgraph3::cursor::seek_to` may trigger the following issue: call to `oqgraph3::cursor::seek_to()` eventually accesses memory that is assigned an empty value during the call to `oqgraph3::cursor::seek_to()` on line 480. 478. // if count(*) from g->TABLE where source=id or target=id > 0 then return id else return null 479. oqgraph3::cursor* found_cursor = new oqgraph3::cursor(const_cast(&g)); 480. bool found = (found_cursor->seek_to(id, boost::none) && found_cursor->seek_to(boost::none, id)); ^ 481. delete found_cursor; 482. if (found) { #2120 storage/rocksdb/ha_rocksdb.cc:2388: error: Use After Lifetime call to `rocksdb::Status::operator=()` eventually accesses memory that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended during the call to `myrocks::Rdb_dict_manager::put_auto_incr_val()` on line 2388. 2386. rocksdb::Status s; 2387. for (auto &it : m_auto_incr_map) { 2388. s = dict_manager.put_auto_incr_val(wb, it.first, it.second); ^ 2389. if (!s.ok()) { 2390. return s; #2121 storage/rocksdb/ha_rocksdb.cc:2773: error: Use After Lifetime The call to `myrocks::Rdb_sst_info::put` ends up calling `rocksdb::WritableFileWriter::Close` (after 12 more calls) and may trigger the following issue: call to `myrocks::Rdb_sst_info::put()` eventually accesses `&interim` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended during the call to `myrocks::Rdb_sst_info::put()` on line 150. 2771. 2772. while ((rc2 = rdb_merge.next(&merge_key, &merge_val)) == 0) { 2773. if ((rc2 = sst_info->put(merge_key, merge_val)) != 0) { ^ 2774. rc = rc2; 2775. #2122 storage/rocksdb/ha_rocksdb.cc:3215: error: Unnecessary Copy Intermediate variable `&s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 3213. s = m_rocksdb_tx->Prepare(); 3214. if (!s.ok()) { 3215. rdb_handle_io_error(s, RDB_IO_ERROR_TX_COMMIT); ^ 3216. return false; 3217. } #2123 storage/rocksdb/ha_rocksdb.cc:3235: error: Unnecessary Copy Intermediate variable `&s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 3233. s = m_rocksdb_tx->Commit(); 3234. if (!s.ok()) { 3235. rdb_handle_io_error(s, RDB_IO_ERROR_TX_COMMIT); ^ 3236. res = true; 3237. goto error; #2124 storage/rocksdb/ha_rocksdb.cc:3576: error: Unnecessary Copy Intermediate variable `&s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 3574. s = rdb->Write(write_opts, optimize, m_batch->GetWriteBatch()); 3575. if (!s.ok()) { 3576. rdb_handle_io_error(s, RDB_IO_ERROR_TX_COMMIT); ^ 3577. res = true; 3578. goto error; #2125 storage/rocksdb/ha_rocksdb.cc:3942: error: Uninitialized Value `src.gtrid_length` is read without initialization during the call to `myrocks::rdb_xid_to_string()`. 3940. XID xid; 3941. thd_get_xid(thd, reinterpret_cast(&xid)); 3942. if (!tx->prepare(rdb_xid_to_string(xid))) { ^ 3943. return HA_EXIT_FAILURE; 3944. } #2126 storage/rocksdb/ha_rocksdb.cc:4056: error: Dead Store The value written to `&offset` is never used. 4054. offset += RDB_GTRID_SZ; 4055. dst->bqual_length = src.at(offset); 4056. offset += RDB_BQUAL_SZ; ^ 4057. 4058. DBUG_ASSERT(dst->gtrid_length >= 0 && dst->gtrid_length <= MAXGTRIDSIZE); #2127 storage/rocksdb/ha_rocksdb.cc:4401: error: Null Dereference `cfh` could be null (from the call to `myrocks::Rdb_cf_manager::get_cf()` on line 4400) and is dereferenced. 4399. 4400. rocksdb::ColumnFamilyHandle *cfh = cf_manager.get_cf(txn.m_cf_id); 4401. txn_data.cf_name = cfh->GetName(); ^ 4402. 4403. txn_data.waiting_key = #2128 storage/rocksdb/ha_rocksdb.cc:4429: error: Uninitialized Value `__param_0.deadlock_time` is read without initialization during the call to `myrocks::Rdb_deadlock_info::Rdb_deadlock_info()`. 4427. deadlock_info.deadlock_time = path_entry.deadlock_time; 4428. } 4429. return deadlock_info; ^ 4430. } 4431. #2129 storage/rocksdb/ha_rocksdb.cc:4583: error: Unnecessary Copy Intermediate `&waiting_key` is copied into field `waiting_key` but is not modified afterwards. Rather than copying into the field, move into it instead. 4581. {rdb_trx->GetName(), rdb_trx->GetID(), tx_impl->get_write_count(), 4582. tx_impl->get_lock_count(), tx_impl->get_timeout_sec(), 4583. state_it->second, waiting_key, waiting_cf_id, is_replication, ^ 4584. 0, /* skip_trx_api */ 4585. tx_impl->is_tx_read_only(), rdb_trx->IsDeadlockDetect(), #2130 storage/rocksdb/ha_rocksdb.cc:4583: error: Uninitialized Value `waiting_cf_id` is read without initialization. 4581. {rdb_trx->GetName(), rdb_trx->GetID(), tx_impl->get_write_count(), 4582. tx_impl->get_lock_count(), tx_impl->get_timeout_sec(), 4583. state_it->second, waiting_key, waiting_cf_id, is_replication, ^ 4584. 0, /* skip_trx_api */ 4585. tx_impl->is_tx_read_only(), rdb_trx->IsDeadlockDetect(), #2131 storage/rocksdb/ha_rocksdb.cc:4586: error: Unnecessary Copy Intermediate `&query_str` is copied into field `query_str` but is not modified afterwards. Rather than copying into the field, move into it instead. 4584. 0, /* skip_trx_api */ 4585. tx_impl->is_tx_read_only(), rdb_trx->IsDeadlockDetect(), 4586. tx_impl->num_ongoing_bulk_load(), thread_id, query_str}); ^ 4587. } 4588. } #2132 storage/rocksdb/ha_rocksdb.cc:5989: error: Unnecessary Copy Intermediate variable `&s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 5987. rdb_persist_corruption_marker(); 5988. } 5989. rdb_handle_io_error(s, RDB_IO_ERROR_GENERAL); ^ 5990. } 5991. return false; #2133 storage/rocksdb/ha_rocksdb.cc:7667: error: Dead Store The value written to `&str` is never used. 7665. 7666. // Now check for '(' again 7667. str = rdb_check_next_token(&my_charset_bin, str, "(", &success); ^ 7668. } 7669. #2134 storage/rocksdb/ha_rocksdb.cc:7940: error: Dead Store The value written to `&res` is never used. 7938. bool ha_rocksdb::check_keyread_allowed(uint inx, uint part, 7939. bool all_parts) const { 7940. bool res = true; ^ 7941. KEY *const key_info = &table_share->key_info[inx]; 7942. #2135 storage/rocksdb/ha_rocksdb.cc:8816: error: Uninitialized Value `row_checksums_at_start` is read without initialization. 8814. sql_print_verbose_info("CHECKTABLE %s: Checking table %s", table_name, 8815. table_name); 8816. ha_rows UNINIT_VAR(row_checksums_at_start); // set/used iff first_index==true ^ 8817. ha_rows row_checksums = ha_rows(-1); 8818. bool first_index = true; #2136 storage/rocksdb/ha_rocksdb.cc:9836: error: Dead Store The value written to `&user_defined_key_parts` is never used. 9834. KEY *key_info = nullptr; 9835. uint n_null_fields = 0; 9836. uint user_defined_key_parts = 1; ^ 9837. 9838. key_info = &table->key_info[key_id]; #2137 storage/rocksdb/ha_rocksdb.cc:13360: error: Unnecessary Copy Intermediate variable `&cache_set` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 13358. dbs.push_back(rdb); 13359. std::map temp_usage_by_type; 13360. rocksdb::MemoryUtil::GetApproximateMemoryUsageByType(dbs, cache_set, ^ 13361. &temp_usage_by_type); 13362. memory_stats.memtable_total = #2138 storage/rocksdb/ha_rocksdb.cc:14285: error: Use After Lifetime The call to `myrocks::Rdb_transaction::finish_bulk_load` ends up calling `rocksdb::WritableFileWriter::Close` (after 13 more calls) and may trigger the following issue: call to `myrocks::Rdb_transaction::finish_bulk_load()` eventually accesses `&interim` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended during the call to `myrocks::Rdb_transaction::finish_bulk_load()` on line 150. 14283. if (tx != nullptr) { 14284. bool is_critical_error; 14285. const int rc = tx->finish_bulk_load(&is_critical_error); ^ 14286. if (rc != 0 && is_critical_error) { 14287. // NO_LINT_DEBUG #2139 storage/rocksdb/ha_rocksdb.h:1046: error: Unnecessary Copy Intermediate `added_indexes` is copied into field `m_added_indexes` but is not modified afterwards. Rather than copying into the field, move into it instead. 1044. m_old_n_keys(old_n_keys), 1045. m_new_n_keys(new_n_keys), 1046. m_added_indexes(added_indexes), ^ 1047. m_dropped_index_ids(dropped_index_ids), 1048. m_n_added_keys(n_added_keys), #2140 storage/rocksdb/ha_rocksdb.h:1047: error: Unnecessary Copy Intermediate `dropped_index_ids` is copied into field `m_dropped_index_ids` but is not modified afterwards. Rather than copying into the field, move into it instead. 1045. m_new_n_keys(new_n_keys), 1046. m_added_indexes(added_indexes), 1047. m_dropped_index_ids(dropped_index_ids), ^ 1048. m_n_added_keys(n_added_keys), 1049. m_n_dropped_keys(n_dropped_keys), #2141 storage/rocksdb/logger.h:65: error: Unnecessary Copy Assignment from Const `logger` is copy assigned into field `m_logger` but is not modified afterwards. Rather than copying into the field, first remove `const` qualifier from the source and then move into it instead. 63. 64. void SetRocksDBLogger(const std::shared_ptr logger) { 65. m_logger = logger; ^ 66. } 67. #2142 storage/rocksdb/rdb_cf_options.cc:310: error: Unnecessary Copy Assignment `&configs` is copy assigned into field `m_name_map` but is not modified afterwards. Rather than copying into the field, move into it instead. 308. 309. // Everything checked out - make the map live 310. m_name_map = configs; ^ 311. 312. return true; #2143 storage/rocksdb/rdb_datadic.cc:313: error: Unnecessary Copy Intermediate `_stats` is copied into field `m_stats` but is not modified afterwards. Rather than copying into the field, move into it instead. 311. m_is_per_partition_cf(is_per_partition_cf_arg), 312. m_name(_name), 313. m_stats(_stats), ^ 314. m_index_flags_bitmap(index_flags_bitmap), 315. m_ttl_rec_offset(ttl_rec_offset), #2144 storage/rocksdb/rdb_datadic.cc:781: error: Unnecessary Copy copied variable `partition_name` is not modified after it is copied from `myrocks::Rdb_tbl_def::base_partition()` on line 781. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 779. std::string search_str_part; 780. if (IF_PARTITIONING(table_arg->part_info,nullptr) != nullptr) { 781. std::string partition_name = tbl_def_arg->base_partition(); ^ 782. DBUG_ASSERT(!partition_name.empty()); 783. search_str_part = gen_qualifier_for_table(qualifier, partition_name); #2145 storage/rocksdb/rdb_datadic.cc:1190: error: Uninitialized Value `covered_bits` is read without initialization during the call to `my_bitmap_init()`. 1188. MY_BITMAP covered_bitmap; 1189. my_bitmap_map covered_bits; 1190. my_bitmap_init(&covered_bitmap, &covered_bits, MAX_REF_PARTS, false); ^ 1191. covered_bits = rdb_netbuf_to_uint16((const uchar *)unpack_header + 1192. sizeof(RDB_UNPACK_COVERED_DATA_TAG) + #2146 storage/rocksdb/rdb_datadic.cc:1359: error: Uninitialized Value `covered_bits` is read without initialization during the call to `my_bitmap_init()`. 1357. my_bitmap_map covered_bits; 1358. uint curr_bitmap_pos = 0; 1359. my_bitmap_init(&covered_bitmap, &covered_bits, MAX_REF_PARTS, false); ^ 1360. 1361. for (uint i = 0; i < n_key_parts; i++) { #2147 storage/rocksdb/rdb_datadic.cc:1664: error: Uninitialized Value `covered_bits` is read without initialization during the call to `my_bitmap_init()`. 1662. has_unpack_info && (unpack_header[0] == RDB_UNPACK_COVERED_DATA_TAG); 1663. if (has_covered_bitmap) { 1664. my_bitmap_init(&covered_bitmap, &covered_bits, MAX_REF_PARTS, false); ^ 1665. covered_bits = rdb_netbuf_to_uint16((const uchar *)unpack_header + 1666. sizeof(RDB_UNPACK_COVERED_DATA_TAG) + #2148 storage/rocksdb/rdb_datadic.cc:3055: error: Dead Store The value written to `&MAX_MULTI_BYTE_CHAR_SIZE` is never used. 3053. // Upper bound of how many bytes can be occupied by multi-byte form of a 3054. // character in any charset. 3055. const int MAX_MULTI_BYTE_CHAR_SIZE = 4; ^ 3056. DBUG_ASSERT(cs->mbmaxlen <= MAX_MULTI_BYTE_CHAR_SIZE); 3057. #2149 storage/rocksdb/rdb_datadic.cc:3561: error: Unnecessary Copy copied variable `cf_name` is not modified after it is copied from `rocksdb::ColumnFamilyHandle::GetName()` on line 3561. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 3559. */ 3560. uint existing_cf_flags; 3561. const std::string cf_name = kd.get_cf()->GetName(); ^ 3562. 3563. if (dict->get_cf_flags(cf_id, &existing_cf_flags)) { #2150 storage/rocksdb/rdb_datadic.cc:3662: error: Uninitialized Value `len` is read without initialization. 3660. uint offset = calculate_index_flag_offset(m_index_flags_bitmap, flag, &len); 3661. DBUG_ASSERT(offset + len <= buf->get_current_pos()); 3662. memcpy(buf->ptr() + offset, val, len); ^ 3663. } 3664. #2151 storage/rocksdb/rdb_datadic.cc:4289: error: Unnecessary Copy copied variable `src` is not modified after it is copied from `std::__detail::_Node_const_iterator::operator*()` on line 4289. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 4287. const std::unordered_map &stats) { 4288. mysql_rwlock_wrlock(&m_rwlock); 4289. for (auto src : stats) { ^ 4290. const auto &keydef = find(src.second.m_gl_index_id); 4291. if (keydef) { #2152 storage/rocksdb/rdb_datadic.cc:4526: error: Dead Store The value written to `&RDB_MAX_BINLOG_INFO_LEN` is never used. 4524. if (binlog_name && binlog_pos) { 4525. // max binlog length (512) + binlog pos (4) + binlog gtid (57) < 1024 4526. const size_t RDB_MAX_BINLOG_INFO_LEN = 1024; ^ 4527. Rdb_buf_writer value_writer; 4528. #2153 storage/rocksdb/rdb_datadic.cc:4652: error: Dead Store The value written to `&pack_len` is never used. 4650. memcpy(binlog_gtid, value + pack_len, binlog_gtid_len); 4651. binlog_gtid[binlog_gtid_len] = '\0'; 4652. pack_len += binlog_gtid_len; ^ 4653. } 4654. } #2154 storage/rocksdb/rdb_datadic.cc:4793: error: Unnecessary Copy Intermediate variable `&s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 4791. res = !s.ok(); // we return true when something failed 4792. if (res) { 4793. rdb_handle_io_error(s, RDB_IO_ERROR_DICT_COMMIT); ^ 4794. } 4795. batch->Clear(); #2155 storage/rocksdb/rdb_datadic.cc:4890: error: Dead Store The value written to `&error` is never used. 4888. RDB_SIZEOF_INDEX_FLAGS + 4889. ROCKSDB_SIZEOF_TTL_RECORD) { 4890. error = true; ^ 4891. break; 4892. } #2156 storage/rocksdb/rdb_datadic.cc:4908: error: Dead Store The value written to `&error` is never used. 4906. RDB_SIZEOF_INDEX_TYPE + RDB_SIZEOF_KV_VERSION + 4907. ROCKSDB_SIZEOF_TTL_RECORD) { 4908. error = true; ^ 4909. break; 4910. } #2157 storage/rocksdb/rdb_datadic.cc:4933: error: Dead Store The value written to `&error` is never used. 4931. 4932. default: 4933. error = true; ^ 4934. break; 4935. } #2158 storage/rocksdb/rdb_i_s.cc:79: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_cfstats_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 77. 78. 79. static ST_FIELD_INFO rdb_i_s_cfstats_fields_info[] = { ^ 80. Column("CF_NAME", Varchar(NAME_LEN + 1), NOT_NULL), 81. Column("STAT_TYPE", Varchar(NAME_LEN + 1), NOT_NULL), #2159 storage/rocksdb/rdb_i_s.cc:179: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_dbstats_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 177. } // namespace RDB_DBSTATS_FIELD 178. 179. static ST_FIELD_INFO rdb_i_s_dbstats_fields_info[] = { ^ 180. Column("STAT_TYPE", Varchar(NAME_LEN + 1), NOT_NULL), 181. Column("VALUE", SLonglong(), NOT_NULL), #2160 storage/rocksdb/rdb_i_s.cc:275: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_perf_context_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 273. } // namespace RDB_PERF_CONTEXT_FIELD 274. 275. static ST_FIELD_INFO rdb_i_s_perf_context_fields_info[] = { ^ 276. Column("TABLE_SCHEMA", Varchar(NAME_LEN + 1), NOT_NULL), 277. Column("TABLE_NAME", Varchar(NAME_LEN + 1), NOT_NULL), #2161 storage/rocksdb/rdb_i_s.cc:377: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_perf_context_global_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 375. } // namespace RDB_PERF_CONTEXT_GLOBAL_FIELD 376. 377. static ST_FIELD_INFO rdb_i_s_perf_context_global_fields_info[] = { ^ 378. Column("STAT_TYPE", Varchar(NAME_LEN + 1), NOT_NULL), 379. Column("VALUE", SLonglong(), NOT_NULL), #2162 storage/rocksdb/rdb_i_s.cc:447: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_cfoptions_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 445. } // namespace RDB_CFOPTIONS_FIELD 446. 447. static ST_FIELD_INFO rdb_i_s_cfoptions_fields_info[] = { ^ 448. Column("CF_NAME", Varchar(NAME_LEN + 1), NOT_NULL), 449. Column("OPTION_TYPE", Varchar(NAME_LEN + 1), NOT_NULL), #2163 storage/rocksdb/rdb_i_s.cc:709: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_global_info_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 707. } 708. 709. static ST_FIELD_INFO rdb_i_s_global_info_fields_info[] = { ^ 710. Column("TYPE", Varchar(FN_REFLEN + 1), NOT_NULL), 711. Column("NAME", Varchar(FN_REFLEN + 1), NOT_NULL), #2164 storage/rocksdb/rdb_i_s.cc:913: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_compact_stats_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 911. } 912. 913. static ST_FIELD_INFO rdb_i_s_compact_stats_fields_info[] = { ^ 914. Column("CF_NAME", Varchar(NAME_LEN + 1), NOT_NULL), 915. Column("LEVEL", Varchar(FN_REFLEN + 1), NOT_NULL), #2165 storage/rocksdb/rdb_i_s.cc:950: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_ddl_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 948. } // namespace RDB_DDL_FIELD 949. 950. static ST_FIELD_INFO rdb_i_s_ddl_fields_info[] = { ^ 951. Column("TABLE_SCHEMA", Varchar(NAME_LEN + 1), NOT_NULL), 952. Column("TABLE_NAME", Varchar(NAME_LEN + 1), NOT_NULL), #2166 storage/rocksdb/rdb_i_s.cc:1007: error: Unnecessary Copy copied variable `cf_name` is not modified after it is copied from `rocksdb::ColumnFamilyHandle::GetName()` on line 1007. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1005. field[RDB_DDL_FIELD::INDEX_FLAGS]->store(kd.m_index_flags_bitmap, true); 1006. 1007. std::string cf_name = kd.get_cf()->GetName(); ^ 1008. field[RDB_DDL_FIELD::CF]->store(cf_name.c_str(), cf_name.size(), 1009. system_charset_info); #2167 storage/rocksdb/rdb_i_s.cc:1165: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_sst_props_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 1163. } // namespace RDB_SST_PROPS_FIELD 1164. 1165. static ST_FIELD_INFO rdb_i_s_sst_props_fields_info[] = { ^ 1166. Column("SST_NAME", Varchar(NAME_LEN + 1), NOT_NULL), 1167. Column("COLUMN_FAMILY", SLong(), NOT_NULL), #2168 storage/rocksdb/rdb_i_s.cc:1321: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_index_file_map_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 1319. } // namespace RDB_INDEX_FILE_MAP_FIELD 1320. 1321. static ST_FIELD_INFO rdb_i_s_index_file_map_fields_info[] = { ^ 1322. /* The information_schema.rocksdb_index_file_map virtual table has four 1323. * fields: #2169 storage/rocksdb/rdb_i_s.cc:1472: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_lock_info_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 1470. } // namespace RDB_LOCKS_FIELD 1471. 1472. static ST_FIELD_INFO rdb_i_s_lock_info_fields_info[] = { ^ 1473. Column("COLUMN_FAMILY_ID", SLong(), NOT_NULL), 1474. Column("TRANSACTION_ID", SLong(), NOT_NULL), #2170 storage/rocksdb/rdb_i_s.cc:1573: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_trx_info_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 1571. } // namespace RDB_TRX_FIELD 1572. 1573. static ST_FIELD_INFO rdb_i_s_trx_info_fields_info[] = { ^ 1574. Column("TRANSACTION_ID", SLonglong(), NOT_NULL), 1575. Column("STATE", Varchar(NAME_LEN + 1), NOT_NULL), #2171 storage/rocksdb/rdb_i_s.cc:1695: error: Static Initialization Order Fiasco Initializer of myrocks::rdb_i_s_deadlock_info_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 1693. } // namespace RDB_DEADLOCK_FIELD 1694. 1695. static ST_FIELD_INFO rdb_i_s_deadlock_info_fields_info[] = { ^ 1696. Column("DEADLOCK_ID", SLonglong(), NOT_NULL), 1697. Column("TIMESTAMP", SLonglong(), NOT_NULL), #2172 storage/rocksdb/rdb_sst_info.cc:362: error: Unnecessary Copy copied variable `sst_file` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 362. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 360. DBUG_ASSERT(m_sst_file == nullptr); 361. 362. for (auto sst_file : m_committed_files) { ^ 363. // In case something went wrong attempt to delete the temporary file. 364. // If everything went fine that file will have been renamed and this #2173 storage/rocksdb/rdb_sst_info.h:191: error: Unnecessary Copy copied variable `sst_file` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 191. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 189. void reset() { 190. if (!m_committed) { 191. for (auto sst_file : m_committed_files) { ^ 192. // In case something went wrong attempt to delete the temporary file. 193. // If everything went fine that file will have been renamed and this #2174 storage/rocksdb/rdb_utils.h:320: error: Unnecessary Copy Intermediate `cleanup` is copied into field `m_cleanup` but is not modified afterwards. Rather than copying into the field, move into it instead. 318. public: 319. explicit Ensure_cleanup(std::function cleanup) 320. : m_cleanup(cleanup), m_skip_cleanup(false) {} ^ 321. 322. ~Ensure_cleanup() { #2175 storage/rocksdb/rocksdb/cache/lru_cache.cc:411: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 411. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 409. 410. // Free the entries here outside of mutex for performance reasons 411. for (auto entry : last_reference_list) { ^ 412. entry->Free(); 413. } #2176 storage/rocksdb/rocksdb/cache/lru_cache.cc:411: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 411. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 409. 410. // Free the entries here outside of mutex for performance reasons 411. for (auto entry : last_reference_list) { ^ 412. entry->Free(); 413. } #2177 storage/rocksdb/rocksdb/db/arena_wrapped_db_iter.cc:21: error: Const Refable Parameter Function parameter `prop_name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 19. namespace ROCKSDB_NAMESPACE { 20. 21. Status ArenaWrappedDBIter::GetProperty(std::string prop_name, ^ 22. std::string* prop) { 23. if (prop_name == "rocksdb.iterator.super-version-number") { #2178 storage/rocksdb/rocksdb/db/arena_wrapped_db_iter.cc:30: error: Unnecessary Copy Intermediate variable `prop_name` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 28. return Status::OK(); 29. } 30. return db_iter_->GetProperty(prop_name, prop); ^ 31. } 32. #2179 storage/rocksdb/rocksdb/db/builder.cc:68: error: Const Refable Parameter Function parameter `range_del_iters` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 66. } 67. 68. Status BuildTable( ^ 69. const std::string& dbname, Env* env, FileSystem* fs, 70. const ImmutableCFOptions& ioptions, #2180 storage/rocksdb/rocksdb/db/c.cc:1044: error: Use After Delete The call to `rocksdb::WriteBatch::operator=` may trigger the following issue: call to `rocksdb::WriteBatch::operator=()` eventually accesses `result->rep.rep_.__infer_model_backing_string` that was invalidated by `delete` during the call to `rocksdb::WriteBatch::operator=()` on line 1044. 1042. rocksdb_writebatch_t* result = rocksdb_writebatch_create(); 1043. BatchResult wal_batch = iter->rep->GetBatch(); 1044. result->rep = std::move(*wal_batch.writeBatchPtr); ^ 1045. if (seq != nullptr) { 1046. *seq = wal_batch.sequence; #2181 storage/rocksdb/rocksdb/db/c.cc:1343: error: Use After Delete The call to `rocksdb::WriteBatch::operator=` may trigger the following issue: call to `rocksdb::WriteBatch::operator=()` eventually accesses `b->rep.rep_.__infer_model_backing_string` that was invalidated by `delete` during the call to `rocksdb::WriteBatch::operator=()` on line 1343. 1341. size_t size) { 1342. rocksdb_writebatch_t* b = new rocksdb_writebatch_t; 1343. b->rep = WriteBatch(std::string(rep, size)); ^ 1344. return b; 1345. } #2182 storage/rocksdb/rocksdb/db/c.cc:2239: error: Unnecessary Copy Assignment `&db_paths` is copy assigned into field `db_paths` but is not modified afterwards. Rather than copying into the field, move into it instead. 2237. db_paths[i] = dbpath_values[i]->rep; 2238. } 2239. opt->rep.db_paths = db_paths; ^ 2240. } 2241. #2183 storage/rocksdb/rocksdb/db/c.cc:3956: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 3955. 3954. std::string tmp; 3955. Status s = txn->rep->Get(options->rep, Slice(key, klen), &tmp); 3956. if (s.ok()) { ^ 3957. *vlen = tmp.size(); 3958. result = CopyString(tmp); #2184 storage/rocksdb/rocksdb/db/c.cc:3977: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 3976. 3975. Status s = 3976. txn->rep->Get(options->rep, column_family->rep, Slice(key, klen), &tmp); 3977. if (s.ok()) { ^ 3978. *vlen = tmp.size(); 3979. result = CopyString(tmp); #2185 storage/rocksdb/rocksdb/db/c.cc:3999: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 3998. 3997. Status s = 3998. txn->rep->GetForUpdate(options->rep, Slice(key, klen), &tmp, exclusive); 3999. if (s.ok()) { ^ 4000. *vlen = tmp.size(); 4001. result = CopyString(tmp); #2186 storage/rocksdb/rocksdb/db/c.cc:4019: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 4018. 4017. Status s = txn->rep->GetForUpdate(options->rep, column_family->rep, 4018. Slice(key, klen), &tmp, exclusive); 4019. if (s.ok()) { ^ 4020. *vlen = tmp.size(); 4021. result = CopyString(tmp); #2187 storage/rocksdb/rocksdb/db/c.cc:4317: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 4316. 4315. Status s = db->rep->Get(options->rep, db->rep->DefaultColumnFamily(), 4316. Slice(key, keylen), &v->rep); 4317. if (!s.ok()) { ^ 4318. delete (v); 4319. if (!s.IsNotFound()) { #2188 storage/rocksdb/rocksdb/db/c.cc:4334: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 4333. 4332. Status s = db->rep->Get(options->rep, column_family->rep, Slice(key, keylen), 4333. &v->rep); 4334. if (!s.ok()) { ^ 4335. delete v; 4336. if (!s.IsNotFound()) { #2189 storage/rocksdb/rocksdb/db/c.cc:4410: error: Unnecessary Copy Intermediate variable `&cache_set` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 4408. std::map usage_by_type; 4409. 4410. auto status = MemoryUtil::GetApproximateMemoryUsageByType(dbs, cache_set, ^ 4411. &usage_by_type); 4412. if (SaveError(errptr, status)) { #2190 storage/rocksdb/rocksdb/db/column_family.cc:601: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 601. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 599. autovector to_delete; 600. imm_.current()->Unref(&to_delete); 601. for (MemTable* m : to_delete) { ^ 602. delete m; 603. } #2191 storage/rocksdb/rocksdb/db/column_family.cc:601: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 601. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 599. autovector to_delete; 600. imm_.current()->Unref(&to_delete); 601. for (MemTable* m : to_delete) { ^ 602. delete m; 603. } #2192 storage/rocksdb/rocksdb/db/column_family.cc:1294: error: Unnecessary Copy Assignment `&new_mutable_cf_options` is copy assigned into field `mutable_cf_options_` but is not modified afterwards. Rather than copying into the field, move into it instead. 1292. } 1293. if (s.ok()) { 1294. mutable_cf_options_ = new_mutable_cf_options; ^ 1295. mutable_cf_options_.RefreshDerivedOptions(ioptions_); 1296. } #2193 storage/rocksdb/rocksdb/db/compacted_db_impl.cc:67: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 67. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 65. values->resize(keys.size()); 66. int idx = 0; 67. for (auto* r : reader_list) { ^ 68. if (r != nullptr) { 69. PinnableSlice pinnable_val; #2194 storage/rocksdb/rocksdb/db/compaction/compaction.cc:438: error: Const Refable Parameter Function parameter `status` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 436. } 437. 438. void Compaction::ReleaseCompactionFiles(Status status) { ^ 439. MarkFilesBeingCompacted(false); 440. cfd_->compaction_picker()->ReleaseCompactionFiles(this, status); #2195 storage/rocksdb/rocksdb/db/compaction/compaction.cc:440: error: Unnecessary Copy Intermediate variable `status` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 438. void Compaction::ReleaseCompactionFiles(Status status) { 439. MarkFilesBeingCompacted(false); 440. cfd_->compaction_picker()->ReleaseCompactionFiles(this, status); ^ 441. } 442. #2196 storage/rocksdb/rocksdb/db/compaction/compaction_job.cc:274: error: Null Dereference `rocksdb::CompactionJob::SubcompactionState::current_output()` could be null (from the call to `rocksdb::CompactionJob::SubcompactionState::current_output()` on line 274) and is dereferenced. 272. for (auto it = sub_compact_states.rbegin(); it < sub_compact_states.rend(); 273. ++it) { 274. if (!it->outputs.empty() && it->current_output()->finished) { ^ 275. assert(it->current_output() != nullptr); 276. return it->current_output()->meta.largest.user_key(); #2197 storage/rocksdb/rocksdb/db/compaction/compaction_job.cc:276: error: Null Dereference `rocksdb::CompactionJob::SubcompactionState::current_output()` could be null (from the call to `rocksdb::CompactionJob::SubcompactionState::current_output()` on line 276) and is dereferenced. 274. if (!it->outputs.empty() && it->current_output()->finished) { 275. assert(it->current_output() != nullptr); 276. return it->current_output()->meta.largest.user_key(); ^ 277. } 278. } #2198 storage/rocksdb/rocksdb/db/compaction/compaction_picker.cc:160: error: Const Refable Parameter Function parameter `status` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 158. 159. // Delete this compaction from the list of running compactions. 160. void CompactionPicker::ReleaseCompactionFiles(Compaction* c, Status status) { ^ 161. UnregisterCompaction(c); 162. if (!status.ok()) { #2199 storage/rocksdb/rocksdb/db/compaction/compaction_picker.cc:1094: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 1094. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1092. } 1093. 1094. for (auto& level_file : vstorage->FilesMarkedForCompaction()) { ^ 1095. if (continuation(level_file)) { 1096. // found the compaction! #2200 storage/rocksdb/rocksdb/db/compaction/compaction_picker_level.cc:153: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 153. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 151. }; 152. 153. for (auto& level_file : vstorage_->ExpiredTtlFiles()) { ^ 154. if (continuation(level_file)) { 155. // found the compaction! #2201 storage/rocksdb/rocksdb/db/compaction/compaction_picker_level.cc:186: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 186. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 184. }; 185. 186. for (auto& level_file : vstorage_->FilesMarkedForPeriodicCompaction()) { ^ 187. if (continuation(level_file)) { 188. // found the compaction! #2202 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:671: error: Unnecessary Copy copied variable `sample_slice` is not modified after it is copied from `std::_Rb_tree_const_iterator::operator->().second` on line 671. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 669. sizeof(uint64_t) + sizeof(std::map); 670. // non-empty map, stats_history_.begin() guaranteed to exist 671. std::map sample_slice(stats_history_.begin()->second); ^ 672. for (const auto& pairs : sample_slice) { 673. size_per_slice += #2203 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:886: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 886. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 884. void DBImpl::ScheduleBgLogWriterClose(JobContext* job_context) { 885. if (!job_context->logs_to_free.empty()) { 886. for (auto l : job_context->logs_to_free) { ^ 887. AddToLogsToFreeQueue(l); 888. } #2204 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:1354: error: Unnecessary Copy copied variable `purge_file` is not modified after it is copied from `std::__detail::_Node_iterator::operator->().second` on line 1354. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1352. auto it = purge_files_.begin(); 1353. // Need to make a copy of the PurgeFilesInfo before unlocking the mutex. 1354. PurgeFileInfo purge_file = it->second; ^ 1355. 1356. const std::string& fname = purge_file.fname; #2205 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:2661: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 2661. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 2659. typedef autovector CfdList; 2660. bool CfdListContains(const CfdList& list, ColumnFamilyData* cfd) { 2661. for (const ColumnFamilyData* t : list) { ^ 2662. if (t == cfd) { 2663. return true; #2206 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:3098: error: Const Refable Parameter Function parameter `name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 3096. } 3097. 3098. Status DBImpl::DeleteFile(std::string name) { ^ 3099. uint64_t number; 3100. FileType type; #2207 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:3338: error: Unnecessary Copy copied variable `directory` is not modified after it is copied from `dir_files->first` on line 3338. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 3336. } 3337. for (const auto& dir_files : files_by_directory) { 3338. std::string directory = dir_files.first; ^ 3339. std::vector existing_files; 3340. Status s = env_->GetChildren(directory, &existing_files); #2208 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:3396: error: Dead Store The value written to `&soptions` is never used. 3394. Status DBImpl::GetDbIdentityFromIdentityFile(std::string* identity) const { 3395. std::string idfilename = IdentityFileName(dbname_); 3396. const FileOptions soptions; ^ 3397. 3398. Status s = ReadFileToString(fs_.get(), idfilename, identity); #2209 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:3509: error: Unnecessary Copy Assignment copy assigned variable `result` is not modified after it is copied from `&del` on line 3509. To avoid the copy, call `std::move` instead. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 3507. } 3508. if (result.ok() && !del.ok()) { 3509. result = del; ^ 3510. } 3511. } #2210 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:3926: error: Unnecessary Copy Intermediate variable `&arg` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 3924. arg.external_files = external_files; 3925. arg.options = ingestion_options; 3926. return IngestExternalFiles({arg}); ^ 3927. } 3928. #2211 storage/rocksdb/rocksdb/db/db_impl/db_impl.cc:4417: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 4417. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 4415. } 4416. 4417. for (const IngestedFileInfo& f : ingestion_job.files_to_ingest()) { ^ 4418. ExternalFileIngestionInfo info; 4419. info.cf_name = cfd->GetName(); #2212 storage/rocksdb/rocksdb/db/db_impl/db_impl.h:1166: error: Unnecessary Copy copied variable `__begin2` is not modified after it is copied from a source on line 1166. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1164. ~WriteContext() { 1165. superversion_context.Clean(); 1166. for (auto& m : memtables_to_free_) { ^ 1167. delete m; 1168. } #2213 storage/rocksdb/rocksdb/db/db_impl/db_impl.h:1166: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 1166. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1164. ~WriteContext() { 1165. superversion_context.Clean(); 1166. for (auto& m : memtables_to_free_) { ^ 1167. delete m; 1168. } #2214 storage/rocksdb/rocksdb/db/db_impl/db_impl.h:1215: error: Unnecessary Copy Intermediate `fn` is copied into field `fname` but is not modified afterwards. Rather than copying into the field, move into it instead. 1213. PurgeFileInfo(std::string fn, std::string d, FileType t, uint64_t num, 1214. int jid) 1215. : fname(fn), dir_to_sync(d), type(t), number(num), job_id(jid) {} ^ 1216. }; 1217. #2215 storage/rocksdb/rocksdb/db/db_impl/db_impl.h:1215: error: Unnecessary Copy Intermediate `d` is copied into field `dir_to_sync` but is not modified afterwards. Rather than copying into the field, move into it instead. 1213. PurgeFileInfo(std::string fn, std::string d, FileType t, uint64_t num, 1214. int jid) 1215. : fname(fn), dir_to_sync(d), type(t), number(num), job_id(jid) {} ^ 1216. }; 1217. #2216 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:590: error: Unnecessary Copy copied variable `listener` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 590. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 588. info.largest_seqno = file_meta->fd.largest_seqno; 589. info.flush_reason = cfd->GetFlushReason(); 590. for (auto listener : immutable_db_options_.listeners) { ^ 591. listener->OnFlushBegin(this, info); 592. } #2217 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:629: error: Unnecessary Copy copied variable `listener` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 629. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 627. info->triggered_writes_slowdown = triggered_writes_slowdown; 628. info->triggered_writes_stop = triggered_writes_stop; 629. for (auto listener : immutable_db_options_.listeners) { ^ 630. listener->OnFlushCompleted(this, *info); 631. } #2218 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:693: error: Dead Store The value written to `&next_file_number` is never used. 691. // useful for bottom level compaction in a manual compaction 692. uint64_t max_file_num_to_ignore = port::kMaxUint64; 693. uint64_t next_file_number = port::kMaxUint64; ^ 694. { 695. InstrumentedMutexLock l(&mutex_); #2219 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:1140: error: Unnecessary Copy copied variable `newf` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 1140. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1138. } 1139. } 1140. for (const auto newf : c->edit()->GetNewFiles()) { ^ 1141. const FileMetaData& meta = newf.second; 1142. const FileDescriptor& desc = meta.fd; #2220 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:1149: error: Unnecessary Copy copied variable `listener` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 1149. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1147. newf.first, file_number, meta.oldest_blob_file_number}); 1148. } 1149. for (auto listener : immutable_db_options_.listeners) { ^ 1150. listener->OnCompactionBegin(this, info); 1151. } #2221 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:1188: error: Unnecessary Copy copied variable `listener` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 1188. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1186. BuildCompactionJobInfo(cfd, c, st, compaction_job_stats, job_id, current, 1187. &info); 1188. for (auto listener : immutable_db_options_.listeners) { ^ 1189. listener->OnCompactionCompleted(this, info); 1190. } #2222 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:2073: error: Const Refable Parameter Function parameter `dir_to_sync` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 2071. } 2072. 2073. void DBImpl::SchedulePendingPurge(std::string fname, std::string dir_to_sync, ^ 2074. FileType type, uint64_t number, int job_id) { 2075. mutex_.AssertHeld(); #2223 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:2073: error: Const Refable Parameter Function parameter `fname` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 2071. } 2072. 2073. void DBImpl::SchedulePendingPurge(std::string fname, std::string dir_to_sync, ^ 2074. FileType type, uint64_t number, int job_id) { 2075. mutex_.AssertHeld(); #2224 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:2076: error: Unnecessary Copy Intermediate variable `fname` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 2074. FileType type, uint64_t number, int job_id) { 2075. mutex_.AssertHeld(); 2076. PurgeFileInfo file_info(fname, dir_to_sync, type, number, job_id); ^ 2077. purge_files_.insert({{number, std::move(file_info)}}); 2078. } #2225 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:2076: error: Unnecessary Copy Intermediate variable `dir_to_sync` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 2074. FileType type, uint64_t number, int job_id) { 2075. mutex_.AssertHeld(); 2076. PurgeFileInfo file_info(fname, dir_to_sync, type, number, job_id); ^ 2077. purge_files_.insert({{number, std::move(file_info)}}); 2078. } #2226 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:2213: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 2213. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 2211. } 2212. } 2213. for (auto cfd : column_families_not_to_flush) { ^ 2214. cfd->UnrefAndTryDelete(); 2215. } #2227 storage/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc:2213: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 2213. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 2211. } 2212. } 2213. for (auto cfd : column_families_not_to_flush) { ^ 2214. cfd->UnrefAndTryDelete(); 2215. } #2228 storage/rocksdb/rocksdb/db/db_impl/db_impl_files.cc:399: error: Dead Store The value written to `&keep` is never used. 397. } 398. 399. bool keep = true; ^ 400. switch (type) { 401. case kLogFile: #2229 storage/rocksdb/rocksdb/db/db_impl/db_impl_files.cc:606: error: Const Refable Parameter Function parameter `edit_list` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 604. } 605. 606. uint64_t PrecomputeMinLogNumberToKeep( ^ 607. VersionSet* vset, const ColumnFamilyData& cfd_to_flush, 608. autovector edit_list, #2230 storage/rocksdb/rocksdb/db/db_impl/db_impl_files.cc:620: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 620. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 618. // family being flushed (`cfd_to_flush`). 619. uint64_t cf_min_log_number_to_keep = 0; 620. for (auto& e : edit_list) { ^ 621. if (e->HasLogNumber()) { 622. cf_min_log_number_to_keep = #2231 storage/rocksdb/rocksdb/db/db_impl/db_impl_open.cc:261: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 260. 259. VersionEdit new_db; 260. Status s = SetIdentityFile(env_, dbname_); 261. if (!s.ok()) { ^ 262. return s; 263. } #2232 storage/rocksdb/rocksdb/db/db_impl/db_impl_open.cc:336: error: Unnecessary Copy copied variable `db_path` is not modified after it is copied from `p->path` on line 336. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 334. data_dirs_.clear(); 335. for (auto& p : data_paths) { 336. const std::string db_path = p.path; ^ 337. if (db_path == dbname) { 338. data_dirs_.emplace_back(nullptr); #2233 storage/rocksdb/rocksdb/db/db_impl/db_impl_open.cc:1495: error: Dead Store The value written to `&write_options` is never used. 1493. WriteBatch empty_batch; 1494. WriteBatchInternal::SetSequence(&empty_batch, recovered_seq); 1495. WriteOptions write_options; ^ 1496. uint64_t log_used, log_size; 1497. log::Writer* log_writer = impl->logs_.back().writer; #2234 storage/rocksdb/rocksdb/db/db_impl/db_impl_secondary.h:36: error: Unnecessary Copy Intermediate variable `info_log` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 34. // to be skipped instead of propagating bad information (like overly 35. // large sequence numbers). 36. reader_ = new log::FragmentBufferedReader(info_log, std::move(file_reader), ^ 37. reporter, true /*checksum*/, 38. log_number); #2235 storage/rocksdb/rocksdb/db/db_impl/db_impl_write.cc:1183: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 1183. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1181. assert(immutable_db_options_.atomic_flush); 1182. auto seq = versions_->LastSequence(); 1183. for (auto cfd : cfds) { ^ 1184. cfd->imm()->AssignAtomicFlushSeq(seq); 1185. } #2236 storage/rocksdb/rocksdb/db/db_impl/db_impl_write.cc:1484: error: Unnecessary Copy copied variable `__end3` is not modified after it is copied from a source on line 1484. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1482. kPersistentStatsColumnFamilyName); 1483. if (cfd_stats != nullptr && !cfd_stats->mem()->IsEmpty()) { 1484. for (ColumnFamilyData* cfd : *cfds) { ^ 1485. if (cfd == cfd_stats) { 1486. // stats CF already included in cfds #2237 storage/rocksdb/rocksdb/db/db_iter.cc:84: error: Const Refable Parameter Function parameter `prop_name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 82. } 83. 84. Status DBIter::GetProperty(std::string prop_name, std::string* prop) { ^ 85. if (prop == nullptr) { 86. return Status::InvalidArgument("prop is nullptr"); #2238 storage/rocksdb/rocksdb/db/db_iter.cc:90: error: Unnecessary Copy Intermediate variable `prop_name` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 88. if (prop_name == "rocksdb.iterator.super-version-number") { 89. // First try to pass the value returned from inner iterator. 90. return iter_.iter()->GetProperty(prop_name, prop); ^ 91. } else if (prop_name == "rocksdb.iterator.is-key-pinned") { 92. if (valid_) { #2239 storage/rocksdb/rocksdb/db/error_handler.cc:300: error: Unnecessary Copy Intermediate variable `&old_bg_error` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 298. recovery_in_prog_ = false; 299. EventHelpers::NotifyOnErrorRecoveryCompleted(db_options_.listeners, 300. old_bg_error, db_mutex_); ^ 301. } 302. return recovery_error_; #2240 storage/rocksdb/rocksdb/db/event_helpers.cc:202: error: Const Refable Parameter Function parameter `old_bg_error` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 200. } 201. 202. void EventHelpers::NotifyOnErrorRecoveryCompleted( ^ 203. const std::vector>& listeners, 204. Status old_bg_error, InstrumentedMutex* db_mutex) { #2241 storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc:279: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 279. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 277. stream.StartArray(); 278. 279. for (IngestedFileInfo& f : files_to_ingest_) { ^ 280. InternalStats::CompactionStats stats(CompactionReason::kExternalSstIngestion, 1); 281. stats.micros = total_time; #2242 storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc:279: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 279. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 277. stream.StartArray(); 278. 279. for (IngestedFileInfo& f : files_to_ingest_) { ^ 280. InternalStats::CompactionStats stats(CompactionReason::kExternalSstIngestion, 1); 281. stats.micros = total_time; #2243 storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc:330: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 330. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 328. // We failed to add the files to the database 329. // remove all the files we copied 330. for (IngestedFileInfo& f : files_to_ingest_) { ^ 331. if (f.internal_file_path.empty()) { 332. continue; #2244 storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc:345: error: Unnecessary Copy copied variable `__end3` is not modified after it is copied from a source on line 345. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 343. } else if (status.ok() && ingestion_options_.move_files) { 344. // The files were moved and added successfully, remove original file links 345. for (IngestedFileInfo& f : files_to_ingest_) { ^ 346. Status s = env_->DeleteFile(f.external_file_path); 347. if (!s.ok()) { #2245 storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc:366: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 365. 364. Status status = fs_->GetFileSize(external_file, IOOptions(), 365. &file_to_ingest->file_size, nullptr); 366. if (!status.ok()) { ^ 367. return status; 368. } #2246 storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc:377: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 376. 375. status = fs_->NewRandomAccessFile(external_file, env_options_, 376. &sst_file, nullptr); 377. if (!status.ok()) { ^ 378. return status; 379. } #2247 storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc:388: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 387. 386. env_options_, cfd_->internal_comparator()), 387. std::move(sst_file_reader), file_to_ingest->file_size, &table_reader); 388. if (!status.ok()) { ^ 389. return status; 390. } #2248 storage/rocksdb/rocksdb/db/file_indexer.cc:143: error: Const Refable Parameter Function parameter `cmp_op` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 141. } 142. 143. void FileIndexer::CalculateLB( ^ 144. const std::vector& upper_files, 145. const std::vector& lower_files, IndexLevel* index_level, #2249 storage/rocksdb/rocksdb/db/file_indexer.cc:143: error: Const Refable Parameter Function parameter `set_index` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 141. } 142. 143. void FileIndexer::CalculateLB( ^ 144. const std::vector& upper_files, 145. const std::vector& lower_files, IndexLevel* index_level, #2250 storage/rocksdb/rocksdb/db/file_indexer.cc:180: error: Const Refable Parameter Function parameter `cmp_op` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 178. } 179. 180. void FileIndexer::CalculateRB( ^ 181. const std::vector& upper_files, 182. const std::vector& lower_files, IndexLevel* index_level, #2251 storage/rocksdb/rocksdb/db/file_indexer.cc:180: error: Const Refable Parameter Function parameter `set_index` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 178. } 179. 180. void FileIndexer::CalculateRB( ^ 181. const std::vector& upper_files, 182. const std::vector& lower_files, IndexLevel* index_level, #2252 storage/rocksdb/rocksdb/db/flush_job.cc:317: error: Unnecessary Copy copied variable `__begin2` is not modified after it is copied from a source on line 317. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 315. uint64_t total_data_size = 0; 316. size_t total_memory_usage = 0; 317. for (MemTable* m : mems_) { ^ 318. ROCKS_LOG_INFO( 319. db_options_.info_log, #2253 storage/rocksdb/rocksdb/db/flush_job.cc:317: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 317. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 315. uint64_t total_data_size = 0; 316. size_t total_memory_usage = 0; 317. for (MemTable* m : mems_) { ^ 318. ROCKS_LOG_INFO( 319. db_options_.info_log, #2254 storage/rocksdb/rocksdb/db/forward_iterator.cc:563: error: Const Refable Parameter Function parameter `prop_name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 561. } 562. 563. Status ForwardIterator::GetProperty(std::string prop_name, std::string* prop) { ^ 564. assert(prop != nullptr); 565. if (prop_name == "rocksdb.iterator.super-version-number") { #2255 storage/rocksdb/rocksdb/db/import_column_family_job.cc:33: error: Uninitialized Value `__param_0.global_seqno_offset` is read without initialization during the call to `rocksdb::autovector::push_back()`. 31. return status; 32. } 33. files_to_import_.push_back(file_to_import); ^ 34. } 35. #2256 storage/rocksdb/rocksdb/db/import_column_family_job.cc:173: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 173. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 171. if (!status.ok()) { 172. // We failed to add files to the database remove all the files we copied. 173. for (const auto& f : files_to_import_) { ^ 174. const auto s = 175. fs_->DeleteFile(f.internal_file_path, IOOptions(), nullptr); #2257 storage/rocksdb/rocksdb/db/import_column_family_job.cc:184: error: Unnecessary Copy copied variable `__end3` is not modified after it is copied from a source on line 184. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 182. } else if (status.ok() && import_options_.move_files) { 183. // The files were moved and added successfully, remove original file links 184. for (IngestedFileInfo& f : files_to_import_) { ^ 185. const auto s = 186. fs_->DeleteFile(f.external_file_path, IOOptions(), nullptr); #2258 storage/rocksdb/rocksdb/db/import_column_family_job.cc:206: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 205. 204. Status status = fs_->GetFileSize(external_file, IOOptions(), 205. &file_to_import->file_size, nullptr); 206. if (!status.ok()) { ^ 207. return status; 208. } #2259 storage/rocksdb/rocksdb/db/import_column_family_job.cc:217: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 216. 215. status = fs_->NewRandomAccessFile(external_file, env_options_, 216. &sst_file, nullptr); 217. if (!status.ok()) { ^ 218. return status; 219. } #2260 storage/rocksdb/rocksdb/db/import_column_family_job.cc:228: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 227. 226. env_options_, cfd_->internal_comparator()), 227. std::move(sst_file_reader), file_to_import->file_size, &table_reader); 228. if (!status.ok()) { ^ 229. return status; 230. } #2261 storage/rocksdb/rocksdb/db/internal_stats.cc:351: error: Static Initialization Order Fiasco Initializer of rocksdb::InternalStats::ppt_name_to_info accesses global variable from a different translation unit: rocksdb::DB::Properties::kOptionsStatistics|. 349. rocksdb_prefix + options_statistics; 350. 351. const std::unordered_map ^ 352. InternalStats::ppt_name_to_info = { 353. {DB::Properties::kNumFilesAtLevelPrefix, #2262 storage/rocksdb/rocksdb/db/internal_stats.cc:1394: error: Unnecessary Copy Assignment `&compaction_stats_sum` is copy assigned into field `comp_stats` but is not modified afterwards. Rather than copying into the field, move into it instead. 1392. cf_stats_snapshot_.ingest_l0_files_addfile = ingest_l0_files_addfile; 1393. cf_stats_snapshot_.ingest_keys_addfile = ingest_keys_addfile; 1394. cf_stats_snapshot_.comp_stats = compaction_stats_sum; ^ 1395. cf_stats_snapshot_.stall_count = total_stall_count; 1396. } #2263 storage/rocksdb/rocksdb/db/job_context.h:81: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 81. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 79. #if !defined(ROCKSDB_LITE) && !defined(ROCKSDB_DISABLE_STALL_NOTIFICATION) 80. // notify listeners on changed write stall conditions 81. for (auto& notif : write_stall_notifications) { ^ 82. for (auto& listener : notif.immutable_cf_options->listeners) { 83. listener->OnStallConditionsChanged(notif.write_stall_info); #2264 storage/rocksdb/rocksdb/db/job_context.h:89: error: Unnecessary Copy copied variable `__begin2` is not modified after it is copied from a source on line 89. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 87. #endif // !ROCKSDB_LITE 88. // free superversions 89. for (auto s : superversions_to_free) { ^ 90. delete s; 91. } #2265 storage/rocksdb/rocksdb/db/job_context.h:89: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 89. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 87. #endif // !ROCKSDB_LITE 88. // free superversions 89. for (auto s : superversions_to_free) { ^ 90. delete s; 91. } #2266 storage/rocksdb/rocksdb/db/job_context.h:201: error: Unnecessary Copy copied variable `__begin2` is not modified after it is copied from a source on line 201. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 199. } 200. // free pending memtables 201. for (auto m : memtables_to_free) { ^ 202. delete m; 203. } #2267 storage/rocksdb/rocksdb/db/job_context.h:201: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 201. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 199. } 200. // free pending memtables 201. for (auto m : memtables_to_free) { ^ 202. delete m; 203. } #2268 storage/rocksdb/rocksdb/db/job_context.h:204: error: Unnecessary Copy copied variable `__begin2` is not modified after it is copied from a source on line 204. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 202. delete m; 203. } 204. for (auto l : logs_to_free) { ^ 205. delete l; 206. } #2269 storage/rocksdb/rocksdb/db/job_context.h:204: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 204. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 202. delete m; 203. } 204. for (auto l : logs_to_free) { ^ 205. delete l; 206. } #2270 storage/rocksdb/rocksdb/db/log_reader.cc:29: error: Unnecessary Copy Intermediate `info_log` is copied into field `info_log_` but is not modified afterwards. Rather than copying into the field, move into it instead. 27. std::unique_ptr&& _file, 28. Reporter* reporter, bool checksum, uint64_t log_num) 29. : info_log_(info_log), ^ 30. file_(std::move(_file)), 31. reporter_(reporter), #2271 storage/rocksdb/rocksdb/db/log_reader.cc:237: error: Use After Lifetime The call to `rocksdb::SequentialFileReader::Read` may trigger the following issue: call to `rocksdb::SequentialFileReader::Read()` eventually accesses memory that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended during the call to `rocksdb::SequentialFileReader::Read()` on line 49. 235. 236. Slice read_buffer; 237. Status status = file_->Read(remaining, &read_buffer, ^ 238. backing_store_ + eof_offset_); 239. #2272 storage/rocksdb/rocksdb/db/log_reader.h:165: error: Unnecessary Copy Intermediate variable `info_log` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 163. std::unique_ptr&& _file, 164. Reporter* reporter, bool checksum, uint64_t log_num) 165. : Reader(info_log, std::move(_file), reporter, checksum, log_num), ^ 166. fragments_(), 167. in_fragmented_record_(false) {} #2273 storage/rocksdb/rocksdb/db/memtable.cc:135: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 135. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 133. ROCKSDB_NAMESPACE::ApproximateMemoryUsage(insert_hints_)}; 134. size_t total_usage = 0; 135. for (size_t usage : usages) { ^ 136. // If usage + total_usage >= kMaxSizet, return kMaxSizet. 137. // the following variation is to avoid numeric overflow. #2274 storage/rocksdb/rocksdb/db/memtable_list.cc:438: error: Unnecessary Copy copied variable `it` is not modified after it is copied from a source on line 438. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 436. autovector memtables_to_flush; 437. // enumerate from the last (earliest) element to see how many batch finished 438. for (auto it = memlist.rbegin(); it != memlist.rend(); ++it) { ^ 439. MemTable* m = *it; 440. if (!m->flush_completed_) { #2275 storage/rocksdb/rocksdb/db/memtable_list.cc:617: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 617. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 615. // if the performance has some problem. 616. bool should_skip = false; 617. for (MemTable* m_to_flush : memtables_to_flush) { ^ 618. if (m == m_to_flush) { 619. should_skip = true; #2276 storage/rocksdb/rocksdb/db/memtable_list.cc:675: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 675. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 673. autovector> edit_lists; 674. uint32_t num_entries = 0; 675. for (const auto mems : mems_list) { ^ 676. assert(mems != nullptr); 677. autovector edits; #2277 storage/rocksdb/rocksdb/db/memtable_list.cc:675: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 675. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 673. autovector> edit_lists; 674. uint32_t num_entries = 0; 675. for (const auto mems : mems_list) { ^ 676. assert(mems != nullptr); 677. autovector edits; #2278 storage/rocksdb/rocksdb/db/memtable_list.cc:686: error: Unnecessary Copy copied variable `__begin2` is not modified after it is copied from a source on line 686. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 684. // exceeds 1. 685. if (cfds.size() > 1) { 686. for (auto& edits : edit_lists) { ^ 687. assert(edits.size() == 1); 688. edits[0]->MarkAtomicGroup(--num_entries); #2279 storage/rocksdb/rocksdb/db/memtable_list.cc:686: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 686. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 684. // exceeds 1. 685. if (cfds.size() > 1) { 686. for (auto& edits : edit_lists) { ^ 687. assert(edits.size() == 1); 688. edits[0]->MarkAtomicGroup(--num_entries); #2280 storage/rocksdb/rocksdb/db/memtable_list.cc:750: error: Unnecessary Copy copied variable `it` is not modified after it is copied from a source on line 750. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 748. auto& memlist = current_->memlist_; 749. autovector old_memtables; 750. for (auto it = memlist.rbegin(); it != memlist.rend(); ++it) { ^ 751. MemTable* mem = *it; 752. if (mem->GetNextLogNumber() > log_number) { #2281 storage/rocksdb/rocksdb/db/memtable_list.cc:758: error: Unnecessary Copy copied variable `it` is not modified after it is copied from a source on line 758. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 756. } 757. 758. for (auto it = old_memtables.begin(); it != old_memtables.end(); ++it) { ^ 759. MemTable* mem = *it; 760. current_->Remove(mem, to_delete); #2282 storage/rocksdb/rocksdb/db/range_tombstone_fragmenter.cc:130: error: Unnecessary Copy copied variable `__end4` is not modified after it is copied from a source on line 130. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 128. // Drop all tombstone seqnums that are not preserved by a snapshot. 129. SequenceNumber next_snapshot = kMaxSequenceNumber; 130. for (auto seq : seqnums_to_flush) { ^ 131. if (seq <= next_snapshot) { 132. // This seqnum is visible by a lower snapshot. #2283 storage/rocksdb/rocksdb/db/repair.cc:118: error: Uninitialized Value `__param_0.io_options.prio` is read without initialization during the call to `rocksdb::VersionSet::VersionSet()`. 116. wb_(db_options_.db_write_buffer_size), 117. wc_(db_options_.delayed_write_rate), 118. vset_(dbname_, &immutable_db_options_, env_options_, ^ 119. raw_table_cache_.get(), &wb_, &wc_, 120. /*block_cache_tracer=*/nullptr), #2284 storage/rocksdb/rocksdb/db/repair.cc:175: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 174. 173. Status Run() { 174. Status status = env_->LockFile(LockFileName(dbname_), &db_lock_); 175. if (!status.ok()) { ^ 176. return status; 177. } #2285 storage/rocksdb/rocksdb/db/repair.cc:349: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 348. 347. Status status = env_->NewSequentialFile( 348. logname, &lfile, env_->OptimizeForLogRead(env_options_)); 349. if (!status.ok()) { ^ 350. return status; 351. } #2286 storage/rocksdb/rocksdb/db/table_properties_collector.h:90: error: Unnecessary Copy Intermediate `user_collector_factory` is copied into field `user_collector_factory_` but is not modified afterwards. Rather than copying into the field, move into it instead. 88. explicit UserKeyTablePropertiesCollectorFactory( 89. std::shared_ptr user_collector_factory) 90. : user_collector_factory_(user_collector_factory) {} ^ 91. virtual IntTblPropCollector* CreateIntTblPropCollector( 92. uint32_t column_family_id) override { #2287 storage/rocksdb/rocksdb/db/transaction_log_impl.cc:49: error: Uninitialized Value `__param_0.io_options.type` is read without initialization during the call to `rocksdb::FileSystem::OptimizeForLogRead()`. 47. std::string fname; 48. Status s; 49. EnvOptions optimized_env_options = fs->OptimizeForLogRead(soptions_); ^ 50. if (log_file->Type() == kArchivedLogFile) { 51. fname = ArchivedLogFileName(dir_, log_file->LogNumber()); #2288 storage/rocksdb/rocksdb/db/version_edit.h:229: error: Unnecessary Copy Intermediate `_fd` is copied into field `fd` but is not modified afterwards. Rather than copying into the field, move into it instead. 227. FdWithKeyRange(FileDescriptor _fd, Slice _smallest_key, Slice _largest_key, 228. FileMetaData* _file_metadata) 229. : fd(_fd), ^ 230. file_metadata(_file_metadata), 231. smallest_key(_smallest_key), #2289 storage/rocksdb/rocksdb/db/version_set.cc:668: error: Dead Store The value written to `&start_index` is never used. 666. // any level. Otherwise, it only occurs at Level-0 (since Put/Deletes 667. // are always compacted into a single entry). 668. int32_t start_index = -1; ^ 669. current_level_range_ = 670. MultiGetRange(*range_, range_->begin(), range_->end()); #2290 storage/rocksdb/rocksdb/db/version_set.cc:964: error: Unnecessary Copy copied variable `file_meta` is not modified after it is copied from `this->flevel_->files[this->file_index_]` on line 964. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 962. InternalIterator* NewFileIterator() { 963. assert(file_index_ < flevel_->num_files); 964. auto file_meta = flevel_->files[file_index_]; ^ 965. if (should_sample_) { 966. sample_file_read_inc(file_meta.file_metadata); #2291 storage/rocksdb/rocksdb/db/version_set.cc:1424: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 1424. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 1422. size_t Version::GetMemoryUsageByTableReaders() { 1423. size_t total_usage = 0; 1424. for (auto& file_level : storage_info_.level_files_brief_) { ^ 1425. for (size_t i = 0; i < file_level.num_files; i++) { 1426. total_usage += cfd_->table_cache()->GetMemoryUsageByTableReader( #2292 storage/rocksdb/rocksdb/db/version_set.cc:1820: error: Uninitialized Value `__param_0.user_key_return_count` is read without initialization during the call to `rocksdb::PerfContextByLevel::operator=()`. 1818. // TODO: examine the behavior for corrupted key 1819. if (timer_enabled) { 1820. PERF_COUNTER_BY_LEVEL_ADD(get_from_table_nanos, timer.ElapsedNanos(), ^ 1821. fp.GetCurrentLevel()); 1822. } #2293 storage/rocksdb/rocksdb/db/version_set.cc:2847: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 2847. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 2845. bottommost_files_marked_for_compaction_.clear(); 2846. bottommost_files_mark_threshold_ = kMaxSequenceNumber; 2847. for (auto& level_and_file : bottommost_files_) { ^ 2848. if (!level_and_file.second->being_compacted && 2849. level_and_file.second->fd.largest_seqno != 0 && #2294 storage/rocksdb/rocksdb/db/version_set.cc:4455: error: Dead Store The value written to `&record` is never used. 4453. log::Reader reader(nullptr, std::move(manifest_file_reader), &reporter, 4454. true /* checksum */, 0 /* log_number */); 4455. Slice record; ^ 4456. std::string scratch; 4457. AtomicGroupReadBuffer read_buffer; #2295 storage/rocksdb/rocksdb/db/version_set.cc:4778: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 4777. 4776. options.file_system->OptimizeForManifestRead(file_options_), &file, 4777. nullptr); 4778. if (!s.ok()) { ^ 4779. return s; 4780. } #2296 storage/rocksdb/rocksdb/db/version_set.cc:5179: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 5179. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 5177. // The sum of all file sizes that intersect the [start, end] keys range. 5178. uint64_t total_intersecting_size = 0; 5179. for (const auto* file_ptr : first_files) { ^ 5180. total_intersecting_size += file_ptr->fd.GetFileSize(); 5181. } #2297 storage/rocksdb/rocksdb/db/version_set.cc:5179: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 5179. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 5177. // The sum of all file sizes that intersect the [start, end] keys range. 5178. uint64_t total_intersecting_size = 0; 5179. for (const auto* file_ptr : first_files) { ^ 5180. total_intersecting_size += file_ptr->fd.GetFileSize(); 5181. } #2298 storage/rocksdb/rocksdb/db/version_set.cc:5182: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 5182. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 5180. total_intersecting_size += file_ptr->fd.GetFileSize(); 5181. } 5182. for (const auto* file_ptr : last_files) { ^ 5183. total_intersecting_size += file_ptr->fd.GetFileSize(); 5184. } #2299 storage/rocksdb/rocksdb/db/version_set.cc:5182: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 5182. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 5180. total_intersecting_size += file_ptr->fd.GetFileSize(); 5181. } 5182. for (const auto* file_ptr : last_files) { ^ 5183. total_intersecting_size += file_ptr->fd.GetFileSize(); 5184. } #2300 storage/rocksdb/rocksdb/db/version_set.cc:5197: error: Unnecessary Copy copied variable `__begin2` is not modified after it is copied from a source on line 5197. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 5195. } else { 5196. // Estimate for all the first files, at each level 5197. for (const auto file_ptr : first_files) { ^ 5198. total_full_size += ApproximateSize(v, *file_ptr, start, end, caller); 5199. } #2301 storage/rocksdb/rocksdb/db/version_set.cc:5197: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 5197. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 5195. } else { 5196. // Estimate for all the first files, at each level 5197. for (const auto file_ptr : first_files) { ^ 5198. total_full_size += ApproximateSize(v, *file_ptr, start, end, caller); 5199. } #2302 storage/rocksdb/rocksdb/db/version_set.cc:5202: error: Unnecessary Copy copied variable `__begin2` is not modified after it is copied from a source on line 5202. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 5200. 5201. // Estimate for all the last files, at each level 5202. for (const auto file_ptr : last_files) { ^ 5203. // We could use ApproximateSize here, but calling ApproximateOffsetOf 5204. // directly is just more efficient. #2303 storage/rocksdb/rocksdb/db/version_set.cc:5202: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 5202. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 5200. 5201. // Estimate for all the last files, at each level 5202. for (const auto file_ptr : last_files) { ^ 5203. // We could use ApproximateSize here, but calling ApproximateOffsetOf 5204. // directly is just more efficient. #2304 storage/rocksdb/rocksdb/db/version_set.cc:5514: error: Unnecessary Copy Intermediate variable `&dummy_cf_options` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 5512. MutableCFOptions dummy_cf_options; 5513. Version* dummy_versions = 5514. new Version(nullptr, this, file_options_, dummy_cf_options); ^ 5515. // Ref() dummy version once so that later we can call Unref() to delete it 5516. // by avoiding calling "delete" explicitly (~Version is private) #2305 storage/rocksdb/rocksdb/db/version_set.cc:5874: error: Use After Delete The call to `std::pair>>::~pair` ends up calling `rocksdb::VersionBuilder::Rep::__infer_inner_destructor_~Rep` (after 6 more calls) and may trigger the following issue: call to `std::pair::~pair()` eventually accesses `pair->second` that was invalidated by `delete` during the call to `std::pair::~pair()` on line 124. 5872. new BaseReferencedVersionBuilder(cfd)); 5873. active_version_builders_.insert( 5874. std::make_pair(edit.column_family_, std::move(builder_guard))); ^ 5875. } 5876. #2306 storage/rocksdb/rocksdb/db/wal_manager.cc:41: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 40. 39. Status WalManager::DeleteFile(const std::string& fname, uint64_t number) { 40. auto s = env_->DeleteFile(db_options_.wal_dir + "/" + fname); 41. if (s.ok()) { ^ 42. MutexLock l(&read_first_record_cache_mutex_); 43. read_first_record_cache_.erase(number); #2307 storage/rocksdb/rocksdb/db/wal_manager.cc:474: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 470. 472. new SequentialFileReader(std::move(file), fname)); 473. 474. if (!status.ok()) { ^ 475. return status; 476. } #2308 storage/rocksdb/rocksdb/db/write_batch.cc:296: error: Use After Delete call to `rocksdb::WriteBatch::WriteBatch()` eventually accesses `this->rep_.__infer_model_backing_string` that was invalidated by `delete` during the call to `rocksdb::WriteBatch::~WriteBatch()` on line 295. 294. if (&src != this) { 295. this->~WriteBatch(); 296. new (this) WriteBatch(src); ^ 297. } 298. return *this; #2309 storage/rocksdb/rocksdb/db/write_batch.cc:304: error: Use After Delete call to `rocksdb::WriteBatch::WriteBatch()` eventually accesses `this->rep_.__infer_model_backing_string` that was invalidated by `delete` during the call to `rocksdb::WriteBatch::~WriteBatch()` on line 303. 302. if (&src != this) { 303. this->~WriteBatch(); 304. new (this) WriteBatch(std::move(src)); ^ 305. } 306. return *this; #2310 storage/rocksdb/rocksdb/db/write_thread.cc:601: error: Unnecessary Copy Assignment `write_group->status` is copy assigned into field `status` but is not modified afterwards. Rather than copying into the field, move into it instead. 599. } 600. // else we're the last parallel worker and should perform exit duties. 601. w->status = write_group->status; ^ 602. return true; 603. } #2311 storage/rocksdb/rocksdb/env/file_system.cc:89: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 88. 87. s = file->Read(kBufferSize, IOOptions(), &fragment, space, 88. nullptr); 89. if (!s.ok()) { ^ 90. break; 91. } #2312 storage/rocksdb/rocksdb/env/fs_posix.cc:138: error: Dead Store The value written to `&fd` is never used. 136. IODebugContext* /*dbg*/) override { 137. result->reset(); 138. int fd = -1; ^ 139. int flags = cloexec_flags(O_RDONLY, &options); 140. FILE* file = nullptr; #2313 storage/rocksdb/rocksdb/env/fs_posix.cc:257: error: Dead Store The value written to `&fd` is never used. 255. result->reset(); 256. IOStatus s; 257. int fd = -1; ^ 258. int flags = (reopen) ? (O_CREAT | O_APPEND) : (O_CREAT | O_TRUNC); 259. // Direct IO mode with O_DIRECT flag or F_NOCAHCE (MAC OSX) #2314 storage/rocksdb/rocksdb/env/fs_posix.cc:356: error: Dead Store The value written to `&fd` is never used. 354. result->reset(); 355. IOStatus s; 356. int fd = -1; ^ 357. 358. int flags = 0; #2315 storage/rocksdb/rocksdb/env/mock_env.cc:749: error: Const Refable Parameter Function parameter `path` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 747. } 748. 749. std::string MockEnv::NormalizePath(const std::string path) { ^ 750. std::string dst; 751. for (auto c : path) { #2316 storage/rocksdb/rocksdb/file/delete_scheduler.cc:270: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 267. 268. *is_complete = true; 269. TEST_SYNC_POINT("DeleteScheduler::DeleteTrashFile:DeleteFile"); 270. if (s.ok()) { ^ 271. bool need_full_delete = true; 272. if (bytes_max_delete_chunk_ != 0 && file_size > bytes_max_delete_chunk_) { #2317 storage/rocksdb/rocksdb/file/file_util.cc:80: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 79. 78. std::unique_ptr destfile; 79. s = fs->NewWritableFile(destination, soptions, &destfile, nullptr); 80. if (!s.ok()) { ^ 81. return s; 82. } #2318 storage/rocksdb/rocksdb/file/file_util.cc:86: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 85. 84. new WritableFileWriter(std::move(destfile), destination, soptions)); 85. s = dest_writer->Append(Slice(contents)); 86. if (!s.ok()) { ^ 87. return s; 88. } #2319 storage/rocksdb/rocksdb/file/filename.cc:386: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 383. 384. TEST_KILL_RANDOM("SetCurrentFile:1", rocksdb_kill_odds * REDUCE_ODDS2); 385. } 386. if (s.ok()) { ^ 387. if (directory_to_fsync != nullptr) { 388. s = directory_to_fsync->Fsync(); #2320 storage/rocksdb/rocksdb/file/sst_file_manager_impl.cc:28: error: Unnecessary Copy Intermediate `fs` is copied into field `fs_` but is not modified afterwards. Rather than copying into the field, move into it instead. 26. uint64_t bytes_max_delete_chunk) 27. : env_(env), 28. fs_(fs), ^ 29. logger_(logger), 30. total_files_size_(0), #2321 storage/rocksdb/rocksdb/file/sst_file_manager_impl.cc:66: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 65. 64. uint64_t file_size; 65. Status s = fs_->GetFileSize(file_path, IOOptions(), &file_size, nullptr); 66. if (s.ok()) { ^ 67. MutexLock l(&mu_); 68. OnAddFileImpl(file_path, file_size, compaction); #2322 storage/rocksdb/rocksdb/file/sst_file_manager_impl.cc:102: error: Unnecessary Copy copied variable `new_files` is not modified after it is copied from `rocksdb::VersionEdit::GetNewFiles()` on line 102. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 100. cur_compactions_reserved_size_ -= size_added_by_compaction; 101. 102. auto new_files = c->edit()->GetNewFiles(); ^ 103. for (auto& new_file : new_files) { 104. auto fn = TableFileName(c->immutable_cf_options()->cf_paths, #2323 storage/rocksdb/rocksdb/file/sst_file_manager_impl.cc:159: error: Const Refable Parameter Function parameter `bg_error` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 157. } 158. 159. bool SstFileManagerImpl::EnoughRoomForCompaction( ^ 160. ColumnFamilyData* cfd, const std::vector& inputs, 161. Status bg_error) { #2324 storage/rocksdb/rocksdb/file/sst_file_manager_impl.cc:376: error: Unnecessary Copy Assignment `bg_error` is copy assigned into field `bg_err_` but is not modified afterwards. Rather than copying into the field, move into it instead. 374. } 375. } else if (bg_error.severity() == Status::Severity::kHardError) { 376. bg_err_ = bg_error; ^ 377. } else { 378. assert(false); #2325 storage/rocksdb/rocksdb/file/sst_file_manager_impl.cc:480: error: Const Refable Parameter Function parameter `trash_dir` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 478. } 479. 480. SstFileManager* NewSstFileManager(Env* env, std::shared_ptr info_log, ^ 481. std::string trash_dir, 482. int64_t rate_bytes_per_sec, #2326 storage/rocksdb/rocksdb/file/sst_file_manager_impl.cc:494: error: Unnecessary Copy Intermediate variable `&fs` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 492. } 493. 494. return NewSstFileManager(env, fs, info_log, trash_dir, rate_bytes_per_sec, ^ 495. delete_existing_trash, status, max_trash_db_ratio, 496. bytes_max_delete_chunk); #2327 storage/rocksdb/rocksdb/file/sst_file_manager_impl.cc:494: error: Unnecessary Copy Intermediate variable `info_log` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 492. } 493. 494. return NewSstFileManager(env, fs, info_log, trash_dir, rate_bytes_per_sec, ^ 495. delete_existing_trash, status, max_trash_db_ratio, 496. bytes_max_delete_chunk); #2328 storage/rocksdb/rocksdb/include/rocksdb/utilities/backupable_db.h:272: error: Const Refable Parameter Function parameter `progress_callback` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 270. // If write-ahead logs are disabled, set flush_before_backup=true to 271. // avoid losing unflushed key/value pairs from the memtable. 272. virtual Status CreateNewBackup(DB* db, bool flush_before_backup = false, ^ 273. std::function progress_callback = 274. []() {}) { #2329 storage/rocksdb/rocksdb/include/rocksdb/utilities/backupable_db.h:276: error: Unnecessary Copy Intermediate variable `progress_callback` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 274. []() {}) { 275. return CreateNewBackupWithMetadata(db, "", flush_before_backup, 276. progress_callback); ^ 277. } 278. #2330 storage/rocksdb/rocksdb/include/rocksdb/utilities/ldb_cmd.h:86: error: Unnecessary Copy Assignment `options` is copy assigned into field `options_` but is not modified afterwards. Rather than copying into the field, move into it instead. 84. virtual Options PrepareOptionsForOpenDB(); 85. 86. virtual void SetDBOptions(Options options) { options_ = options; } ^ 87. 88. virtual void SetColumnFamilies( #2331 storage/rocksdb/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h:55: error: Const Refable Parameter Function parameter `msg` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 53. bool IsFailed() { return state_ == EXEC_FAILED; } 54. 55. static LDBCommandExecuteResult Succeed(std::string msg) { ^ 56. return LDBCommandExecuteResult(EXEC_SUCCEED, msg); 57. } #2332 storage/rocksdb/rocksdb/include/rocksdb/utilities/ldb_cmd_execute_result.h:59: error: Const Refable Parameter Function parameter `msg` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 57. } 58. 59. static LDBCommandExecuteResult Failed(std::string msg) { ^ 60. return LDBCommandExecuteResult(EXEC_FAILED, msg); 61. } #2333 storage/rocksdb/rocksdb/include/rocksdb/utilities/transaction_db.h:215: error: Unnecessary Copy Intermediate `path_entry` is copied into field `path` but is not modified afterwards. Rather than copying into the field, move into it instead. 213. explicit DeadlockPath(std::vector path_entry, 214. const int64_t& dl_time) 215. : path(path_entry), limit_exceeded(false), deadlock_time(dl_time) {} ^ 216. 217. // empty path, limit exceeded constructor and default constructor #2334 storage/rocksdb/rocksdb/logging/auto_roll_logger.cc:41: error: Unnecessary Copy Assignment `&s` is copy assigned into field `status_` but is not modified afterwards. Rather than copying into the field, move into it instead. 39. db_absolute_path_ = dbname; 40. } else { 41. status_ = s; ^ 42. } 43. log_fname_ = InfoLogFileName(dbname_, db_absolute_path_, db_log_dir_); #2335 storage/rocksdb/rocksdb/logging/auto_roll_logger.cc:105: error: Unnecessary Copy Assignment `&s` is copy assigned into field `status_` but is not modified afterwards. Rather than copying into the field, move into it instead. 103. GetInfoLogFiles(env_, db_log_dir_, dbname_, &parent_dir, &info_log_files); 104. if (status_.ok()) { 105. status_ = s; ^ 106. } 107. // We need to sort the file before enqueing it so that when we #2336 storage/rocksdb/rocksdb/logging/log_buffer.cc:60: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 60. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 58. 59. void LogBuffer::FlushBufferToLog() { 60. for (BufferedLog* log : logs_) { ^ 61. const time_t seconds = log->now_tv.tv_sec; 62. struct tm t; #2337 storage/rocksdb/rocksdb/memtable/vectorrep.cc:150: error: Unnecessary Copy Intermediate `bucket` is copied into field `bucket_` but is not modified afterwards. Rather than copying into the field, move into it instead. 148. const KeyComparator& compare) 149. : vrep_(vrep), 150. bucket_(bucket), ^ 151. cit_(bucket_->end()), 152. compare_(compare), #2338 storage/rocksdb/rocksdb/memtable/vectorrep.cc:289: error: Unnecessary Copy Intermediate variable `&tmp` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 287. return new Iterator(nullptr, tmp, compare_); 288. } else { 289. return new (mem) Iterator(nullptr, tmp, compare_); ^ 290. } 291. } #2339 storage/rocksdb/rocksdb/memtable/write_buffer_manager.cc:33: error: Unnecessary Copy Intermediate `cache` is copied into field `cache_` but is not modified afterwards. Rather than copying into the field, move into it instead. 31. 32. explicit CacheRep(std::shared_ptr cache) 33. : cache_(cache), cache_allocated_size_(0) { ^ 34. memset(cache_key_, 0, kCacheKeyPrefix); 35. size_t pointer_size = sizeof(const void*); #2340 storage/rocksdb/rocksdb/memtable/write_buffer_manager.cc:61: error: Unnecessary Copy Intermediate variable `cache` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 59. if (cache) { 60. // Construct the cache key using the pointer to this. 61. cache_rep_.reset(new CacheRep(cache)); ^ 62. } 63. #else #2341 storage/rocksdb/rocksdb/monitoring/persistent_stats_history.cc:113: error: Unnecessary Copy Assignment `&key_resize` is copy assigned into field `second` but is not modified afterwards. Rather than copying into the field, move into it instead. 111. result.first = parsed_time; 112. std::string key_resize = key_str.substr(pos + 1); 113. result.second = key_resize; ^ 114. } 115. } #2342 storage/rocksdb/rocksdb/options/options.cc:484: error: Unnecessary Copy Assignment `&wbm` is copy assigned into field `write_buffer_manager` but is not modified afterwards. Rather than copying into the field, move into it instead. 482. std::make_shared( 483. 0, (cache != nullptr) ? *cache : std::shared_ptr()); 484. write_buffer_manager = wbm; ^ 485. 486. return this; #2343 storage/rocksdb/rocksdb/options/options_parser.cc:213: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended on line 212. 211. Status s = fs->NewSequentialFile(file_name, FileOptions(), &seq_file, 212. nullptr); 213. if (!s.ok()) { ^ 214. return s; 215. } #2344 storage/rocksdb/rocksdb/options/options_parser.cc:742: error: Unnecessary Copy copied variable `pair` is not modified after it is copied from `std::__detail::_Node_iterator::operator*()` on line 742. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 740. const std::unordered_map* /*opt_map*/, 741. OptionsSanityCheckLevel sanity_check_level) { 742. for (auto pair : db_options_type_info) { ^ 743. if (pair.second.verification == OptionVerificationType::kDeprecated) { 744. // We skip checking deprecated variables as they might #2345 storage/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc:20: error: Unnecessary Copy Intermediate `table_factory_to_write` is copied into field `table_factory_to_write_` but is not modified afterwards. Rather than copying into the field, move into it instead. 18. std::shared_ptr plain_table_factory, 19. std::shared_ptr cuckoo_table_factory) 20. : table_factory_to_write_(table_factory_to_write), ^ 21. block_based_table_factory_(block_based_table_factory), 22. plain_table_factory_(plain_table_factory), #2346 storage/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc:21: error: Unnecessary Copy Intermediate `block_based_table_factory` is copied into field `block_based_table_factory_` but is not modified afterwards. Rather than copying into the field, move into it instead. 19. std::shared_ptr cuckoo_table_factory) 20. : table_factory_to_write_(table_factory_to_write), 21. block_based_table_factory_(block_based_table_factory), ^ 22. plain_table_factory_(plain_table_factory), 23. cuckoo_table_factory_(cuckoo_table_factory) { #2347 storage/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc:22: error: Unnecessary Copy Intermediate `plain_table_factory` is copied into field `plain_table_factory_` but is not modified afterwards. Rather than copying into the field, move into it instead. 20. : table_factory_to_write_(table_factory_to_write), 21. block_based_table_factory_(block_based_table_factory), 22. plain_table_factory_(plain_table_factory), ^ 23. cuckoo_table_factory_(cuckoo_table_factory) { 24. if (!plain_table_factory_) { #2348 storage/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc:23: error: Unnecessary Copy Intermediate `cuckoo_table_factory` is copied into field `cuckoo_table_factory_` but is not modified afterwards. Rather than copying into the field, move into it instead. 21. block_based_table_factory_(block_based_table_factory), 22. plain_table_factory_(plain_table_factory), 23. cuckoo_table_factory_(cuckoo_table_factory) { ^ 24. if (!plain_table_factory_) { 25. plain_table_factory_.reset(NewPlainTableFactory()); #2349 storage/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc:119: error: Unnecessary Copy Intermediate variable `table_factory_to_write` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 117. std::shared_ptr plain_table_factory, 118. std::shared_ptr cuckoo_table_factory) { 119. return new AdaptiveTableFactory(table_factory_to_write, ^ 120. block_based_table_factory, plain_table_factory, cuckoo_table_factory); 121. } #2350 storage/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc:120: error: Unnecessary Copy Intermediate variable `block_based_table_factory` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 118. std::shared_ptr cuckoo_table_factory) { 119. return new AdaptiveTableFactory(table_factory_to_write, 120. block_based_table_factory, plain_table_factory, cuckoo_table_factory); ^ 121. } 122. #2351 storage/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc:120: error: Unnecessary Copy Intermediate variable `plain_table_factory` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 118. std::shared_ptr cuckoo_table_factory) { 119. return new AdaptiveTableFactory(table_factory_to_write, 120. block_based_table_factory, plain_table_factory, cuckoo_table_factory); ^ 121. } 122. #2352 storage/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc:120: error: Unnecessary Copy Intermediate variable `cuckoo_table_factory` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 118. std::shared_ptr cuckoo_table_factory) { 119. return new AdaptiveTableFactory(table_factory_to_write, 120. block_based_table_factory, plain_table_factory, cuckoo_table_factory); ^ 121. } 122. #2353 storage/rocksdb/rocksdb/table/block_based/block.h:265: error: Unnecessary Copy Assignment `s` is copy assigned into field `status_` but is not modified afterwards. Rather than copying into the field, move into it instead. 263. data_ = nullptr; 264. current_ = restarts_; 265. status_ = s; ^ 266. 267. // Call cleanup callbacks. #2354 storage/rocksdb/rocksdb/table/block_based/block.h:437: error: Const Refable Parameter Function parameter `s` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 435. void SeekToLast() override; 436. 437. void Invalidate(Status s) { ^ 438. InvalidateBase(s); 439. // Clear prev entries cache. #2355 storage/rocksdb/rocksdb/table/block_based/block.h:438: error: Unnecessary Copy Intermediate variable `s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 436. 437. void Invalidate(Status s) { 438. InvalidateBase(s); ^ 439. // Clear prev entries cache. 440. prev_entries_keys_buff_.clear(); #2356 storage/rocksdb/rocksdb/table/block_based/block.h:569: error: Const Refable Parameter Function parameter `s` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 567. void SeekToLast() override; 568. 569. void Invalidate(Status s) { InvalidateBase(s); } ^ 570. 571. bool IsValuePinned() const override { #2357 storage/rocksdb/rocksdb/table/block_based/block.h:569: error: Unnecessary Copy Intermediate variable `s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 567. void SeekToLast() override; 568. 569. void Invalidate(Status s) { InvalidateBase(s); } ^ 570. 571. bool IsValuePinned() const override { #2358 storage/rocksdb/rocksdb/table/block_based/block_based_table_factory.cc:504: error: Unnecessary Copy Assignment `&cache` is copy assigned into field `block_cache` but is not modified afterwards. Rather than copying into the field, move into it instead. 502. 503. if (name == "block_cache") { 504. new_options->block_cache = cache; ^ 505. } else { 506. new_options->block_cache_compressed = cache; #2359 storage/rocksdb/rocksdb/table/block_based/block_based_table_factory.cc:506: error: Unnecessary Copy Assignment `&cache` is copy assigned into field `block_cache_compressed` but is not modified afterwards. Rather than copying into the field, move into it instead. 504. new_options->block_cache = cache; 505. } else { 506. new_options->block_cache_compressed = cache; ^ 507. } 508. return ""; #2360 storage/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc:479: error: Uninitialized Value `this.restarts_` is read without initialization during the call to `rocksdb::Block::NewIndexIterator()`. 477. // We don't return pinned data from index blocks, so no need 478. // to set `block_contents_pinned`. 479. index_block.GetValue()->NewIndexIterator( ^ 480. internal_comparator(), internal_comparator()->user_comparator(), &biter, 481. kNullStats, true, index_has_first_key(), index_key_includes_seq(), #2361 storage/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc:486: error: Uninitialized Value `biter.restarts_` is read without initialization during the call to `rocksdb::BlockIter::Valid()`. 484. // Read the first block offset 485. biter.SeekToFirst(); 486. if (!biter.Valid()) { ^ 487. // Empty index. 488. return; #2362 storage/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc:796: error: Uninitialized Value `__param_0.user_key_return_count` is read without initialization during the call to `rocksdb::PerfContextByLevel::operator=()`. 794. 795. PERF_COUNTER_ADD(block_cache_hit_count, 1); 796. PERF_COUNTER_BY_LEVEL_ADD(block_cache_hit_count, 1, ^ 797. static_cast(rep_->level)); 798. #2363 storage/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc:854: error: Uninitialized Value `__param_0.user_key_return_count` is read without initialization during the call to `rocksdb::PerfContextByLevel::operator=()`. 852. 853. // TODO: introduce aggregate (not per-level) block cache miss count 854. PERF_COUNTER_BY_LEVEL_ADD(block_cache_miss_count, 1, ^ 855. static_cast(rep_->level)); 856. #2364 storage/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc:2228: error: Dead Store The value written to `&trace_block_type` is never used. 2226. usage = block_entry->GetValue()->ApproximateMemoryUsage(); 2227. } 2228. TraceType trace_block_type = TraceType::kTraceMax; ^ 2229. switch (block_type) { 2230. case BlockType::kData: #2365 storage/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc:3065: error: Unnecessary Copy Intermediate variable `&s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 3063. table_->NewDataBlockIterator( 3064. read_options_, data_block_handle, &block_iter_, block_type_, 3065. /*get_context=*/nullptr, &lookup_context_, s, prefetch_buffer_.get(), ^ 3066. /*for_compaction=*/lookup_context_.caller == 3067. TableReaderCaller::kCompaction); #2366 storage/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc:3283: error: Uninitialized Value `__param_0.user_key_return_count` is read without initialization during the call to `rocksdb::PerfContextByLevel::operator=()`. 3281. if (may_match) { 3282. RecordTick(rep_->ioptions.statistics, BLOOM_FILTER_FULL_POSITIVE); 3283. PERF_COUNTER_BY_LEVEL_ADD(bloom_filter_full_positive, 1, rep_->level); ^ 3284. } 3285. return may_match; #2367 storage/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc:3336: error: Uninitialized Value `__param_0.user_key_return_count` is read without initialization during the call to `rocksdb::PerfContextByLevel::operator=()`. 3334. if (!may_match) { 3335. RecordTick(rep_->ioptions.statistics, BLOOM_FILTER_USEFUL); 3336. PERF_COUNTER_BY_LEVEL_ADD(bloom_filter_useful, 1, rep_->level); ^ 3337. } else { 3338. IndexBlockIter iiter_on_stack; #2368 storage/rocksdb/rocksdb/table/block_based/index_builder.cc:217: error: Unnecessary Copy Intermediate variable `&s` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 215. index_size_ += index_blocks->index_block_contents.size(); 216. finishing_indexes = true; 217. return s.ok() ? Status::Incomplete() : s; ^ 218. } 219. } #2369 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:66: error: Unnecessary Copy Intermediate `index_key` is copied into field `key` but is not modified afterwards. Rather than copying into the field, move into it instead. 64. Slice filter = filter_bits_builder_->Finish(&filter_gc.back()); 65. std::string& index_key = p_index_builder_->GetPartitionKey(); 66. filters.push_back({index_key, filter}); ^ 67. keys_added_to_partition_ = 0; 68. Reset(); #2370 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:196: error: Uninitialized Value `this.restarts_` is read without initialization during the call to `rocksdb::Block::NewIndexIterator()`. 194. const InternalKeyComparator* const comparator = internal_comparator(); 195. Statistics* kNullStats = nullptr; 196. filter_block.GetValue()->NewIndexIterator( ^ 197. comparator, comparator->user_comparator(), &iter, kNullStats, 198. true /* total_order_seek */, false /* have_first_key */, #2371 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:200: error: Uninitialized Value `this.key_includes_seq_` is read without initialization during the call to `rocksdb::IndexBlockIter::Seek()`. 198. true /* total_order_seek */, false /* have_first_key */, 199. index_key_includes_seq(), index_value_is_full()); 200. iter.Seek(entry); ^ 201. if (UNLIKELY(!iter.Valid())) { 202. // entry is larger than all the keys. However its prefix might still be #2372 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:201: error: Uninitialized Value `iter.restarts_` is read without initialization during the call to `rocksdb::BlockIter::Valid()`. 199. index_key_includes_seq(), index_value_is_full()); 200. iter.Seek(entry); 201. if (UNLIKELY(!iter.Valid())) { ^ 202. // entry is larger than all the keys. However its prefix might still be 203. // present in the last partition. If this is called by PrefixMayMatch this #2373 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:210: error: Uninitialized Value `this.value_delta_encoded_` is read without initialization during the call to `rocksdb::IndexBlockIter::value()`. 208. } 209. assert(iter.Valid()); 210. BlockHandle fltr_blk_handle = iter.value().handle; ^ 211. return fltr_blk_handle; 212. } #2374 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:321: error: Uninitialized Value `this.restarts_` is read without initialization during the call to `rocksdb::Block::NewIndexIterator()`. 319. const InternalKeyComparator* const comparator = internal_comparator(); 320. Statistics* kNullStats = nullptr; 321. filter_block.GetValue()->NewIndexIterator( ^ 322. comparator, comparator->user_comparator(), &biter, kNullStats, 323. true /* total_order_seek */, false /* have_first_key */, #2375 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:328: error: Uninitialized Value `this.value_delta_encoded_` is read without initialization during the call to `rocksdb::IndexBlockIter::value()`. 326. // Read the first block offset 327. biter.SeekToFirst(); 328. BlockHandle handle = biter.value().handle; ^ 329. uint64_t prefetch_off = handle.offset(); 330. #2376 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:333: error: Uninitialized Value `this.value_delta_encoded_` is read without initialization during the call to `rocksdb::IndexBlockIter::value()`. 331. // Read the last block's offset 332. biter.SeekToLast(); 333. handle = biter.value().handle; ^ 334. uint64_t last_off = handle.offset() + handle.size() + kBlockTrailerSize; 335. uint64_t prefetch_len = last_off - prefetch_off; #2377 storage/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc:344: error: Uninitialized Value `biter.restarts_` is read without initialization during the call to `rocksdb::BlockIter::Valid()`. 342. // After prefetch, read the partitions one by one 343. ReadOptions read_options; 344. for (biter.SeekToFirst(); biter.Valid(); biter.Next()) { ^ 345. handle = biter.value().handle; 346. #2378 storage/rocksdb/rocksdb/table/cuckoo/cuckoo_table_reader.cc:175: error: Uninitialized Value `parsed_key.type` is read without initialization during the call to `rocksdb::GetContext::SaveValue()`. 173. ParseInternalKey(full_key, &found_ikey); 174. bool dont_care __attribute__((__unused__)); 175. get_context->SaveValue(found_ikey, value, &dont_care); ^ 176. } 177. // We don't support merge operations. So, we return here. #2379 storage/rocksdb/rocksdb/table/iterator.cc:98: error: Const Refable Parameter Function parameter `prop_name` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 96. } 97. 98. Status Iterator::GetProperty(std::string prop_name, std::string* prop) { ^ 99. if (prop == nullptr) { 100. return Status::InvalidArgument("prop is nullptr"); #2380 storage/rocksdb/rocksdb/table/merging_iterator.cc:61: error: Unnecessary Copy Assignment `s` is copy assigned into field `status_` but is not modified afterwards. Rather than copying into the field, move into it instead. 59. void considerStatus(Status s) { 60. if (!s.ok() && status_.ok()) { 61. status_ = s; ^ 62. } 63. } #2381 storage/rocksdb/rocksdb/table/merging_iterator.cc:71: error: Unnecessary Copy copied variable `new_wrapper` is not modified after it is copied from `rocksdb::autovector::back()` on line 71. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 69. iter->SetPinnedItersMgr(pinned_iters_mgr_); 70. } 71. auto new_wrapper = children_.back(); ^ 72. AddToMinHeapOrCheckStatus(&new_wrapper); 73. if (new_wrapper.Valid()) { #2382 storage/rocksdb/rocksdb/table/merging_iterator.cc:79: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 79. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 77. 78. ~MergingIterator() override { 79. for (auto& child : children_) { ^ 80. child.DeleteIter(is_arena_mode_); 81. } #2383 storage/rocksdb/rocksdb/table/merging_iterator.cc:259: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 259. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 257. void SetPinnedItersMgr(PinnedIteratorsManager* pinned_iters_mgr) override { 258. pinned_iters_mgr_ = pinned_iters_mgr; 259. for (auto& child : children_) { ^ 260. child.SetPinnedItersMgr(pinned_iters_mgr); 261. } #2384 storage/rocksdb/rocksdb/table/meta_blocks.cc:232: error: Uninitialized Value `this.restarts_` is read without initialization during the call to `rocksdb::Block::NewDataIterator()`. 230. kDisableGlobalSequenceNumber); 231. DataBlockIter iter; 232. properties_block.NewDataIterator(BytewiseComparator(), BytewiseComparator(), ^ 233. &iter); 234. #2385 storage/rocksdb/rocksdb/table/meta_blocks.cc:276: error: Uninitialized Value `iter.restarts_` is read without initialization during the call to `rocksdb::BlockIter::Valid()`. 274. 275. std::string last_key; 276. for (iter.SeekToFirstOrReport(); iter.Valid(); iter.NextOrReport()) { ^ 277. s = iter.status(); 278. if (!s.ok()) { #2386 storage/rocksdb/rocksdb/table/plain/plain_table_key_coding.cc:213: error: Unnecessary Copy Assignment `&s` is copy assigned into field `status_` but is not modified afterwards. Rather than copying into the field, move into it instead. 211. new_buffer->buf.get()); 212. if (!s.ok()) { 213. status_ = s; ^ 214. return false; 215. } #2387 storage/rocksdb/rocksdb/table/plain/plain_table_reader.cc:746: error: Dead Store The value written to `&tmp_slice` is never used. 744. offset_ = next_offset_; 745. if (offset_ < table_->file_info_.data_end_offset) { 746. Slice tmp_slice; ^ 747. ParsedInternalKey parsed_key; 748. status_ = #2388 storage/rocksdb/rocksdb/table/sst_file_writer.cc:221: error: Unnecessary Copy copied variable `user_collector_factories` is not modified after it is copied from `r->ioptions.table_properties_collector_factories` on line 221. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 219. // User collector factories 220. auto user_collector_factories = 221. r->ioptions.table_properties_collector_factories; ^ 222. for (size_t i = 0; i < user_collector_factories.size(); i++) { 223. int_tbl_prop_collector_factories.emplace_back( #2389 storage/rocksdb/rocksdb/test_util/testutil.cc:408: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 407. 406. } 407. s = env->DeleteFile(dir + "/" + file_in_dir); 408. if (!s.ok()) { ^ 409. break; 410. } #2390 storage/rocksdb/rocksdb/test_util/transaction_test_util.cc:169: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 168. 167. if (txn != nullptr) { 168. s = txn->Put(key, sum); 169. if (!get_for_update && (s.IsBusy() || s.IsTimedOut())) { ^ 170. // If the initial get was not for update, then the key is not locked 171. // before put and put could fail due to concurrent writes. #2391 storage/rocksdb/rocksdb/test_util/transaction_test_util.cc:173: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 168. 171. // before put and put could fail due to concurrent writes. 172. break; 173. } else if (!s.ok()) { ^ 174. // Since we did a GetForUpdate, Put should not fail. 175. fprintf(stderr, "Put returned an unexpected error: %s\n", #2392 storage/rocksdb/rocksdb/tools/dump/db_dump_tool.cc:149: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 148. 147. status = env->NewSequentialFile(undump_options.dump_location, &dumpfile, 148. ROCKSDB_NAMESPACE::EnvOptions()); 149. if (!status.ok()) { ^ 150. std::cerr << "Unable to open dump file '" << undump_options.dump_location 151. << "' for reading: " << status.ToString() << std::endl; #2393 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:1027: error: Uninitialized Value `__param_0.io_options.prio` is read without initialization during the call to `rocksdb::VersionSet::VersionSet()`. 1025. WriteBufferManager wb(options.db_write_buffer_size); 1026. ImmutableDBOptions immutable_db_options(options); 1027. VersionSet versions(dbname, &immutable_db_options, sopt, tc.get(), &wb, &wc, ^ 1028. /*block_cache_tracer=*/nullptr); 1029. Status s = versions.DumpManifest(options, file, verbose, hex, json); #2394 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:1090: error: Unnecessary Copy Intermediate variable `&err_msg` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 1088. err_msg.append(": Failed to list the content of "); 1089. err_msg.append(db_path_); 1090. exec_state_ = LDBCommandExecuteResult::Failed(err_msg); ^ 1091. return; 1092. } #2395 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:1130: error: Unnecessary Copy Intermediate variable `&err_msg` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 1128. std::string err_msg("No MANIFEST found in "); 1129. err_msg.append(db_path_); 1130. exec_state_ = LDBCommandExecuteResult::Failed(err_msg); ^ 1131. return; 1132. } #2396 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:1169: error: Uninitialized Value `__param_0.io_options.prio` is read without initialization during the call to `rocksdb::VersionSet::VersionSet()`. 1167. WriteBufferManager wb(options.db_write_buffer_size); 1168. ImmutableDBOptions immutable_db_options(options); 1169. VersionSet versions(dbname, &immutable_db_options, sopt, tc.get(), &wb, &wc, ^ 1170. /*block_cache_tracer=*/nullptr); 1171. std::vector cf_name_list; #2397 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:1881: error: Uninitialized Value `__param_0.io_options.prio` is read without initialization during the call to `rocksdb::VersionSet::VersionSet()`. 1879. WriteController wc(opt.delayed_write_rate); 1880. WriteBufferManager wb(opt.db_write_buffer_size); 1881. VersionSet versions(db_path_, &db_options, soptions, tc.get(), &wb, &wc, ^ 1882. /*block_cache_tracer=*/nullptr); 1883. std::vector dummy; #2398 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:3063: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 3061. 3061. status = restore_engine->RestoreDBFromLatestBackup(db_path_, db_path_); 3062. } 3063. if (status.ok()) { ^ 3064. fprintf(stdout, "restore from backup OK\n"); 3065. } else { #2399 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:3074: error: Const Refable Parameter Function parameter `filename` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 3072. namespace { 3073. 3074. void DumpSstFile(Options options, std::string filename, bool output_hex, ^ 3075. bool show_properties) { 3076. std::string from_key; #2400 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:3085: error: Uninitialized Value `__param_0.options_.disable_auto_compactions` is read without initialization during the call to `rocksdb::SstFileDumper::SstFileDumper()`. 3083. // no verification 3084. // TODO: add support for decoding blob indexes in ldb as well 3085. ROCKSDB_NAMESPACE::SstFileDumper dumper( ^ 3086. options, filename, /* verify_checksum */ false, output_hex, 3087. /* decode_blob_index */ false); #2401 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:3164: error: Unnecessary Copy Intermediate variable `&filename` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 3162. std::cout << filename << " level:" << fileMetadata.level << std::endl; 3163. std::cout << "------------------------------" << std::endl; 3164. DumpSstFile(options_, filename, false, true); ^ 3165. std::cout << std::endl; 3166. } #2402 storage/rocksdb/rocksdb/tools/ldb_cmd.cc:3181: error: Unnecessary Copy Intermediate variable `&filename` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 3179. std::cout << filename << std::endl; 3180. // TODO(myabandeh): allow configuring is_write_commited 3181. DumpWalFile(options_, filename, true, true, true /* is_write_commited */, ^ 3182. &exec_state_); 3183. } #2403 storage/rocksdb/rocksdb/tools/ldb_tool.cc:103: error: Const Refable Parameter Function parameter `options` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 101. } 102. 103. int LDBCommandRunner::RunCommand( ^ 104. int argc, char** argv, Options options, const LDBOptions& ldb_options, 105. const std::vector* column_families) { #2404 storage/rocksdb/rocksdb/tools/sst_dump_tool.cc:665: error: Uninitialized Value `__param_0.options_.disable_auto_compactions` is read without initialization during the call to `rocksdb::SstFileDumper::SstFileDumper()`. 663. } 664. 665. ROCKSDB_NAMESPACE::SstFileDumper dumper(options, filename, verify_checksum, ^ 666. output_hex, decode_blob_index); 667. if (!dumper.getStatus().ok()) { #2405 storage/rocksdb/rocksdb/trace_replay/block_cache_tracer.h:141: error: Unnecessary Copy Intermediate `_block_key` is copied into field `block_key` but is not modified afterwards. Rather than copying into the field, move into it instead. 139. bool _referenced_key_exist_in_block = false) 140. : access_timestamp(_access_timestamp), 141. block_key(_block_key), ^ 142. block_type(_block_type), 143. block_size(_block_size), #2406 storage/rocksdb/rocksdb/trace_replay/block_cache_tracer.h:145: error: Unnecessary Copy Intermediate `_cf_name` is copied into field `cf_name` but is not modified afterwards. Rather than copying into the field, move into it instead. 143. block_size(_block_size), 144. cf_id(_cf_id), 145. cf_name(_cf_name), ^ 146. level(_level), 147. sst_fd_number(_sst_fd_number), #2407 storage/rocksdb/rocksdb/trace_replay/block_cache_tracer.h:155: error: Unnecessary Copy Intermediate `_referenced_key` is copied into field `referenced_key` but is not modified afterwards. Rather than copying into the field, move into it instead. 153. ? Boolean::kTrue 154. : Boolean::kFalse), 155. referenced_key(_referenced_key), ^ 156. referenced_data_size(_referenced_data_size), 157. num_keys_in_block(_num_keys_in_block), #2408 storage/rocksdb/rocksdb/trace_replay/trace_replay.cc:65: error: Use After Lifetime The call to `rocksdb::Tracer::WriteHeader` may trigger the following issue: call to `rocksdb::Tracer::WriteHeader()` eventually accesses memory that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended during the call to `rocksdb::Tracer::WriteHeader()` on line 153. 63. trace_writer_(std::move(trace_writer)), 64. trace_request_count_ (0) { 65. WriteHeader(); ^ 66. } 67. #2409 storage/rocksdb/rocksdb/trace_replay/trace_replay.cc:152: error: Unnecessary Copy Assignment `&header` is copy assigned into field `payload` but is not modified afterwards. Rather than copying into the field, move into it instead. 150. trace.ts = env_->NowMicros(); 151. trace.type = kTraceBegin; 152. trace.payload = header; ^ 153. return WriteTrace(trace); 154. } #2410 storage/rocksdb/rocksdb/trace_replay/trace_replay.cc:170: error: Use After Lifetime The call to `rocksdb::Tracer::WriteFooter` may trigger the following issue: call to `rocksdb::Tracer::WriteFooter()` eventually accesses memory that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended during the call to `rocksdb::Tracer::WriteFooter()` on line 161. 168. } 169. 170. Status Tracer::Close() { return WriteFooter(); } ^ 171. 172. Replayer::Replayer(DB* db, const std::vector& handles, #2411 storage/rocksdb/rocksdb/trace_replay/trace_replay.cc:325: error: Unnecessary Copy Assignment `&roptions` is copy assigned into field `roptions` but is not modified afterwards. Rather than copying into the field, move into it instead. 323. } 324. ra->woptions = woptions; 325. ra->roptions = roptions; ^ 326. 327. std::this_thread::sleep_until( #2412 storage/rocksdb/rocksdb/util/hash_map.h:33: error: Unnecessary Copy copied variable `it` is not modified after it is copied from a source on line 33. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 31. bool Contains(K key) { 32. auto& bucket = table_[key % size]; 33. auto it = std::find_if( ^ 34. bucket.begin(), bucket.end(), 35. [key](const std::pair& p) { return p.first == key; }); #2413 storage/rocksdb/rocksdb/util/hash_map.h:60: error: Unnecessary Copy copied variable `it` is not modified after it is copied from a source on line 60. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 58. V& Get(K key) { 59. auto& bucket = table_[key % size]; 60. auto it = std::find_if( ^ 61. bucket.begin(), bucket.end(), 62. [key](const std::pair& p) { return p.first == key; }); #2414 storage/rocksdb/rocksdb/util/rate_limiter.cc:81: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 81. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 79. requests_to_wait_ = static_cast(queue_[Env::IO_LOW].size() + 80. queue_[Env::IO_HIGH].size()); 81. for (auto& r : queue_[Env::IO_HIGH]) { ^ 82. r->cv.Signal(); 83. } #2415 storage/rocksdb/rocksdb/util/rate_limiter.cc:84: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 84. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 82. r->cv.Signal(); 83. } 84. for (auto& r : queue_[Env::IO_LOW]) { ^ 85. r->cv.Signal(); 86. } #2416 storage/rocksdb/rocksdb/util/rate_limiter.cc:84: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 84. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 82. r->cv.Signal(); 83. } 84. for (auto& r : queue_[Env::IO_LOW]) { ^ 85. r->cv.Signal(); 86. } #2417 storage/rocksdb/rocksdb/util/repeatable_thread.h:26: error: Unnecessary Copy Intermediate `function` is copied into field `function_` but is not modified afterwards. Rather than copying into the field, move into it instead. 24. const std::string& thread_name, Env* env, uint64_t delay_us, 25. uint64_t initial_delay_us = 0) 26. : function_(function), ^ 27. thread_name_("rocksdb:" + thread_name), 28. env_(env), #2418 storage/rocksdb/rocksdb/util/thread_local.cc:453: error: Const Refable Parameter Function parameter `func` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 451. } 452. 453. void ThreadLocalPtr::StaticMeta::Fold(uint32_t id, FoldFunc func, void* res) { ^ 454. MutexLock l(Mutex()); 455. for (ThreadData* t = head_.next; t != &head_; t = t->next) { #2419 storage/rocksdb/rocksdb/util/thread_local.cc:550: error: Const Refable Parameter Function parameter `func` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 548. } 549. 550. void ThreadLocalPtr::Fold(FoldFunc func, void* res) { ^ 551. Instance()->Fold(id_, func, res); 552. } #2420 storage/rocksdb/rocksdb/util/thread_local.cc:551: error: Unnecessary Copy Intermediate variable `func` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 549. 550. void ThreadLocalPtr::Fold(FoldFunc func, void* res) { 551. Instance()->Fold(id_, func, res); ^ 552. } 553. #2421 storage/rocksdb/rocksdb/util/threadpool_imp.cc:284: error: Dead Store The value written to `&thread_type` is never used. 282. // initialize it because compiler isn't good enough to see we don't use it 283. // uninitialized 284. ThreadStatus::ThreadType thread_type = ThreadStatus::NUM_THREAD_TYPES; ^ 285. switch (tp->GetThreadPriority()) { 286. case Env::Priority::HIGH: #2422 storage/rocksdb/rocksdb/util/threadpool_imp.cc:334: warning: Lock Consistency Violation Read/Write race. Non-private method `rocksdb::ThreadPoolImpl::Impl::StartBGThreads` reads without synchronization from `this->total_threads_limit_`, which races with the write in method `rocksdb::ThreadPoolImpl::Impl::JoinThreads`. 332. void ThreadPoolImpl::Impl::StartBGThreads() { 333. // Start background thread if necessary 334. while ((int)bgthreads_.size() < total_threads_limit_) { ^ 335. 336. port::Thread p_t(&BGThreadWrapper, #2423 storage/rocksdb/rocksdb/util/xxhash.cc:419: error: Dead Store The value written to `&ptr` is never used. 417. FALLTHROUGH_INTENDED; 418. /* fallthrough */ 419. case 4: PROCESS4; ^ 420. return XXH32_avalanche(h32); 421. #2424 storage/rocksdb/rocksdb/util/xxhash.cc:429: error: Dead Store The value written to `&ptr` is never used. 427. /* fallthrough */ 428. case 5: PROCESS4; 429. PROCESS1; ^ 430. return XXH32_avalanche(h32); 431. #2425 storage/rocksdb/rocksdb/util/xxhash.cc:440: error: Dead Store The value written to `&ptr` is never used. 438. case 6: PROCESS4; 439. PROCESS1; 440. PROCESS1; ^ 441. return XXH32_avalanche(h32); 442. #2426 storage/rocksdb/rocksdb/util/xxhash.cc:458: error: Dead Store The value written to `&ptr` is never used. 456. FALLTHROUGH_INTENDED; 457. /* fallthrough */ 458. case 1: PROCESS1; ^ 459. FALLTHROUGH_INTENDED; 460. /* fallthrough */ #2427 storage/rocksdb/rocksdb/util/xxhash.cc:848: error: Dead Store The value written to `&ptr` is never used. 846. FALLTHROUGH_INTENDED; 847. /* fallthrough */ 848. case 8: PROCESS8_64; ^ 849. return XXH64_avalanche(h64); 850. #2428 storage/rocksdb/rocksdb/util/xxhash.cc:860: error: Dead Store The value written to `&ptr` is never used. 858. FALLTHROUGH_INTENDED; 859. /* fallthrough */ 860. case 4: PROCESS4_64; ^ 861. return XXH64_avalanche(h64); 862. #2429 storage/rocksdb/rocksdb/util/xxhash.cc:870: error: Dead Store The value written to `&ptr` is never used. 868. /* fallthrough */ 869. case 9: PROCESS8_64; 870. PROCESS1_64; ^ 871. return XXH64_avalanche(h64); 872. #2430 storage/rocksdb/rocksdb/util/xxhash.cc:883: error: Dead Store The value written to `&ptr` is never used. 881. /* fallthrough */ 882. case 5: PROCESS4_64; 883. PROCESS1_64; ^ 884. return XXH64_avalanche(h64); 885. #2431 storage/rocksdb/rocksdb/util/xxhash.cc:894: error: Dead Store The value written to `&ptr` is never used. 892. case 10: PROCESS8_64; 893. PROCESS1_64; 894. PROCESS1_64; ^ 895. return XXH64_avalanche(h64); 896. #2432 storage/rocksdb/rocksdb/util/xxhash.cc:908: error: Dead Store The value written to `&ptr` is never used. 906. case 6: PROCESS4_64; 907. PROCESS1_64; 908. PROCESS1_64; ^ 909. return XXH64_avalanche(h64); 910. #2433 storage/rocksdb/rocksdb/util/xxhash.cc:920: error: Dead Store The value written to `&ptr` is never used. 918. PROCESS1_64; 919. PROCESS1_64; 920. PROCESS1_64; ^ 921. return XXH64_avalanche(h64); 922. #2434 storage/rocksdb/rocksdb/util/xxhash.cc:941: error: Dead Store The value written to `&ptr` is never used. 939. FALLTHROUGH_INTENDED; 940. /* fallthrough */ 941. case 1: PROCESS1_64; ^ 942. FALLTHROUGH_INTENDED; 943. /* fallthrough */ #2435 storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:387: error: Unnecessary Copy Intermediate `_progress_callback` is copied into field `progress_callback` but is not modified afterwards. Rather than copying into the field, move into it instead. 385. rate_limiter(_rate_limiter), 386. size_limit(_size_limit), 387. progress_callback(_progress_callback) {} ^ 388. }; 389. #2436 storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:748: error: Unnecessary Copy Intermediate variable `work_item.progress_callback` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 746. work_item.sync, work_item.rate_limiter, &result.size, 747. &result.checksum_value, work_item.size_limit, 748. work_item.progress_callback); ^ 749. work_item.result.set_value(std::move(result)); 750. } #2437 storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:1746: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 1745. 1744. std::unique_ptr backup_meta_file; 1745. s = env_->NewSequentialFile(meta_filename_, &backup_meta_file, EnvOptions()); 1746. if (!s.ok()) { ^ 1747. return s; 1748. } #2438 storage/rocksdb/rocksdb/utilities/backupable/backupable_db.cc:1755: error: Use After Lifetime The call to `rocksdb::SequentialFileReader::Read` may trigger the following issue: call to `rocksdb::SequentialFileReader::Read()` eventually accesses memory that is the address of a C++ temporary of type `rocksdb::IOStatus*` whose lifetime has ended during the call to `rocksdb::SequentialFileReader::Read()` on line 49. 1753. std::unique_ptr buf(new char[max_backup_meta_file_size_ + 1]); 1754. Slice data; 1755. s = backup_meta_reader->Read(max_backup_meta_file_size_, &data, buf.get()); ^ 1756. 1757. if (!s.ok() || data.size() == max_backup_meta_file_size_) { #2439 storage/rocksdb/rocksdb/utilities/blob_db/blob_db_impl.cc:749: error: Unnecessary Copy Intermediate variable `&check` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 747. 748. std::shared_ptr check = *(open_ttl_files_.rbegin()); 749. return (check->expiration_range_.second <= expiration) ? nullptr : check; ^ 750. } 751. #2440 storage/rocksdb/rocksdb/utilities/blob_db/blob_db_impl.cc:1828: error: Unnecessary Copy Intermediate variable `blob_file` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 1826. assert(blob_file->Immutable()); 1827. 1828. ObsoleteBlobFile(blob_file, seq, true /*update_size*/); ^ 1829. } 1830. } #2441 storage/rocksdb/rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc:79: error: Unnecessary Copy copied variable `blob_file` is not modified after it is copied from `bfile_pair.second` on line 79. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 77. ret.reserve(ret.size() + blob_files_.size()); 78. for (auto bfile_pair : blob_files_) { 79. auto blob_file = bfile_pair.second; ^ 80. // Path should be relative to db_name, but begin with slash. 81. ret.emplace_back( #2442 storage/rocksdb/rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc:94: error: Unnecessary Copy copied variable `blob_file` is not modified after it is copied from `bfile_pair.second` on line 94. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 92. db_->GetLiveFilesMetaData(metadata); 93. for (auto bfile_pair : blob_files_) { 94. auto blob_file = bfile_pair.second; ^ 95. LiveFileMetaData filemetadata; 96. filemetadata.size = static_cast(blob_file->GetFileSize()); #2443 storage/rocksdb/rocksdb/utilities/blob_db/blob_dump_tool.cc:47: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 46. 45. std::unique_ptr file; 46. s = env->NewRandomAccessFile(filename, &file, EnvOptions()); 47. if (!s.ok()) { ^ 48. return s; 49. } #2444 storage/rocksdb/rocksdb/utilities/blob_db/blob_dump_tool.cc:268: error: Const Refable Parameter Function parameter `p` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 266. 267. template 268. std::string BlobDumpTool::GetString(std::pair p) { ^ 269. if (p.first == 0 && p.second == 0) { 270. return "nil"; #2445 storage/rocksdb/rocksdb/utilities/blob_db/blob_file.cc:51: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 50. 49. std::string pn(PathName()); 50. Status s = Env::Default()->DeleteFile(PathName()); 51. if (!s.ok()) { ^ 52. // ROCKS_LOG_INFO(db_options_.info_log, 53. // "File could not be deleted %s", pn.c_str()); #2446 storage/rocksdb/rocksdb/utilities/blob_db/blob_file.cc:79: error: Unnecessary Copy Intermediate variable `&path_name` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 77. std::unique_ptr sfile_reader; 78. sfile_reader.reset(new RandomAccessFileReader( 79. NewLegacyRandomAccessFileWrapper(sfile), path_name)); ^ 80. 81. std::shared_ptr log_reader = std::make_shared( #2447 storage/rocksdb/rocksdb/utilities/blob_db/blob_file.cc:226: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 225. 224. uint64_t file_size = 0; 225. Status s = env->GetFileSize(PathName(), &file_size); 226. if (s.ok()) { ^ 227. file_size_ = file_size; 228. } else { #2448 storage/rocksdb/rocksdb/utilities/blob_db/blob_file.cc:246: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 245. 244. std::unique_ptr file; 245. s = env->NewRandomAccessFile(PathName(), &file, env_options); 246. if (!s.ok()) { ^ 247. ROCKS_LOG_ERROR(info_log_, 248. "Failed to open blob file %" PRIu64 ", status: %s", #2449 storage/rocksdb/rocksdb/utilities/checkpoint/checkpoint_impl.cc:464: error: Const Refable Parameter Function parameter `copy_file_cb` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 462. } 463. 464. Status CheckpointImpl::ExportFilesInMetaData( ^ 465. const DBOptions& db_options, const ColumnFamilyMetaData& metadata, 466. std::functionname` on line 490. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 488. assert(type == kTableFile); 489. assert(file_metadata.size > 0 && file_metadata.name[0] == '/'); 490. const auto src_fname = file_metadata.name; ^ 491. ++num_files; 492. #2452 storage/rocksdb/rocksdb/utilities/env_mirror.cc:22: error: Unnecessary Copy Intermediate `f` is copied into field `fname` but is not modified afterwards. Rather than copying into the field, move into it instead. 20. std::unique_ptr a_, b_; 21. std::string fname; 22. explicit SequentialFileMirror(std::string f) : fname(f) {} ^ 23. 24. Status Read(size_t n, Slice* result, char* scratch) override { #2453 storage/rocksdb/rocksdb/utilities/env_mirror.cc:66: error: Unnecessary Copy Intermediate `f` is copied into field `fname` but is not modified afterwards. Rather than copying into the field, move into it instead. 64. std::unique_ptr a_, b_; 65. std::string fname; 66. explicit RandomAccessFileMirror(std::string f) : fname(f) {} ^ 67. 68. Status Read(uint64_t offset, size_t n, Slice* result, #2454 storage/rocksdb/rocksdb/utilities/env_mirror.cc:102: error: Unnecessary Copy Intermediate `f` is copied into field `fname` but is not modified afterwards. Rather than copying into the field, move into it instead. 100. std::string fname; 101. explicit WritableFileMirror(std::string f, const EnvOptions& options) 102. : WritableFile(options), fname(f) {} ^ 103. 104. Status Append(const Slice& data) override { #2455 storage/rocksdb/rocksdb/utilities/memory/memory_util.cc:14: error: Const Refable Parameter Function parameter `cache_set` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 12. namespace ROCKSDB_NAMESPACE { 13. 14. Status MemoryUtil::GetApproximateMemoryUsageByType( ^ 15. const std::vector& dbs, 16. const std::unordered_set cache_set, #2456 storage/rocksdb/rocksdb/utilities/merge_operators/max.cc:57: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 57. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 55. Logger* /*logger*/) const override { 56. Slice max; 57. for (const auto& operand : operand_list) { ^ 58. if (max.compare(operand) < 0) { 59. max = operand; #2457 storage/rocksdb/rocksdb/utilities/merge_operators/string_append/stringappend2.cc:89: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 89. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 87. // Determine and reserve correct size for *new_value. 88. size_t size = 0; 89. for (const auto& operand : operand_list) { ^ 90. size += operand.size(); 91. } #2458 storage/rocksdb/rocksdb/utilities/option_change_migration/option_change_migration.cc:79: error: Const Refable Parameter Function parameter `dbname` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 77. } 78. 79. Status MigrateToUniversal(std::string dbname, const Options& old_opts, ^ 80. const Options& new_opts) { 81. if (old_opts.num_levels <= new_opts.num_levels || #2459 storage/rocksdb/rocksdb/utilities/option_change_migration/option_change_migration.cc:107: error: Const Refable Parameter Function parameter `dbname` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 105. } 106. 107. Status MigrateToLevelBase(std::string dbname, const Options& old_opts, ^ 108. const Options& new_opts) { 109. if (!new_opts.level_compaction_dynamic_level_bytes) { #2460 storage/rocksdb/rocksdb/utilities/option_change_migration/option_change_migration.cc:140: error: Const Refable Parameter Function parameter `dbname` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 138. } // namespace 139. 140. Status OptionChangeMigration(std::string dbname, const Options& old_opts, ^ 141. const Options& new_opts) { 142. if (old_opts.compaction_style == CompactionStyle::kCompactionStyleFIFO) { #2461 storage/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier.cc:102: error: Unnecessary Copy copied variable `file` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 102. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 100. 101. // cleanup files with the patter :digi:.rc 102. for (auto file : files) { ^ 103. if (IsCacheFile(file)) { 104. // cache file #2462 storage/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc:53: error: Use After Lifetime accessing `&status` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 52. 51. 52. Status status = env_->GetFileSize(Path(), size); 53. if (!status.ok()) { ^ 54. return status; 55. } #2463 storage/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc:561: error: Const Refable Parameter Function parameter `callback` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 559. } 560. 561. void ThreadedWriter::Write(WritableFile* const file, CacheWriteBuffer* buf, ^ 562. const uint64_t file_off, 563. const std::function callback) { #2464 storage/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_file_buffer.h:83: error: Use After Delete accessing `buf` that was invalidated by `delete` on line 83. 81. assert(bufs_.size() * buffer_size_ == Capacity()); 82. for (auto* buf : bufs_) { 83. delete buf; ^ 84. } 85. bufs_.clear(); #2465 storage/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.cc:75: error: Use After Delete call to `rocksdb::HashTable::Erase()` eventually accesses `binfo` that was invalidated by `delete` on line 79. 73. for (BlockInfo* binfo : f->block_infos()) { 74. BlockInfo* tmp = nullptr; 75. bool status = block_index_.Erase(binfo, &tmp); ^ 76. (void)status; 77. assert(status); #2466 storage/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_tier.cc:86: error: Unnecessary Copy copied variable `tier_stats` is not modified after it is copied from `compiler-generated variable.__infer_backing_array[compiler-generated variable.__infer_backing_pointer]` on line 86. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 84. std::string PersistentCacheTier::PrintStats() { 85. std::ostringstream os; 86. for (auto tier_stats : Stats()) { ^ 87. os << "---- next tier -----" << std::endl; 88. for (auto stat : tier_stats) { #2467 storage/rocksdb/rocksdb/utilities/simulator_cache/cache_simulator.cc:17: error: Unnecessary Copy Intermediate `sim_cache` is copied into field `sim_cache_` but is not modified afterwards. Rather than copying into the field, move into it instead. 15. 16. GhostCache::GhostCache(std::shared_ptr sim_cache) 17. : sim_cache_(sim_cache) {} ^ 18. 19. bool GhostCache::Admit(const Slice& lookup_key) { #2468 storage/rocksdb/rocksdb/utilities/simulator_cache/cache_simulator.cc:32: error: Unnecessary Copy Intermediate `sim_cache` is copied into field `sim_cache_` but is not modified afterwards. Rather than copying into the field, move into it instead. 30. CacheSimulator::CacheSimulator(std::unique_ptr&& ghost_cache, 31. std::shared_ptr sim_cache) 32. : ghost_cache_(std::move(ghost_cache)), sim_cache_(sim_cache) {} ^ 33. 34. void CacheSimulator::Access(const BlockCacheTraceRecord& access) { #2469 storage/rocksdb/rocksdb/utilities/simulator_cache/cache_simulator.cc:207: error: Unnecessary Copy copied variable `cache_name` is not modified after it is copied from `config->cache_name` on line 207. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 205. std::shared_ptr sim_cache; 206. std::unique_ptr ghost_cache; 207. std::string cache_name = config.cache_name; ^ 208. if (cache_name.find(kGhostCachePrefix) != std::string::npos) { 209. ghost_cache.reset(new GhostCache( #2470 storage/rocksdb/rocksdb/utilities/simulator_cache/cache_simulator.h:132: error: Unnecessary Copy Intermediate variable `sim_cache` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 130. PrioritizedCacheSimulator(std::unique_ptr&& ghost_cache, 131. std::shared_ptr sim_cache) 132. : CacheSimulator(std::move(ghost_cache), sim_cache) {} ^ 133. void Access(const BlockCacheTraceRecord& access) override; 134. #2471 storage/rocksdb/rocksdb/utilities/simulator_cache/cache_simulator.h:161: error: Unnecessary Copy Intermediate variable `sim_cache` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 159. std::shared_ptr sim_cache, 160. bool insert_blocks_upon_row_kvpair_miss) 161. : PrioritizedCacheSimulator(std::move(ghost_cache), sim_cache), ^ 162. insert_blocks_upon_row_kvpair_miss_( 163. insert_blocks_upon_row_kvpair_miss) {} #2472 storage/rocksdb/rocksdb/utilities/simulator_cache/sim_cache.cc:77: error: Unnecessary Copy Assignment `&s` is copy assigned into field `bg_status_` but is not modified afterwards. Rather than copying into the field, move into it instead. 75. Status s = file_writer_->Append(log_line); 76. if (!s.ok() && bg_status_.ok()) { 77. bg_status_ = s; ^ 78. } 79. if (MaxLoggingSizeReached() || !bg_status_.ok()) { #2473 storage/rocksdb/rocksdb/utilities/simulator_cache/sim_cache.cc:102: error: Unnecessary Copy Assignment `&s` is copy assigned into field `bg_status_` but is not modified afterwards. Rather than copying into the field, move into it instead. 100. Status s = file_writer_->Append(log_line); 101. if (!s.ok() && bg_status_.ok()) { 102. bg_status_ = s; ^ 103. } 104. #2474 storage/rocksdb/rocksdb/utilities/simulator_cache/sim_cache.cc:135: error: Unnecessary Copy Assignment `&s` is copy assigned into field `bg_status_` but is not modified afterwards. Rather than copying into the field, move into it instead. 133. Status s = file_writer_->Close(); 134. if (!s.ok() && bg_status_.ok()) { 135. bg_status_ = s; ^ 136. } 137. } #2475 storage/rocksdb/rocksdb/utilities/simulator_cache/sim_cache.cc:158: error: Unnecessary Copy Intermediate `cache` is copied into field `cache_` but is not modified afterwards. Rather than copying into the field, move into it instead. 156. // test_capacity for key only cache 157. SimCacheImpl(std::shared_ptr sim_cache, std::shared_ptr cache) 158. : cache_(cache), ^ 159. key_only_cache_(sim_cache), 160. miss_times_(0), #2476 storage/rocksdb/rocksdb/utilities/simulator_cache/sim_cache.cc:159: error: Unnecessary Copy Intermediate `sim_cache` is copied into field `key_only_cache_` but is not modified afterwards. Rather than copying into the field, move into it instead. 157. SimCacheImpl(std::shared_ptr sim_cache, std::shared_ptr cache) 158. : cache_(cache), 159. key_only_cache_(sim_cache), ^ 160. miss_times_(0), 161. hit_times_(0), #2477 storage/rocksdb/rocksdb/utilities/simulator_cache/sim_cache.cc:342: error: Unnecessary Copy Intermediate variable `cache` is copied into an intermediate and is never modified. To avoid the copy, call `std::move` instead or change the callee's parameter type to `const &`. 340. co.num_shard_bits = num_shard_bits; 341. co.metadata_charge_policy = kDontChargeCacheMetadata; 342. return NewSimCache(NewLRUCache(co), cache, num_shard_bits); ^ 343. } 344. #2478 storage/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction.h:85: error: Unnecessary Copy Assignment `ids` is copy assigned into field `waiting_txn_ids_` but is not modified afterwards. Rather than copying into the field, move into it instead. 83. const std::string* key) { 84. std::lock_guard lock(wait_mutex_); 85. waiting_txn_ids_ = ids; ^ 86. waiting_cf_id_ = column_family_id; 87. waiting_key_ = key; #2479 storage/rocksdb/rocksdb/utilities/transactions/transaction_base.cc:88: error: Unnecessary Copy Assignment `notifier` is copy assigned into field `snapshot_notifier_` but is not modified afterwards. Rather than copying into the field, move into it instead. 86. std::shared_ptr notifier) { 87. snapshot_needed_ = true; 88. snapshot_notifier_ = notifier; ^ 89. } 90. #2480 storage/rocksdb/rocksdb/utilities/transactions/transaction_base.h:319: error: Unnecessary Copy Intermediate `snapshot` is copied into field `snapshot_` but is not modified afterwards. Rather than copying into the field, move into it instead. 317. std::shared_ptr snapshot_notifier, 318. uint64_t num_puts, uint64_t num_deletes, uint64_t num_merges) 319. : snapshot_(snapshot), ^ 320. snapshot_needed_(snapshot_needed), 321. snapshot_notifier_(snapshot_notifier), #2481 storage/rocksdb/rocksdb/utilities/transactions/transaction_base.h:321: error: Unnecessary Copy Intermediate `snapshot_notifier` is copied into field `snapshot_notifier_` but is not modified afterwards. Rather than copying into the field, move into it instead. 319. : snapshot_(snapshot), 320. snapshot_needed_(snapshot_needed), 321. snapshot_notifier_(snapshot_notifier), ^ 322. num_puts_(num_puts), 323. num_deletes_(num_deletes), #2482 storage/rocksdb/rocksdb/utilities/transactions/transaction_lock_mgr.cc:172: error: Unnecessary Copy Intermediate `mutex_factory` is copied into field `mutex_factory_` but is not modified afterwards. Rather than copying into the field, move into it instead. 170. lock_maps_cache_(new ThreadLocalPtr(&UnrefLockMapsCache)), 171. dlock_buffer_(max_num_deadlocks), 172. mutex_factory_(mutex_factory) { ^ 173. assert(txn_db); 174. txn_db_impl_ = #2483 storage/rocksdb/rocksdb/utilities/transactions/transaction_lock_mgr.cc:267: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 267. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 265. *expire_time = lock_info.expiration_time; 266. } else { 267. for (auto id : lock_info.txn_ids) { ^ 268. if (txn_id == id) { 269. continue; #2484 storage/rocksdb/rocksdb/utilities/transactions/transaction_lock_mgr.cc:429: error: Unnecessary Copy copied variable `__begin1` is not modified after it is copied from a source on line 429. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 427. wait_txn_map_.Delete(id); 428. 429. for (auto wait_id : wait_ids) { ^ 430. rev_wait_txn_map_.Get(wait_id)--; 431. if (rev_wait_txn_map_.Get(wait_id) == 0) { #2485 storage/rocksdb/rocksdb/utilities/transactions/transaction_lock_mgr.cc:429: error: Unnecessary Copy copied variable `__end1` is not modified after it is copied from a source on line 429. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 427. wait_txn_map_.Delete(id); 428. 429. for (auto wait_id : wait_ids) { ^ 430. rev_wait_txn_map_.Get(wait_id)--; 431. if (rev_wait_txn_map_.Get(wait_id) == 0) { #2486 storage/rocksdb/rocksdb/utilities/transactions/write_prepared_txn.cc:275: error: Unnecessary Copy Intermediate `_roptions` is copied into field `roptions_` but is not modified afterwards. Rather than copying into the field, move into it instead. 273. handles_(handles), 274. rollback_merge_operands_(rollback_merge_operands), 275. roptions_(_roptions) {} ^ 276. 277. Status Rollback(uint32_t cf, const Slice& key) { #2487 storage/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.cc:309: error: Unnecessary Copy Intermediate `s` is copied into field `snapshot` but is not modified afterwards. Rather than copying into the field, move into it instead. 307. SequenceNumber min_uncommitted) 308. : callback(txn_db, sequence, min_uncommitted, kBackedByDBSnapshot), 309. snapshot(s) {} ^ 310. 311. WritePreparedTxnReadCallback callback; #2488 storage/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.cc:326: error: Dead Store The value written to `&snapshot_seq` is never used. 324. constexpr bool ALLOW_REFRESH = true; 325. std::shared_ptr own_snapshot = nullptr; 326. SequenceNumber snapshot_seq = kMaxSequenceNumber; ^ 327. SequenceNumber min_uncommitted = 0; 328. if (options.snapshot != nullptr) { #2489 storage/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.cc:362: error: Dead Store The value written to `&snapshot_seq` is never used. 360. constexpr bool ALLOW_REFRESH = true; 361. std::shared_ptr own_snapshot = nullptr; 362. SequenceNumber snapshot_seq = kMaxSequenceNumber; ^ 363. SequenceNumber min_uncommitted = 0; 364. if (options.snapshot != nullptr) { #2490 storage/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.cc:735: error: Use After Lifetime accessing `&s` that is the address of a C++ temporary of type `rocksdb::Status*` whose lifetime has ended on line 733. 733. Status s = txn0->SetName(name); 734. assert(s.ok()); 735. if (s.ok()) { ^ 736. // Without prepare it would simply skip the commit 737. s = txn0->Prepare(); #2491 storage/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn.cc:101: error: Const Refable Parameter Function parameter `do_write` is passed by-value but not modified inside this function, resulting in a potential unnecessary copy at the function's callsites. Change the type of the parameter to `const &`. 99. } 100. 101. Status WriteUnpreparedTxn::HandleWrite(std::function do_write) { ^ 102. Status s; 103. if (active_iterators_.empty()) { #2492 storage/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn_db.cc:59: error: Unnecessary Copy copied variable `it` is not modified after it is copied from a source on line 59. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 57. 58. // Iterate starting with largest sequence number. 59. for (auto it = rtxn->batches_.rbegin(); it != rtxn->batches_.rend(); ++it) { ^ 60. auto last_visible_txn = it->first - 1; 61. const auto& batch = it->second.batch_; #2493 storage/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn_db.cc:371: error: Unnecessary Copy Intermediate `s` is copied into field `snapshot` but is not modified afterwards. Rather than copying into the field, move into it instead. 369. : callback(txn_db, sequence, min_uncommitted, txn->unprep_seqs_, 370. kBackedByDBSnapshot), 371. snapshot(s) {} ^ 372. SequenceNumber MaxVisibleSeq() { return callback.max_visible_seq(); } 373. #2494 storage/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn_db.cc:391: error: Dead Store The value written to `&snapshot_seq` is never used. 389. constexpr bool ALLOW_REFRESH = true; 390. std::shared_ptr own_snapshot = nullptr; 391. SequenceNumber snapshot_seq = kMaxSequenceNumber; ^ 392. SequenceNumber min_uncommitted = 0; 393. #2495 storage/rocksdb/rocksdb/utilities/ttl/db_ttl_impl.h:207: error: Unnecessary Copy Intermediate `comp_filter_factory` is copied into field `user_comp_filter_factory_` but is not modified afterwards. Rather than copying into the field, move into it instead. 205. int32_t ttl, Env* env, 206. std::shared_ptr comp_filter_factory) 207. : ttl_(ttl), env_(env), user_comp_filter_factory_(comp_filter_factory) {} ^ 208. 209. virtual std::unique_ptr CreateCompactionFilter( #2496 storage/rocksdb/rocksdb/utilities/ttl/db_ttl_impl.h:269: error: Dead Store The value written to `&good` is never used. 267. 268. // Apply the user merge operator (store result in *new_value) 269. bool good = true; ^ 270. MergeOperationOutput user_merge_out(merge_out->new_value, 271. merge_out->existing_operand); #2497 storage/rocksdb/rocksdb/utilities/ttl/db_ttl_impl.h:320: error: Unnecessary Copy copied variable `__end2` is not modified after it is copied from a source on line 320. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 318. std::deque operands_without_ts; 319. 320. for (const auto& operand : operand_list) { ^ 321. if (operand.size() < ts_len) { 322. ROCKS_LOG_ERROR(logger, #2498 storage/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index.cc:415: error: Uninitialized Value `__param_0.type` is read without initialization during the call to `rocksdb::WriteEntry::WriteEntry()`. 413. ret.type == kSingleDeleteRecord || ret.type == kDeleteRangeRecord || 414. ret.type == kMergeRecord); 415. return ret; ^ 416. } 417. #2499 storage/sphinx/ha_sphinx.cc:2959: error: Dead Store The value written to `&iSocket` is never used. 2957. 2958. ::closesocket ( iSocket ); 2959. iSocket = -1; ^ 2960. 2961. if ( iRecvLength!=(int)uRespLength ) #2500 storage/sphinx/snippets_udf.cc:73: error: Uninitialized Value `uTmp` is read without initialization. 71. for ( int i=0; i<(int)sizeof(T); i++ ) 72. *pDst++ = *pSrc++; 73. return uTmp; ^ 74. } 75. #2501 storage/sphinx/snippets_udf.cc:448: error: Dead Store The value written to `&iSocket` is never used. 446. uint uServerVersion; 447. uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); 448. int iSocket = -1; ^ 449. const char * pError = NULL; 450. do #2502 storage/spider/ha_spider.cc:463: error: Dead Store The value written to `&wide_share` is never used. 461. if (partition_handler_alloc) 462. { 463. wide_share = share->wide_share; ^ 464. spider->partition_handler = NULL; 465. owner->partition_handler = NULL; #2503 storage/spider/spd_db_conn.cc:8443: error: Uninitialized Value `table` is read without initialization. 8441. { 8442. THD *thd = NULL; 8443. TABLE *UNINIT_VAR(table); ^ 8444. MY_BITMAP *saved_map = NULL; 8445. Time_zone *UNINIT_VAR(saved_time_zone); #2504 storage/spider/spd_db_conn.cc:8445: error: Uninitialized Value `saved_time_zone` is read without initialization. 8443. TABLE *UNINIT_VAR(table); 8444. MY_BITMAP *saved_map = NULL; 8445. Time_zone *UNINIT_VAR(saved_time_zone); ^ 8446. String str_value; 8447. char tmp_buf[MAX_FIELD_WIDTH]; #2505 storage/spider/spd_direct_sql.cc:186: error: Dead Store The value written to `&tables_on_different_db_are_joinable` is never used. 184. 185. uint roop_count2; 186. bool tables_on_different_db_are_joinable = TRUE; ^ 187. direct_sql->dbton_id = SPIDER_DBTON_SIZE; 188. DBUG_PRINT("info",("spider direct_sql->tgt_wrapper=%s", #2506 storage/spider/spd_direct_sql.cc:314: error: Dead Store The value written to `&tables_on_different_db_are_joinable` is never used. 312. char *tmp_dsn, *tmp_filedsn, *tmp_driver; 313. int *need_mon; 314. bool tables_on_different_db_are_joinable = TRUE; ^ 315. DBUG_ENTER("spider_udf_direct_sql_create_conn"); 316. #2507 storage/spider/spd_i_s.cc:44: error: Static Initialization Order Fiasco Initializer of Show::spider_i_s_alloc_mem_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 42. 43. namespace Show { 44. static ST_FIELD_INFO spider_i_s_alloc_mem_fields_info[] = ^ 45. { 46. Column("ID", ULong(10), NOT_NULL, "id"), #2508 storage/spider/spd_i_s.cc:163: error: Static Initialization Order Fiasco Initializer of Show::spider_i_s_wrapper_protocols_fields_info accesses global variable from a different translation unit: type_handler_varchar|. 161. 162. namespace Show { 163. static ST_FIELD_INFO spider_i_s_wrapper_protocols_fields_info[] = ^ 164. { 165. Column("WRAPPER_NAME", Varchar(NAME_CHAR_LEN), NOT_NULL, ""), #2509 storage/spider/spd_table.cc:6051: error: Uninitialized Value `conn` is read without initialization during the call to `spider_db_unlock_tables()`. 6049. if (conn->table_lock != 2) 6050. { 6051. spider_db_unlock_tables(trx->tmp_spider, 0); ^ 6052. } 6053. conn->table_lock = 0; #2510 storage/spider/spd_table.cc:6633: error: Dead Store The value written to `&dbton_id` is never used. 6631. spider_dbton_mariadb.db_util->dbton_id = dbton_id; 6632. spider_dbton[dbton_id] = spider_dbton_mariadb; 6633. ++dbton_id; ^ 6634. for (roop_count = 0; roop_count < SPIDER_DBTON_SIZE; roop_count++) 6635. { #2511 storage/spider/spd_table.cc:6812: error: Dead Store The value written to `&tmp` is never used. 6810. { 6811. tmp = strmov(tmp, "#SP#"); 6812. tmp = strmov(tmp, sub_name); ^ 6813. } 6814. } #2512 storage/spider/spd_trx.cc:161: error: Uninitialized Value `conn` is read without initialization during the call to `spider_db_unlock_tables()`. 159. roop_count))) 160. { 161. if (lock && (tmp_error_num = spider_db_unlock_tables(trx->tmp_spider, 0))) ^ 162. error_num = tmp_error_num; 163. spider_free_conn_from_trx(trx, conn, TRUE, TRUE, &roop_count); #2513 storage/spider/spd_trx.cc:197: error: Uninitialized Value `conn` is read without initialization during the call to `spider_db_lock_tables()`. 195. roop_count))) 196. { 197. if ((error_num = spider_db_lock_tables(&tmp_spider, 0))) ^ 198. { 199. SPIDER_CONN_RESTORE_DASTATUS_AND_RESET_ERROR_NUM; #2514 storage/spider/spd_trx.cc:291: error: Uninitialized Value `conn` is read without initialization during the call to `spider_db_unlock_tables()`. 289. roop_count))) 290. { 291. if ((error_num = spider_db_unlock_tables(trx->tmp_spider, 0))) ^ 292. { 293. SPIDER_CONN_RESTORE_DASTATUS_AND_RESET_ERROR_NUM; #2515 storage/spider/spd_trx.cc:1509: error: Dead Store The value written to `&xa_lock` is never used. 1507. goto error; 1508. } 1509. xa_lock = TRUE; ^ 1510. } else 1511. trx->internal_xa = FALSE; #2516 storage/spider/spd_trx.cc:2199: error: Uninitialized Value `open_tables_backup` is read without initialization during the call to `spider_close_sys_table()`. 2197. if (trx->updated_in_this_trx || spider_param_xa_register_mode(thd) == 0) 2198. { 2199. spider_close_sys_table(thd, table_xa_member, &open_tables_backup, TRUE); ^ 2200. table_xa_member_opened = FALSE; 2201. #2517 storage/spider/spd_trx.cc:2311: error: Dead Store The value written to `&error_num` is never used. 2309. if (!(read_record = new READ_RECORD)) 2310. { 2311. error_num = HA_ERR_OUT_OF_MEM; ^ 2312. goto error_create_read_record; 2313. } #2518 storage/spider/spd_trx.cc:2317: error: Dead Store The value written to `&error_num` is never used. 2315. if (!(thd = spider_create_tmp_thd())) 2316. { 2317. error_num = HA_ERR_OUT_OF_MEM; ^ 2318. goto error_create_thd; 2319. } #2519 strings/ctype-mb.c:228: error: Dead Store The value written to `&mb` is never used. 226. { /* Found w_many */ 227. uchar cmp; 228. const char* mb = wildstr; ^ 229. int mb_len=0; 230. #2520 strings/ctype-mb.c:1101: error: Dead Store The value written to `&mb` is never used. 1099. { /* Found w_many */ 1100. int cmp; 1101. const char* mb = wildstr; ^ 1102. int mb_len=0; 1103. #2521 strings/ctype-mb.c:1397: error: Dead Store The value written to `&mb_len` is never used. 1395. if ((mb_len= my_ci_mb_wc(cs, &wc, (uchar*) b, (uchar*) e)) <= 0) 1396. { 1397. mb_len= 1; /* Let's think a wrong sequence takes 1 dysplay cell */ ^ 1398. b++; 1399. continue; #2522 strings/ctype-uca.c:31903: error: Dead Store The value written to `&result` is never used. 31901. int escape, int w_one, int w_many, int recurse_level) 31902. { 31903. int result= -1; /* Not found, using wildcards */ ^ 31904. my_wc_t s_wc, w_wc; 31905. int scan; #2523 strings/ctype-uca.c:31921: error: Dead Store The value written to `&result` is never used. 31919. if (w_wc == (my_wc_t) w_many) 31920. { 31921. result= 1; /* Found an anchor char */ ^ 31922. break; 31923. } #2524 strings/ctype-uca.c:31942: error: Dead Store The value written to `&result` is never used. 31940. if (!escaped && w_wc == (my_wc_t) w_one) 31941. { 31942. result= 1; /* Found an anchor char */ ^ 31943. } 31944. else #2525 strings/ctype-uca.inl:103: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_generic()`. 101. do 102. { 103. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 104. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); 105. } while ( s_res == t_res && s_res >0); #2526 strings/ctype-uca.inl:103: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_ucs2()`. 101. do 102. { 103. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 104. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); 105. } while ( s_res == t_res && s_res >0); #2527 strings/ctype-uca.inl:103: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_utf32()`. 101. do 102. { 103. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 104. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); 105. } while ( s_res == t_res && s_res >0); #2528 strings/ctype-uca.inl:208: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_generic()`. 206. do 207. { 208. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 209. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); 210. } while ( s_res == t_res && s_res >0); #2529 strings/ctype-uca.inl:208: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_ucs2()`. 206. do 207. { 208. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 209. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); 210. } while ( s_res == t_res && s_res >0); #2530 strings/ctype-uca.inl:208: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_utf32()`. 206. do 207. { 208. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 209. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); 210. } while ( s_res == t_res && s_res >0); #2531 strings/ctype-uca.inl:222: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_generic()`. 220. if (s_res != t_res) 221. return (s_res - t_res); 222. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 223. } while (s_res > 0); 224. return 0; #2532 strings/ctype-uca.inl:222: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_ucs2()`. 220. if (s_res != t_res) 221. return (s_res - t_res); 222. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 223. } while (s_res > 0); 224. return 0; #2533 strings/ctype-uca.inl:222: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_utf32()`. 220. if (s_res != t_res) 221. return (s_res - t_res); 222. s_res= MY_FUNCTION_NAME(scanner_next)(&sscanner); ^ 223. } while (s_res > 0); 224. return 0; #2534 strings/ctype-uca.inl:237: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_generic()`. 235. if (s_res != t_res) 236. return (s_res - t_res); 237. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); ^ 238. } while (t_res > 0); 239. return 0; #2535 strings/ctype-uca.inl:237: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_ucs2()`. 235. if (s_res != t_res) 236. return (s_res - t_res); 237. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); ^ 238. } while (t_res > 0); 239. return 0; #2536 strings/ctype-uca.inl:237: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_utf32()`. 235. if (s_res != t_res) 236. return (s_res - t_res); 237. t_res= MY_FUNCTION_NAME(scanner_next)(&tscanner); ^ 238. } while (t_res > 0); 239. return 0; #2537 strings/ctype-uca.inl:340: error: Uninitialized Value `_.nchars` is read without initialization. 338. 339. (*generated)++; 340. res.nchars++; /* Count all ignorable characters and the padded space */ ^ 341. if (res.nchars > nchars) 342. { #2538 strings/ctype-uca.inl:354: error: Uninitialized Value `_.nchars` is read without initialization. 352. } 353. } 354. else if (res.nchars > nchars) ^ 355. { 356. /* #2539 strings/ctype-uca.inl:378: error: Uninitialized Value `_.weight` is read without initialization. 376. (*generated)++; 377. } 378. return res; ^ 379. } 380. #2540 strings/ctype-uca.inl:410: error: Uninitialized Value `_.weight` is read without initialization. 408. flags, &generated); 409. 410. if ((diff= (s_res.weight - t_res.weight))) ^ 411. return diff; 412. #2541 strings/ctype-uca.inl:410: error: Uninitialized Value `_.weight` is read without initialization. 408. flags, &generated); 409. 410. if ((diff= (s_res.weight - t_res.weight))) ^ 411. return diff; 412. #2542 strings/ctype-uca.inl:453: error: Uninitialized Value `_.nchars` is read without initialization. 451. DBUG_ASSERT(s_nchars_left >= s_res.nchars); 452. DBUG_ASSERT(t_nchars_left >= t_res.nchars); 453. s_nchars_left-= s_res.nchars; ^ 454. t_nchars_left-= t_res.nchars; 455. } #2543 strings/ctype-uca.inl:454: error: Uninitialized Value `_.nchars` is read without initialization. 452. DBUG_ASSERT(t_nchars_left >= t_res.nchars); 453. s_nchars_left-= s_res.nchars; 454. t_nchars_left-= t_res.nchars; ^ 455. } 456. #2544 strings/ctype-uca.inl:545: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_generic()`. 543. my_uca_scanner_init_any(&scanner, cs, &cs->uca->level[0], s, slen); 544. 545. while ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) >0) ^ 546. { 547. if (s_res == space_weight) #2545 strings/ctype-uca.inl:545: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_ucs2()`. 543. my_uca_scanner_init_any(&scanner, cs, &cs->uca->level[0], s, slen); 544. 545. while ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) >0) ^ 546. { 547. if (s_res == space_weight) #2546 strings/ctype-uca.inl:545: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_utf32()`. 543. my_uca_scanner_init_any(&scanner, cs, &cs->uca->level[0], s, slen); 544. 545. while ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) >0) ^ 546. { 547. if (s_res == space_weight) #2547 strings/ctype-uca.inl:554: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_generic()`. 552. { 553. count++; 554. if ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) <= 0) ^ 555. { 556. /* Skip strings at end of string */ #2548 strings/ctype-uca.inl:554: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_ucs2()`. 552. { 553. count++; 554. if ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) <= 0) ^ 555. { 556. /* Skip strings at end of string */ #2549 strings/ctype-uca.inl:554: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_utf32()`. 552. { 553. count++; 554. if ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) <= 0) ^ 555. { 556. /* Skip strings at end of string */ #2550 strings/ctype-uca.inl:599: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_ucs2()`. 597. my_uca_scanner_init_any(&scanner, cs, &cs->uca->level[0], s, slen); 598. 599. while ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) >0) ^ 600. { 601. /* See comment above why we can't use MY_HASH_ADD_16() */ #2551 strings/ctype-uca.inl:599: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_utf32()`. 597. my_uca_scanner_init_any(&scanner, cs, &cs->uca->level[0], s, slen); 598. 599. while ((s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) >0) ^ 600. { 601. /* See comment above why we can't use MY_HASH_ADD_16() */ #2552 strings/ctype-uca.inl:695: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_generic()`. 693. my_uca_scanner_init_any(&scanner, cs, level, src, srclen); 694. for (; dst < de && *nweights && 695. (s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) > 0 ; (*nweights)--) ^ 696. { 697. *dst++= s_res >> 8; #2553 strings/ctype-uca.inl:695: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_ucs2()`. 693. my_uca_scanner_init_any(&scanner, cs, level, src, srclen); 694. for (; dst < de && *nweights && 695. (s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) > 0 ; (*nweights)--) ^ 696. { 697. *dst++= s_res >> 8; #2554 strings/ctype-uca.inl:695: error: Uninitialized Value `scanner.page` is read without initialization during the call to `my_uca_scanner_next_utf32()`. 693. my_uca_scanner_init_any(&scanner, cs, level, src, srclen); 694. for (; dst < de && *nweights && 695. (s_res= MY_FUNCTION_NAME(scanner_next)(&scanner)) > 0 ; (*nweights)--) ^ 696. { 697. *dst++= s_res >> 8; #2555 strings/ctype-ucs2.c:835: error: Uninitialized Value `c` is read without initialization. 833. { 834. const uchar *s, *end, *start, *n_end, *true_end; 835. uchar UNINIT_VAR(c); ^ 836. unsigned long i, j, k; 837. ulonglong li; #2556 strings/ctype-utf8.c:4413: error: Dead Store The value written to `&result` is never used. 4411. MY_UNICASE_INFO *weights, int recurse_level) 4412. { 4413. int result= -1; /* Not found, using wildcards */ ^ 4414. my_wc_t s_wc, w_wc; 4415. int scan; #2557 strings/ctype-utf8.c:4431: error: Dead Store The value written to `&result` is never used. 4429. if (w_wc == (my_wc_t) w_many) 4430. { 4431. result= 1; /* Found an anchor char */ ^ 4432. break; 4433. } #2558 strings/ctype-utf8.c:4452: error: Dead Store The value written to `&result` is never used. 4450. if (!escaped && w_wc == (my_wc_t) w_one) 4451. { 4452. result= 1; /* Found an anchor char */ ^ 4453. } 4454. else #2559 strings/ctype-utf8.c:4642: error: Uninitialized Value `wc` is read without initialization. 4640. const uchar *src, const uchar *se) 4641. { 4642. my_wc_t UNINIT_VAR(wc); ^ 4643. uchar *dst0= dst; 4644. #2560 strings/ctype-utf8.c:7029: error: Dead Store The value written to `&s` is never used. 7027. { 7028. *s++= (code / 80) + 0x30; 7029. *s++= (code % 80) + 0x30; ^ 7030. return 3; 7031. } #2561 strings/ctype-utf8.c:7040: error: Dead Store The value written to `&s` is never used. 7038. *s++= hex[(wc >> 8) & 15]; 7039. *s++= hex[(wc >> 4) & 15]; 7040. *s++= hex[(wc) & 15]; ^ 7041. return 5; 7042. } #2562 strings/ctype.c:1044: error: Dead Store The value written to `&dst` is never used. 1042. *dst++= _dig_vec_upper[(wc >> 8) & 0x0F]; 1043. *dst++= _dig_vec_upper[(wc >> 4) & 0x0F]; 1044. *dst++= _dig_vec_upper[wc & 0x0F]; ^ 1045. return MY_CS_PRINTABLE_CHAR_LENGTH; 1046. } #2563 strings/decimal.c:348: error: Dead Store The value written to `&buf0` is never used. 346. int error=E_DEC_OK; 347. char *s=to; 348. dec1 *buf, *buf0=from->buf, tmp; ^ 349. 350. DBUG_ASSERT(*to_len >= 2+ (int) from->sign); #2564 strings/decimal.c:911: error: Dead Store The value written to `&buf` is never used. 909. } 910. if (i) 911. *--buf=x; ^ 912. 913. buf=to->buf+intg1; #2565 strings/decimal.c:1290: error: Dead Store The value written to `&buf1` is never used. 1288. decimal_digits_t frac) 1289. { 1290. dec1 mask=from->sign ? -1 : 0, *buf1=from->buf, *stop1; ^ 1291. int error=E_DEC_OK, intg=precision-frac, 1292. isize1, intg1, intg1x, #2566 strings/decimal.c:1465: error: Dead Store The value written to `&x` is never used. 1463. { 1464. int i=dig2bytes[intg0x]; 1465. dec1 UNINIT_VAR(x); ^ 1466. switch (i) 1467. { #2567 strings/decimal.c:1465: error: Uninitialized Value `x` is read without initialization. 1463. { 1464. int i=dig2bytes[intg0x]; 1465. dec1 UNINIT_VAR(x); ^ 1466. switch (i) 1467. { #2568 strings/decimal.c:1506: error: Dead Store The value written to `&x` is never used. 1504. { 1505. int i=dig2bytes[frac0x]; 1506. dec1 UNINIT_VAR(x); ^ 1507. switch (i) 1508. { #2569 strings/decimal.c:1506: error: Uninitialized Value `x` is read without initialization. 1504. { 1505. int i=dig2bytes[frac0x]; 1506. dec1 UNINIT_VAR(x); ^ 1507. switch (i) 1508. { #2570 strings/decimal.c:1518: error: Dead Store The value written to `&buf` is never used. 1516. if (((uint32)*buf) > DIG_MAX) 1517. goto err; 1518. buf++; ^ 1519. } 1520. my_afree(d_copy); #2571 strings/decimal.c:1591: error: Dead Store The value written to `&round_digit` is never used. 1589. decimal_round_mode mode) 1590. { 1591. int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1, ^ 1592. frac1=ROUND_UP(from->frac), UNINIT_VAR(round_digit), 1593. intg0=ROUND_UP(from->intg), error=E_DEC_OK, len=to->len; #2572 strings/decimal.c:1592: error: Uninitialized Value `round_digit` is read without initialization. 1590. { 1591. int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1, 1592. frac1=ROUND_UP(from->frac), UNINIT_VAR(round_digit), ^ 1593. intg0=ROUND_UP(from->intg), error=E_DEC_OK, len=to->len; 1594. #2573 strings/decimal.c:1902: error: Dead Store The value written to `&buf0` is never used. 1900. 1901. if (unlikely(carry)) 1902. *--buf0=1; ^ 1903. DBUG_ASSERT(buf0 == to->buf || buf0 == to->buf+1); 1904. #2574 strings/decimal.c:2235: error: Dead Store The value written to `&error` is never used. 2233. decimal_t *to, decimal_t *mod, int scale_incr) 2234. { 2235. int frac1=ROUND_UP(from1->frac)*DIG_PER_DEC1, prec1=from1->intg+frac1, ^ 2236. frac2=ROUND_UP(from2->frac)*DIG_PER_DEC1, prec2=from2->intg+frac2, 2237. UNINIT_VAR(error), i, intg0, frac0, len1, len2, dintg, div_mod=(!mod); #2575 strings/decimal.c:2237: error: Uninitialized Value `error` is read without initialization. 2235. int frac1=ROUND_UP(from1->frac)*DIG_PER_DEC1, prec1=from1->intg+frac1, 2236. frac2=ROUND_UP(from2->frac)*DIG_PER_DEC1, prec2=from2->intg+frac2, 2237. UNINIT_VAR(error), i, intg0, frac0, len1, len2, dintg, div_mod=(!mod); ^ 2238. dec1 *buf0, *buf1=from1->buf, *buf2=from2->buf, *tmp1, 2239. *start2, *stop2, *stop1, *stop0, norm2, carry, *start1, dcarry; #2576 strings/decimal.c:2311: error: Dead Store The value written to `&error` is never used. 2309. */ 2310. frac0=ROUND_UP(frac1+frac2+scale_incr); 2311. FIX_INTG_FRAC_ERROR(to->len, intg0, frac0, error); ^ 2312. to->sign=from1->sign != from2->sign; 2313. to->intg=intg0*DIG_PER_DEC1; #2577 strings/decimal.c:2317: error: Dead Store The value written to `&stop0` is never used. 2315. } 2316. buf0=to->buf; 2317. stop0=buf0+intg0+frac0; ^ 2318. if (likely(div_mod)) 2319. while (dintg++ < 0 && buf0 < &to->buf[to->len]) #2578 strings/dtoa.c:96: error: Null Dereference The call to `dtoa` may trigger the following issue: `res` could be null (from the call to `dtoa()` on line 96) and is dereferenced in the call to `dtoa()`. 94. DBUG_ASSERT(precision >= 0 && precision < DECIMAL_NOT_SPECIFIED && to != NULL); 95. 96. res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf)); ^ 97. 98. if (decpt == DTOA_OVERFLOW) #2579 strings/dtoa.c:1211: error: Dead Store The value written to `&xa` is never used. 1209. { 1210. d0= Exp_1 | y >> (Ebits - k); 1211. w= xa > xa0 ? *--xa : 0; ^ 1212. d1= y << ((32-Ebits) + k) | w >> (Ebits - k); 1213. goto ret_d; #2580 strings/dtoa.c:1219: error: Dead Store The value written to `&xa` is never used. 1217. { 1218. d0= Exp_1 | y << k | z >> (32 - k); 1219. y= xa > xa0 ? *--xa : 0; ^ 1220. d1= z << k | y >> (32 - k); 1221. } #2581 strings/dtoa.c:1353: error: Uninitialized Value `c` is read without initialization. 1351. { 1352. int scale; 1353. int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, UNINIT_VAR(c), dsign, ^ 1354. e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; 1355. const char *s, *s0, *s1, *end = *se; #2582 strings/dtoa.c:1921: error: Dead Store The value written to `&dsign` is never used. 1919. goto undfl; 1920. } 1921. dsign= 1 - dsign; ^ 1922. break; 1923. } #2583 strings/dtoa.c:2210: error: Uninitialized Value `ilim` is read without initialization. 2208. */ 2209. 2210. int bbits, b2, b5, be, dig, i, ieps, UNINIT_VAR(ilim), ilim0, ^ 2211. UNINIT_VAR(ilim1), j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, 2212. spec_case, try_quick; #2584 strings/dtoa.c:2211: error: Uninitialized Value `ilim1` is read without initialization. 2209. 2210. int bbits, b2, b5, be, dig, i, ieps, UNINIT_VAR(ilim), ilim0, 2211. UNINIT_VAR(ilim1), j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, ^ 2212. spec_case, try_quick; 2213. Long L; #2585 strings/int2str.c:111: error: Uninitialized Value `_.rem` is read without initialization. 109. ldiv_t res; 110. res=ldiv(val,radix); 111. *--p = dig_vec[res.rem]; ^ 112. val= res.quot; 113. } #2586 strings/int2str.c:112: error: Uninitialized Value `_.quot` is read without initialization. 110. res=ldiv(val,radix); 111. *--p = dig_vec[res.rem]; 112. val= res.quot; ^ 113. } 114. #else #2587 strings/json_lib.c:1349: error: Uninitialized Value `js.c_next` is read without initialization during the call to `json_key_matches()`. 1347. { 1348. json_string_set_str(&key_name, cur_step->key, cur_step->key_end); 1349. if (!json_key_matches(je, &key_name)) ^ 1350. { 1351. if (json_skip_key(je)) #2588 strings/json_lib.c:1433: error: Uninitialized Value `js.c_next` is read without initialization during the call to `json_key_matches()`. 1431. json_string_setup(&key_name, state->paths[p_c].s.cs, 1432. cur_step->key, cur_step->key_end); 1433. if (!json_key_matches(je, &key_name)) ^ 1434. continue; 1435. } #2589 strings/json_lib.c:1555: error: Uninitialized Value `js.c_next` is read without initialization during the call to `json_read_string_const_chr()`. 1553. 1554. json_string_setup(&s, json_cs, json_str, json_end); 1555. while (json_read_string_const_chr(&s) == 0) ^ 1556. { 1557. int c_len; #2590 strings/json_lib.c:1814: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `smart_read_value()`. 1812. (const uchar *) js_end); 1813. 1814. return smart_read_value(&je, value, value_len); ^ 1815. } 1816. #2591 strings/json_lib.c:1828: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 1826. (const uchar *) js_end); 1827. 1828. if (json_read_value(&je) || ^ 1829. je.value_type != JSON_VALUE_ARRAY) 1830. goto err_return; #2592 strings/json_lib.c:1890: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 1888. (const uchar *) js_end); 1889. 1890. if (json_read_value(&je) || ^ 1891. je.value_type != JSON_VALUE_OBJECT) 1892. goto err_return; #2593 strings/json_lib.c:1943: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_scan_next()`. 1941. json_engine_t je; 1942. json_scan_start(&je, cs, (const uchar *) js, (const uchar *) js + js_len); 1943. while (json_scan_next(&je) == 0) /* no-op */ ; ^ 1944. return je.s.error == 0; 1945. } #2594 strings/json_lib.c:1977: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 1975. (const uchar *) js_end); 1976. 1977. if (json_read_value(&je) || ^ 1978. je.value_type != JSON_VALUE_OBJECT) 1979. goto err_return; #2595 strings/strcoll.inl:429: error: Uninitialized Value `wc` is read without initialization. 427. const uchar *src, const uchar *se) 428. { 429. my_wc_t UNINIT_VAR(wc); ^ 430. uchar *dst0= dst; 431. #2596 strings/strcoll.inl:552: error: Uninitialized Value `wc` is read without initialization. 550. const uchar *se) 551. { 552. my_wc_t UNINIT_VAR(wc); ^ 553. uchar *dst0= dst; 554. #2597 tests/async_queries.c:327: error: Dead Store The value written to `&len` is never used. 325. q2[len--]= '\0'; 326. if (q2[len] == '\r') 327. q2[len--]= '\0'; ^ 328. 329. e->next= NULL; #2598 tests/mysql_client_fw.c:291: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 283 is not freed after the last access at line 291, column 3. 289. if (row[0] && row[1]) 290. result= strcmp(row[1], "1") == 0; 291. mysql_free_result(res); ^ 292. return result; 293. } #2599 tests/mysql_client_fw.c:706: error: Dead Store The value written to `&rc` is never used. 704. mytest(result); 705. 706. rc= my_process_result_set(result); ^ 707. mysql_free_result(result); 708. } #2600 tests/mysql_client_fw.c:746: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 732 is not freed after the last access at line 746, column 3. 744. DIE_UNLESS(FALSE); 745. } 746. mysql_free_result(result); ^ 747. } 748. #2601 tests/mysql_client_test.c:253: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 244 is not freed after the last access at line 253, column 3. 251. mytest_r(row); 252. 253. mysql_free_result(result); ^ 254. mysql_autocommit(mysql, TRUE); 255. } #2602 tests/mysql_client_test.c:326: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 317 is not freed after the last access at line 326, column 3. 324. mytest_r(row); 325. 326. mysql_free_result(result); ^ 327. mysql_autocommit(mysql, TRUE); 328. } #2603 tests/mysql_client_test.c:760: error: Dead Store The value written to `&rc` is never used. 758. /* Bind parameters. */ 759. 760. rc= mysql_stmt_bind_param(stmt, ps_params); ^ 761. 762. /* Execute! */ #2604 tests/mysql_client_test.c:1644: error: Dead Store The value written to `&double_data` is never used. 1642. memset(real_data, 0, sizeof real_data); 1643. strmov(real_data, "10.2"); 1644. double_data= 34.5; ^ 1645. rc= mysql_stmt_bind_param(stmt, my_bind); 1646. check_execute(stmt, rc); #2605 tests/mysql_client_test.c:1796: error: Dead Store The value written to `&cur_query` is never used. 1794. NULL 1795. }; 1796. const char **cur_query= queries; ^ 1797. 1798. myheader("test_null_ps_param_in_result"); #2606 tests/mysql_client_test.c:1817: error: Dead Store The value written to `&in_is_null` is never used. 1815. in_bind.length= 0; 1816. in_bind.buffer= (void *)&in_long; 1817. in_is_null= 1; ^ 1818. in_long= 1; 1819. #2607 tests/mysql_client_test.c:1818: error: Dead Store The value written to `&in_long` is never used. 1816. in_bind.buffer= (void *)&in_long; 1817. in_is_null= 1; 1818. in_long= 1; ^ 1819. 1820. out_bind.buffer_type= MYSQL_TYPE_STRING; #2608 tests/mysql_client_test.c:1843: error: Uninitialized Value `out_is_null` is read without initialization. 1841. rc= mysql_stmt_fetch(stmt); 1842. DIE_UNLESS(rc != MYSQL_NO_DATA); 1843. DIE_UNLESS(out_is_null); ^ 1844. rc= mysql_stmt_fetch(stmt); 1845. DIE_UNLESS(rc == MYSQL_NO_DATA); #2609 tests/mysql_client_test.c:2087: error: Dead Store The value written to `&nData` is never used. 2085. int rc; 2086. char szData[25]; 2087. int nData= 1; ^ 2088. MYSQL_BIND my_bind[2]; 2089. ulong length[2]; #2610 tests/mysql_client_test.c:2197: error: Dead Store The value written to `&int_data` is never used. 2195. check_execute(stmt, rc); 2196. 2197. int_data= 1; ^ 2198. strmov(str_data, "hh"); 2199. str_length= strlen(str_data); #2611 tests/mysql_client_test.c:2199: error: Dead Store The value written to `&str_length` is never used. 2197. int_data= 1; 2198. strmov(str_data, "hh"); 2199. str_length= strlen(str_data); ^ 2200. 2201. rc= mysql_stmt_execute(stmt); #2612 tests/mysql_client_test.c:2228: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 2221 is not freed after the last access at line 2228, column 3. 2226. 2227. result= atoi(row[1]); 2228. mysql_free_result(res); ^ 2229. return result; 2230. } #2613 tests/mysql_client_test.c:2787: error: Dead Store The value written to `&num` is never used. 2785. 2786. isnull= 0; 2787. num= 88; ^ 2788. for (i= 0 ; i < 4 ; i++) 2789. my_bind[i].is_null= &isnull; #2614 tests/mysql_client_test.c:2906: error: Dead Store The value written to `&nData` is never used. 2904. int rc; 2905. char szData[25]; 2906. int nData= 1; ^ 2907. MYSQL_RES *result; 2908. MYSQL_BIND my_bind[2]; #2615 tests/mysql_client_test.c:3024: error: Dead Store The value written to `&int_data` is never used. 3022. check_execute(stmt, rc); 3023. 3024. int_data= 999; ^ 3025. data= (char *)"Michael"; 3026. #2616 tests/mysql_client_test.c:3028: error: Dead Store The value written to `&rc` is never used. 3026. 3027. /* supply data in pieces */ 3028. rc= mysql_stmt_send_long_data(stmt, 1, data, strlen(data)); ^ 3029. data= (char *)" 'Monty' Widenius"; 3030. rc= mysql_stmt_send_long_data(stmt, 1, data, strlen(data)); #2617 tests/mysql_client_test.c:3111: error: Dead Store The value written to `&length` is never used. 3109. check_execute(stmt, rc); 3110. 3111. length= 40; ^ 3112. strmov(data, "MySQL AB"); 3113. #2618 tests/mysql_client_test.c:3286: error: Dead Store The value written to `&rc` is never used. 3284. my_bind[0].length= &blob_length; 3285. my_bind[0].error= &my_bind[0].error_value; 3286. rc= mysql_stmt_bind_result(stmt, my_bind); ^ 3287. data[16]= 0; 3288. #2619 tests/mysql_client_test.c:3356: error: Dead Store The value written to `&length` is never used. 3354. check_execute(stmt, rc); 3355. 3356. length= 10; ^ 3357. strmov(data, "MySQL AB"); 3358. #2620 tests/mysql_client_test.c:3400: error: Dead Store The value written to `&nData` is never used. 3398. int rc; 3399. char szData[30]= {0}; 3400. int nData= 1; ^ 3401. MYSQL_RES *result; 3402. MYSQL_BIND my_bind[2]; #2621 tests/mysql_client_test.c:3524: error: Dead Store The value written to `&nData` is never used. 3522. check_execute(stmt, rc); 3523. 3524. nData= 100; ^ 3525. rc= mysql_stmt_execute(stmt); 3526. check_execute(stmt, rc); #2622 tests/mysql_client_test.c:3683: error: Uninitialized Value `nData` is read without initialization. 3681. 3682. if (!opt_silent) 3683. fprintf(stdout, "\n row 1: %d, %s(%lu)", nData, szData, length1); ^ 3684. DIE_UNLESS(nData == 10); 3685. DIE_UNLESS(strcmp(szData, "venu") == 0); #2623 tests/mysql_client_test.c:3683: error: Uninitialized Value `length1` is read without initialization. 3681. 3682. if (!opt_silent) 3683. fprintf(stdout, "\n row 1: %d, %s(%lu)", nData, szData, length1); ^ 3684. DIE_UNLESS(nData == 10); 3685. DIE_UNLESS(strcmp(szData, "venu") == 0); #2624 tests/mysql_client_test.c:3684: error: Uninitialized Value `nData` is read without initialization. 3682. if (!opt_silent) 3683. fprintf(stdout, "\n row 1: %d, %s(%lu)", nData, szData, length1); 3684. DIE_UNLESS(nData == 10); ^ 3685. DIE_UNLESS(strcmp(szData, "venu") == 0); 3686. DIE_UNLESS(length1 == 4); #2625 tests/mysql_client_test.c:3801: error: Uninitialized Value `t_data` is read without initialization. 3799. if (!opt_silent) 3800. { 3801. fprintf(stdout, "\n data (tiny) : %d", t_data); ^ 3802. fprintf(stdout, "\n data (short) : %d", s_data); 3803. fprintf(stdout, "\n data (int) : %d", i_data); #2626 tests/mysql_client_test.c:3802: error: Uninitialized Value `s_data` is read without initialization. 3800. { 3801. fprintf(stdout, "\n data (tiny) : %d", t_data); 3802. fprintf(stdout, "\n data (short) : %d", s_data); ^ 3803. fprintf(stdout, "\n data (int) : %d", i_data); 3804. fprintf(stdout, "\n data (big) : %s", llstr(b_data, llbuf)); #2627 tests/mysql_client_test.c:3803: error: Uninitialized Value `i_data` is read without initialization. 3801. fprintf(stdout, "\n data (tiny) : %d", t_data); 3802. fprintf(stdout, "\n data (short) : %d", s_data); 3803. fprintf(stdout, "\n data (int) : %d", i_data); ^ 3804. fprintf(stdout, "\n data (big) : %s", llstr(b_data, llbuf)); 3805. #2628 tests/mysql_client_test.c:3804: error: Uninitialized Value `b_data` is read without initialization. 3802. fprintf(stdout, "\n data (short) : %d", s_data); 3803. fprintf(stdout, "\n data (int) : %d", i_data); 3804. fprintf(stdout, "\n data (big) : %s", llstr(b_data, llbuf)); ^ 3805. 3806. fprintf(stdout, "\n data (float) : %f", f_data); #2629 tests/mysql_client_test.c:3806: error: Uninitialized Value `f_data` is read without initialization. 3804. fprintf(stdout, "\n data (big) : %s", llstr(b_data, llbuf)); 3805. 3806. fprintf(stdout, "\n data (float) : %f", f_data); ^ 3807. fprintf(stdout, "\n data (double) : %f", d_data); 3808. #2630 tests/mysql_client_test.c:3807: error: Uninitialized Value `d_data` is read without initialization. 3805. 3806. fprintf(stdout, "\n data (float) : %f", f_data); 3807. fprintf(stdout, "\n data (double) : %f", d_data); ^ 3808. 3809. fprintf(stdout, "\n data (str) : %s(%lu)", szData, szLength); #2631 tests/mysql_client_test.c:3809: error: Uninitialized Value `szLength` is read without initialization. 3807. fprintf(stdout, "\n data (double) : %f", d_data); 3808. 3809. fprintf(stdout, "\n data (str) : %s(%lu)", szData, szLength); ^ 3810. 3811. bData[bLength]= '\0'; /* bData is binary */ #2632 tests/mysql_client_test.c:3811: error: Uninitialized Value `bLength` is read without initialization. 3809. fprintf(stdout, "\n data (str) : %s(%lu)", szData, szLength); 3810. 3811. bData[bLength]= '\0'; /* bData is binary */ ^ 3812. fprintf(stdout, "\n data (bin) : %s(%lu)", bData, bLength); 3813. } #2633 tests/mysql_client_test.c:3815: error: Uninitialized Value `t_data` is read without initialization. 3813. } 3814. 3815. DIE_UNLESS(t_data == 19); ^ 3816. DIE_UNLESS(s_data == 2999); 3817. DIE_UNLESS(i_data == 3999); #2634 tests/mysql_client_test.c:3934: error: Uninitialized Value `s_data` is read without initialization. 3932. { 3933. fprintf(stdout, "\n data (tiny) : %s(%lu)", t_data, length[0]); 3934. fprintf(stdout, "\n data (short) : %f(%lu)", s_data, length[1]); ^ 3935. fprintf(stdout, "\n data (int) : %d(%lu)", i_data, length[2]); 3936. fprintf(stdout, "\n data (big) : %d(%lu)", b_data, length[3]); #2635 tests/mysql_client_test.c:3935: error: Uninitialized Value `i_data` is read without initialization. 3933. fprintf(stdout, "\n data (tiny) : %s(%lu)", t_data, length[0]); 3934. fprintf(stdout, "\n data (short) : %f(%lu)", s_data, length[1]); 3935. fprintf(stdout, "\n data (int) : %d(%lu)", i_data, length[2]); ^ 3936. fprintf(stdout, "\n data (big) : %d(%lu)", b_data, length[3]); 3937. #2636 tests/mysql_client_test.c:3936: error: Uninitialized Value `b_data` is read without initialization. 3934. fprintf(stdout, "\n data (short) : %f(%lu)", s_data, length[1]); 3935. fprintf(stdout, "\n data (int) : %d(%lu)", i_data, length[2]); 3936. fprintf(stdout, "\n data (big) : %d(%lu)", b_data, length[3]); ^ 3937. 3938. fprintf(stdout, "\n data (float) : %d(%lu)", f_data, length[4]); #2637 tests/mysql_client_test.c:3938: error: Uninitialized Value `f_data` is read without initialization. 3936. fprintf(stdout, "\n data (big) : %d(%lu)", b_data, length[3]); 3937. 3938. fprintf(stdout, "\n data (float) : %d(%lu)", f_data, length[4]); ^ 3939. fprintf(stdout, "\n data (double) : %s(%lu)", d_data, length[5]); 3940. #2638 tests/mysql_client_test.c:3941: error: Uninitialized Value `bData` is read without initialization. 3939. fprintf(stdout, "\n data (double) : %s(%lu)", d_data, length[5]); 3940. 3941. fprintf(stdout, "\n data (bin) : %d(%lu)", bData, length[6]); ^ 3942. fprintf(stdout, "\n data (str) : %g(%lu)", szData, length[7]); 3943. } #2639 tests/mysql_client_test.c:3942: error: Uninitialized Value `szData` is read without initialization. 3940. 3941. fprintf(stdout, "\n data (bin) : %d(%lu)", bData, length[6]); 3942. fprintf(stdout, "\n data (str) : %g(%lu)", szData, length[7]); ^ 3943. } 3944. #2640 tests/mysql_client_test.c:3946: error: Uninitialized Value `i_data` is read without initialization. 3944. 3945. DIE_UNLESS(strcmp(t_data, "120") == 0); 3946. DIE_UNLESS(i_data == 3999); ^ 3947. DIE_UNLESS(f_data == 2); 3948. DIE_UNLESS(strcmp(d_data, "58.89") == 0); #2641 tests/mysql_client_test.c:4157: error: Dead Store The value written to `&rc` is never used. 4155. myquery(rc); 4156. 4157. rc= mysql_query(mysql, "SET SQL_MODE=''"); ^ 4158. rc= mysql_query(mysql, "INSERT INTO test_bind_result VALUES('2002-01-02', \ 4159. '12:49:00', \ #2642 tests/mysql_client_test.c:4228: error: Uninitialized Value `d_length` is read without initialization. 4226. if (!opt_silent) 4227. { 4228. fprintf(stdout, "\n date : %s(%lu)", date, d_length); ^ 4229. fprintf(stdout, "\n time : %s(%lu)", my_time, t_length); 4230. fprintf(stdout, "\n ts : %s(%lu)", ts, ts_length); #2643 tests/mysql_client_test.c:4229: error: Uninitialized Value `t_length` is read without initialization. 4227. { 4228. fprintf(stdout, "\n date : %s(%lu)", date, d_length); 4229. fprintf(stdout, "\n time : %s(%lu)", my_time, t_length); ^ 4230. fprintf(stdout, "\n ts : %s(%lu)", ts, ts_length); 4231. fprintf(stdout, "\n year : %d(%lu)", year, y_length); #2644 tests/mysql_client_test.c:4230: error: Uninitialized Value `ts_length` is read without initialization. 4228. fprintf(stdout, "\n date : %s(%lu)", date, d_length); 4229. fprintf(stdout, "\n time : %s(%lu)", my_time, t_length); 4230. fprintf(stdout, "\n ts : %s(%lu)", ts, ts_length); ^ 4231. fprintf(stdout, "\n year : %d(%lu)", year, y_length); 4232. fprintf(stdout, "\n dt : %s(%lu)", dt, dt_length); #2645 tests/mysql_client_test.c:4231: error: Uninitialized Value `year` is read without initialization. 4229. fprintf(stdout, "\n time : %s(%lu)", my_time, t_length); 4230. fprintf(stdout, "\n ts : %s(%lu)", ts, ts_length); 4231. fprintf(stdout, "\n year : %d(%lu)", year, y_length); ^ 4232. fprintf(stdout, "\n dt : %s(%lu)", dt, dt_length); 4233. fprintf(stdout, "\n ts(4) : %s(%lu)", ts_4, ts4_length); #2646 tests/mysql_client_test.c:4231: error: Uninitialized Value `y_length` is read without initialization. 4229. fprintf(stdout, "\n time : %s(%lu)", my_time, t_length); 4230. fprintf(stdout, "\n ts : %s(%lu)", ts, ts_length); 4231. fprintf(stdout, "\n year : %d(%lu)", year, y_length); ^ 4232. fprintf(stdout, "\n dt : %s(%lu)", dt, dt_length); 4233. fprintf(stdout, "\n ts(4) : %s(%lu)", ts_4, ts4_length); #2647 tests/mysql_client_test.c:4232: error: Uninitialized Value `dt_length` is read without initialization. 4230. fprintf(stdout, "\n ts : %s(%lu)", ts, ts_length); 4231. fprintf(stdout, "\n year : %d(%lu)", year, y_length); 4232. fprintf(stdout, "\n dt : %s(%lu)", dt, dt_length); ^ 4233. fprintf(stdout, "\n ts(4) : %s(%lu)", ts_4, ts4_length); 4234. fprintf(stdout, "\n ts(6) : %s(%lu)", ts_6, ts6_length); #2648 tests/mysql_client_test.c:4233: error: Uninitialized Value `ts4_length` is read without initialization. 4231. fprintf(stdout, "\n year : %d(%lu)", year, y_length); 4232. fprintf(stdout, "\n dt : %s(%lu)", dt, dt_length); 4233. fprintf(stdout, "\n ts(4) : %s(%lu)", ts_4, ts4_length); ^ 4234. fprintf(stdout, "\n ts(6) : %s(%lu)", ts_6, ts6_length); 4235. } #2649 tests/mysql_client_test.c:4234: error: Uninitialized Value `ts6_length` is read without initialization. 4232. fprintf(stdout, "\n dt : %s(%lu)", dt, dt_length); 4233. fprintf(stdout, "\n ts(4) : %s(%lu)", ts_4, ts4_length); 4234. fprintf(stdout, "\n ts(6) : %s(%lu)", ts_6, ts6_length); ^ 4235. } 4236. #2650 tests/mysql_client_test.c:4238: error: Uninitialized Value `d_length` is read without initialization. 4236. 4237. DIE_UNLESS(strcmp(date, "2002-01-02") == 0); 4238. DIE_UNLESS(d_length == 10); ^ 4239. 4240. DIE_UNLESS(strcmp(my_time, "12:49:00") == 0); #2651 tests/mysql_client_test.c:4707: error: Dead Store The value written to `&length` is never used. 4705. for (tiny_data= 0; tiny_data < 3; tiny_data++) 4706. { 4707. length= sprintf(str_data, "MySQL%d", tiny_data); ^ 4708. rc= mysql_stmt_execute(stmt); 4709. check_execute(stmt, rc); #2652 tests/mysql_client_test.c:4918: error: Dead Store The value written to `&count` is never used. 4916. my_bind[0].buffer= (void *)&count; 4917. my_bind[0].buffer_type= MYSQL_TYPE_LONG; 4918. count= 100; ^ 4919. 4920. rc= mysql_stmt_bind_param(stmt_x, my_bind); #2653 tests/mysql_client_test.c:4973: error: Dead Store The value written to `&length` is never used. 4971. get_bind[0].length= &length; 4972. get_bind[0].buffer_length= (int)NAME_LEN; 4973. length= NAME_LEN; ^ 4974. 4975. get_bind[1].buffer_type= MYSQL_TYPE_LONG; #2654 tests/mysql_client_test.c:4988: error: Uninitialized Value `get_count` is read without initialization. 4986. 4987. if (!opt_silent) 4988. fprintf(stdout, "\n max_error_count(default): %d", get_count); ^ 4989. def_count= get_count; 4990. #2655 tests/mysql_client_test.c:4989: error: Uninitialized Value `get_count` is read without initialization. 4987. if (!opt_silent) 4988. fprintf(stdout, "\n max_error_count(default): %d", get_count); 4989. def_count= get_count; ^ 4990. 4991. DIE_UNLESS(strcmp(var, "max_error_count") == 0); #2656 tests/mysql_client_test.c:5188: error: Dead Store The value written to `&id` is never used. 5186. check_execute(stmt, rc); 5187. 5188. id= 10; ^ 5189. rc= mysql_stmt_execute(stmt); 5190. check_execute(stmt, rc); #2657 tests/mysql_client_test.c:5354: error: Dead Store The value written to `&int_data` is never used. 5352. 5353. /* Specify the data */ 5354. int_data= 10; /* integer */ ^ 5355. strmov(str_data, "MySQL"); /* string */ 5356. #2658 tests/mysql_client_test.c:5358: error: Dead Store The value written to `&is_null` is never used. 5356. 5357. /* INSERT SMALLINT data as NULL */ 5358. is_null= 1; ^ 5359. 5360. /* Execute the insert statement - 1*/ #2659 tests/mysql_client_test.c:5380: error: Dead Store The value written to `&int_data` is never used. 5378. 5379. /* Re-execute the insert, by changing the values */ 5380. int_data= 1000; ^ 5381. strmov(str_data, "The most popular open source database"); 5382. small_data= 1000; /* smallint */ #2660 tests/mysql_client_test.c:5382: error: Dead Store The value written to `&small_data` is never used. 5380. int_data= 1000; 5381. strmov(str_data, "The most popular open source database"); 5382. small_data= 1000; /* smallint */ ^ 5383. is_null= 0; /* reset */ 5384. #2661 tests/mysql_client_test.c:5465: error: Dead Store The value written to `&id` is never used. 5463. check_execute(stmt, rc); 5464. 5465. id= 30; ^ 5466. rc= mysql_stmt_execute(stmt); 5467. check_execute(stmt, rc); #2662 tests/mysql_client_test.c:5472: error: Dead Store The value written to `&is_null` is never used. 5470. exit(1); 5471. 5472. is_null= 1; ^ 5473. rc= mysql_stmt_execute(stmt); 5474. check_execute(stmt, rc); #2663 tests/mysql_client_test.c:5573: error: Dead Store The value written to `&exp_value` is never used. 5571. if ((rc= mysql_next_result(mysql_local))) 5572. { 5573. exp_value= mysql_errno(mysql_local); ^ 5574. 5575. exit(1); #2664 tests/mysql_client_test.c:5728: error: Uninitialized Value `nData` is read without initialization. 5726. 5727. if (!opt_silent) 5728. fprintf(stdout, "\n row 1: %ld, %s(%lu)", (long) nData, szData, length1); ^ 5729. DIE_UNLESS(nData == 10); 5730. DIE_UNLESS(strcmp(szData, "venu") == 0); #2665 tests/mysql_client_test.c:5742: error: Dead Store The value written to `&length` is never used. 5740. DIE_UNLESS(length1 == 5); 5741. 5742. length= 99; ^ 5743. rc= mysql_stmt_fetch(stmt); 5744. check_execute(stmt, rc); #2666 tests/mysql_client_test.c:5779: error: Dead Store The value written to `&length` is never used. 5777. DIE_UNLESS(length1 == 5); 5778. 5779. length= 99; ^ 5780. rc= mysql_stmt_fetch(stmt); 5781. check_execute(stmt, rc); #2667 tests/mysql_client_test.c:5902: error: Dead Store The value written to `&nData` is never used. 5900. check_execute(stmt, rc); 5901. 5902. nData= 10; length= 0; ^ 5903. rc= mysql_stmt_execute(stmt); 5904. check_execute(stmt, rc); #2668 tests/mysql_client_test.c:5920: error: Dead Store The value written to `&nData` is never used. 5918. DIE_UNLESS(rc == MYSQL_NO_DATA); 5919. 5920. nData= 20; ^ 5921. rc= mysql_stmt_execute(stmt); 5922. check_execute(stmt, rc); #2669 tests/mysql_client_test.c:5992: error: Dead Store The value written to `&id` is never used. 5990. check_execute(stmt, rc); 5991. 5992. id= 2; ^ 5993. rc= mysql_stmt_execute(stmt); 5994. check_execute(stmt, rc); #2670 tests/mysql_client_test.c:5998: error: Dead Store The value written to `&id` is never used. 5996. verify_st_affected_rows(stmt, 1); 5997. 5998. id= 9; ^ 5999. rc= mysql_stmt_execute(stmt); 6000. check_execute(stmt, rc); #2671 tests/mysql_client_test.c:6067: error: Dead Store The value written to `&count` is never used. 6065. { 6066. MYSQL_STMT *stmt= 0; 6067. uint rc, i, count= row_count; ^ 6068. ulong length[4]; 6069. MYSQL_BIND my_bind[4]; #2672 tests/mysql_client_test.c:6754: error: Uninitialized Value `length` is read without initialization. 6752. DIE_UNLESS(my_bind[0].error_value); 6753. if (!opt_silent) 6754. fprintf(stdout, "\n data: %s (%lu)", buffer, length); ^ 6755. DIE_UNLESS(buffer[0] == 'M'); 6756. DIE_UNLESS(buffer[1] == 'X'); #2673 tests/mysql_client_test.c:7021: error: Uninitialized Value `short_value` is read without initialization. 7019. if (!opt_silent) 7020. { 7021. fprintf(stdout, "\n ushort : %d (%ld)", short_value, s_length); ^ 7022. fprintf(stdout, "\n ulong : %lu (%ld)", (ulong) long_value, l_length); 7023. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), #2674 tests/mysql_client_test.c:7021: error: Uninitialized Value `s_length` is read without initialization. 7019. if (!opt_silent) 7020. { 7021. fprintf(stdout, "\n ushort : %d (%ld)", short_value, s_length); ^ 7022. fprintf(stdout, "\n ulong : %lu (%ld)", (ulong) long_value, l_length); 7023. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), #2675 tests/mysql_client_test.c:7022: error: Uninitialized Value `long_value` is read without initialization. 7020. { 7021. fprintf(stdout, "\n ushort : %d (%ld)", short_value, s_length); 7022. fprintf(stdout, "\n ulong : %lu (%ld)", (ulong) long_value, l_length); ^ 7023. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7024. ll_length); #2676 tests/mysql_client_test.c:7022: error: Uninitialized Value `l_length` is read without initialization. 7020. { 7021. fprintf(stdout, "\n ushort : %d (%ld)", short_value, s_length); 7022. fprintf(stdout, "\n ulong : %lu (%ld)", (ulong) long_value, l_length); ^ 7023. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7024. ll_length); #2677 tests/mysql_client_test.c:7023: error: Uninitialized Value `longlong_value` is read without initialization. 7021. fprintf(stdout, "\n ushort : %d (%ld)", short_value, s_length); 7022. fprintf(stdout, "\n ulong : %lu (%ld)", (ulong) long_value, l_length); 7023. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), ^ 7024. ll_length); 7025. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); #2678 tests/mysql_client_test.c:7024: error: Uninitialized Value `ll_length` is read without initialization. 7022. fprintf(stdout, "\n ulong : %lu (%ld)", (ulong) long_value, l_length); 7023. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7024. ll_length); ^ 7025. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); 7026. } #2679 tests/mysql_client_test.c:7025: error: Uninitialized Value `tiny_value` is read without initialization. 7023. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7024. ll_length); 7025. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); ^ 7026. } 7027. #2680 tests/mysql_client_test.c:7025: error: Uninitialized Value `t_length` is read without initialization. 7023. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7024. ll_length); 7025. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); ^ 7026. } 7027. #2681 tests/mysql_client_test.c:7108: error: Uninitialized Value `short_value` is read without initialization. 7106. if (!opt_silent) 7107. { 7108. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); ^ 7109. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); 7110. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), #2682 tests/mysql_client_test.c:7108: error: Uninitialized Value `s_length` is read without initialization. 7106. if (!opt_silent) 7107. { 7108. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); ^ 7109. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); 7110. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), #2683 tests/mysql_client_test.c:7109: error: Uninitialized Value `long_value` is read without initialization. 7107. { 7108. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); 7109. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); ^ 7110. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7111. ll_length); #2684 tests/mysql_client_test.c:7109: error: Uninitialized Value `l_length` is read without initialization. 7107. { 7108. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); 7109. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); ^ 7110. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7111. ll_length); #2685 tests/mysql_client_test.c:7110: error: Uninitialized Value `longlong_value` is read without initialization. 7108. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); 7109. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); 7110. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), ^ 7111. ll_length); 7112. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); #2686 tests/mysql_client_test.c:7111: error: Uninitialized Value `ll_length` is read without initialization. 7109. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); 7110. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7111. ll_length); ^ 7112. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); 7113. } #2687 tests/mysql_client_test.c:7112: error: Uninitialized Value `tiny_value` is read without initialization. 7110. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7111. ll_length); 7112. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); ^ 7113. } 7114. #2688 tests/mysql_client_test.c:7112: error: Uninitialized Value `t_length` is read without initialization. 7110. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7111. ll_length); 7112. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); ^ 7113. } 7114. #2689 tests/mysql_client_test.c:7194: error: Uninitialized Value `short_value` is read without initialization. 7192. if (!opt_silent) 7193. { 7194. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); ^ 7195. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); 7196. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), #2690 tests/mysql_client_test.c:7194: error: Uninitialized Value `s_length` is read without initialization. 7192. if (!opt_silent) 7193. { 7194. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); ^ 7195. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); 7196. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), #2691 tests/mysql_client_test.c:7195: error: Uninitialized Value `long_value` is read without initialization. 7193. { 7194. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); 7195. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); ^ 7196. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7197. ll_length); #2692 tests/mysql_client_test.c:7195: error: Uninitialized Value `l_length` is read without initialization. 7193. { 7194. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); 7195. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); ^ 7196. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7197. ll_length); #2693 tests/mysql_client_test.c:7196: error: Uninitialized Value `longlong_value` is read without initialization. 7194. fprintf(stdout, "\n sshort : %d (%ld)", short_value, s_length); 7195. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); 7196. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), ^ 7197. ll_length); 7198. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); #2694 tests/mysql_client_test.c:7197: error: Uninitialized Value `ll_length` is read without initialization. 7195. fprintf(stdout, "\n slong : %ld (%ld)", (long) long_value, l_length); 7196. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7197. ll_length); ^ 7198. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); 7199. } #2695 tests/mysql_client_test.c:7198: error: Uninitialized Value `tiny_value` is read without initialization. 7196. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7197. ll_length); 7198. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); ^ 7199. } 7200. #2696 tests/mysql_client_test.c:7198: error: Uninitialized Value `t_length` is read without initialization. 7196. fprintf(stdout, "\n longlong : %s (%ld)", llstr(longlong_value, llbuf), 7197. ll_length); 7198. fprintf(stdout, "\n tinyint : %d (%ld)", tiny_value, t_length); ^ 7199. } 7200. #2697 tests/mysql_client_test.c:7780: error: Dead Store The value written to `&is_null` is never used. 7778. DIE_UNLESS(rc == MYSQL_NO_DATA); 7779. 7780. is_null= 1; ^ 7781. rc= mysql_stmt_execute(stmt); 7782. check_execute(stmt, rc); #2698 tests/mysql_client_test.c:8183: error: Dead Store The value written to `&length` is never used. 8181. 8182. id= 9876; 8183. length= (ulong)(strmov((char *)data, "MySQL - Open Source Database")- data); ^ 8184. 8185. rc= mysql_stmt_bind_param(stmt, my_bind); #2699 tests/mysql_client_test.c:8192: error: Dead Store The value written to `&length` is never used. 8190. 8191. strmov((char *)data, "'"); 8192. length= 1; ^ 8193. 8194. rc= mysql_stmt_execute(stmt); #2700 tests/mysql_client_test.c:8198: error: Dead Store The value written to `&length` is never used. 8196. 8197. strmov((char *)data, "\""); 8198. length= 1; ^ 8199. 8200. rc= mysql_stmt_execute(stmt); #2701 tests/mysql_client_test.c:8203: error: Dead Store The value written to `&length` is never used. 8201. check_execute(stmt, rc); 8202. 8203. length= (ulong)(strmov((char *)data, "my\'sql\'")-data); ^ 8204. rc= mysql_stmt_execute(stmt); 8205. check_execute(stmt, rc); #2702 tests/mysql_client_test.c:8421: error: Uninitialized Value `c1` is read without initialization. 8419. 8420. if (!opt_silent) 8421. fprintf(stdout, "\n row 0: %ld, %s, %s", (long) c1, c2, c3); ^ 8422. 8423. row= mysql_stmt_row_tell(stmt); #2703 tests/mysql_client_test.c:8433: error: Dead Store The value written to `&row` is never used. 8431. fprintf(stdout, "\n row 2: %ld, %s, %s", (long) c1, c2, c3); 8432. 8433. row= mysql_stmt_row_seek(stmt, row); ^ 8434. 8435. rc= mysql_stmt_fetch(stmt); #2704 tests/mysql_client_test.c:8521: error: Uninitialized Value `length` is read without initialization. 8519. check_execute(stmt, rc); 8520. if (!opt_silent) 8521. fprintf(stdout, "\n col 1: %s (%ld)", data, length); ^ 8522. DIE_UNLESS(strncmp(data, "abcd", 4) == 0 && length == 10); 8523. #2705 tests/mysql_client_test.c:8610: error: Uninitialized Value `bc1` is read without initialization. 8608. 8609. if (!opt_silent) 8610. fprintf(stdout, "\n row 0: %d, %s", bc1, bc2); ^ 8611. 8612. c2[0]= '\0'; l2= 0; #2706 tests/mysql_client_test.c:8642: error: Uninitialized Value `l1` is read without initialization. 8640. check_execute(stmt, rc); 8641. if (!opt_silent) 8642. fprintf(stdout, "\n col 0: %d(%ld)", c1, l1); ^ 8643. DIE_UNLESS(c1 == 1 && l1 == 4); 8644. #2707 tests/mysql_client_test.c:9562: error: Dead Store The value written to `&rc` is never used. 9560. 9561. mysql_stmt_close(stmt); 9562. rc= mysql_query(mysql, "DROP TABLE prepare_command"); ^ 9563. } 9564. #2708 tests/mysql_client_test.c:9949: error: Uninitialized Value `is_null` is read without initialization. 9947. check_execute(stmt, rc); 9948. 9949. DIE_UNLESS(is_null == 0 && lii == 1); ^ 9950. if (!opt_silent) 9951. fprintf(stdout, "\n\tLAST_INSERT_ID()= 1 ok\n"); #2709 tests/mysql_client_test.c:9949: error: Uninitialized Value `lii` is read without initialization. 9947. check_execute(stmt, rc); 9948. 9949. DIE_UNLESS(is_null == 0 && lii == 1); ^ 9950. if (!opt_silent) 9951. fprintf(stdout, "\n\tLAST_INSERT_ID()= 1 ok\n"); #2710 tests/mysql_client_test.c:10411: error: Dead Store The value written to `&my_val` is never used. 10409. check_execute(stmt_insert, rc); 10410. 10411. my_val= -1; ^ 10412. rc= mysql_stmt_execute(stmt_insert); 10413. check_execute(stmt_insert, rc); #2711 tests/mysql_client_test.c:10456: error: Dead Store The value written to `&my_val` is never used. 10454. my_bind[0].length= &my_length; 10455. my_bind[0].is_null= (char*)&my_null; 10456. my_val= 1; ^ 10457. rc= mysql_stmt_bind_param(stmt, my_bind); 10458. check_execute(stmt, rc); #2712 tests/mysql_client_test.c:10625: error: Dead Store The value written to `&int8_val` is never used. 10623. mysql_stmt_bind_param(stmt, bind_array); 10624. 10625. int8_val= int8_min; ^ 10626. uint8_val= uint8_min; 10627. int16_val= int16_min; #2713 tests/mysql_client_test.c:10626: error: Dead Store The value written to `&uint8_val` is never used. 10624. 10625. int8_val= int8_min; 10626. uint8_val= uint8_min; ^ 10627. int16_val= int16_min; 10628. uint16_val= uint16_min; #2714 tests/mysql_client_test.c:10627: error: Dead Store The value written to `&int16_val` is never used. 10625. int8_val= int8_min; 10626. uint8_val= uint8_min; 10627. int16_val= int16_min; ^ 10628. uint16_val= uint16_min; 10629. int32_val= int32_min; #2715 tests/mysql_client_test.c:10628: error: Dead Store The value written to `&uint16_val` is never used. 10626. uint8_val= uint8_min; 10627. int16_val= int16_min; 10628. uint16_val= uint16_min; ^ 10629. int32_val= int32_min; 10630. uint32_val= uint32_min; #2716 tests/mysql_client_test.c:10629: error: Dead Store The value written to `&int32_val` is never used. 10627. int16_val= int16_min; 10628. uint16_val= uint16_min; 10629. int32_val= int32_min; ^ 10630. uint32_val= uint32_min; 10631. int64_val= int64_min; #2717 tests/mysql_client_test.c:10630: error: Dead Store The value written to `&uint32_val` is never used. 10628. uint16_val= uint16_min; 10629. int32_val= int32_min; 10630. uint32_val= uint32_min; ^ 10631. int64_val= int64_min; 10632. uint64_val= uint64_min; #2718 tests/mysql_client_test.c:10631: error: Dead Store The value written to `&int64_val` is never used. 10629. int32_val= int32_min; 10630. uint32_val= uint32_min; 10631. int64_val= int64_min; ^ 10632. uint64_val= uint64_min; 10633. #2719 tests/mysql_client_test.c:10632: error: Dead Store The value written to `&uint64_val` is never used. 10630. uint32_val= uint32_min; 10631. int64_val= int64_min; 10632. uint64_val= uint64_min; ^ 10633. 10634. rc= mysql_stmt_execute(stmt); #2720 tests/mysql_client_test.c:10803: error: Dead Store The value written to `&int_data` is never used. 10801. check_execute(stmt, rc); 10802. 10803. int_data= 1; ^ 10804. 10805. /* #2721 tests/mysql_client_test.c:10843: error: Dead Store The value written to `&int_data` is never used. 10841. */ 10842. 10843. int_data= 2; ^ 10844. /* execute */ 10845. rc= mysql_stmt_execute(stmt); #2722 tests/mysql_client_test.c:11079: error: Uninitialized Value `buf1_len` is read without initialization. 11077. check_execute(stmt, rc); 11078. 11079. DIE_UNLESS(buf1_len == strlen(cp1251)); ^ 11080. DIE_UNLESS(buf2_len == strlen(cp1251)); 11081. DIE_UNLESS(!memcmp(buf1, cp1251, buf1_len)); #2723 tests/mysql_client_test.c:11080: error: Uninitialized Value `buf2_len` is read without initialization. 11078. 11079. DIE_UNLESS(buf1_len == strlen(cp1251)); 11080. DIE_UNLESS(buf2_len == strlen(cp1251)); ^ 11081. DIE_UNLESS(!memcmp(buf1, cp1251, buf1_len)); 11082. DIE_UNLESS(!memcmp(buf2, cp1251, buf1_len)); #2724 tests/mysql_client_test.c:11548: error: Dead Store The value written to `&length` is never used. 11546. my_bind[0].buffer_length= 50; 11547. my_bind[0].length= &length; 11548. length= 4; ^ 11549. my_bind[0].is_null= (char*)&is_null; 11550. rc= mysql_stmt_bind_param(stmt, my_bind); #2725 tests/mysql_client_test.c:11792: error: Dead Store The value written to `&my_val` is never used. 11790. { 11791. int rowcount= 0; 11792. my_val= i; ^ 11793. 11794. rc= mysql_stmt_execute(insert_stmt); #2726 tests/mysql_client_test.c:11881: error: Dead Store The value written to `&rc` is never used. 11879. "CHARSET=latin1 COLLATE latin1_bin"); 11880. myquery(rc); 11881. rc= mysql_query(mysql, ^ 11882. "CREATE VIEW v1 AS select sql_no_cache " 11883. " K1C4 AS K1C4, K2C4 AS K2C4, K3C4 AS K3C4, K4N4 AS K4N4, " #2727 tests/mysql_client_test.c:11969: error: Uninitialized Value `c1` is read without initialization. 11967. rc= mysql_stmt_fetch(stmt); 11968. DIE_UNLESS(rc == 0); 11969. DIE_UNLESS(c1 == 8386608 && c2 == 1); ^ 11970. if (!opt_silent) 11971. printf("%ld, %ld\n", (long) c1, (long) c2); #2728 tests/mysql_client_test.c:11969: error: Uninitialized Value `c2` is read without initialization. 11967. rc= mysql_stmt_fetch(stmt); 11968. DIE_UNLESS(rc == 0); 11969. DIE_UNLESS(c1 == 8386608 && c2 == 1); ^ 11970. if (!opt_silent) 11971. printf("%ld, %ld\n", (long) c1, (long) c2); #2729 tests/mysql_client_test.c:11971: error: Uninitialized Value `c2` is read without initialization. 11969. DIE_UNLESS(c1 == 8386608 && c2 == 1); 11970. if (!opt_silent) 11971. printf("%ld, %ld\n", (long) c1, (long) c2); ^ 11972. mysql_stmt_close(stmt); 11973. } #2730 tests/mysql_client_test.c:12150: error: Dead Store The value written to `&rc` is never used. 12148. 12149. stmt_text= "drop table if exists t1"; 12150. rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text)); ^ 12151. 12152. stmt_text= "create table if not exists t1" #2731 tests/mysql_client_test.c:12448: error: Dead Store The value written to `&b` is never used. 12446. const char *stmt_text; 12447. int rc; 12448. short b= 1; ^ 12449. MYSQL_BIND my_bind[1]; 12450. #2732 tests/mysql_client_test.c:13140: error: Dead Store The value written to `&rc` is never used. 13138. rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text)); 13139. myquery(rc); 13140. rc= mysql_stmt_free_result(stmt); ^ 13141. rc= mysql_stmt_close(stmt); 13142. } #2733 tests/mysql_client_test.c:13141: error: Dead Store The value written to `&rc` is never used. 13139. myquery(rc); 13140. rc= mysql_stmt_free_result(stmt); 13141. rc= mysql_stmt_close(stmt); ^ 13142. } 13143. #2734 tests/mysql_client_test.c:13422: error: Uninitialized Value `error` is read without initialization. 13420. rc= mysql_stmt_fetch(stmt); 13421. DIE_UNLESS(rc == MYSQL_DATA_TRUNCATED); 13422. DIE_UNLESS(error); ^ 13423. rc= mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, (char*) &option); 13424. myquery(rc); #2735 tests/mysql_client_test.c:14437: error: Dead Store The value written to `&id_val` is never used. 14435. for (i= 0; i < 42; i++) 14436. { 14437. id_val= (i+1)*10; ^ 14438. sprintf(a, "a%d", i); 14439. a_len= strlen(a); /* safety against broken sprintf */ #2736 tests/mysql_client_test.c:14444: error: Dead Store The value written to `&rc` is never used. 14442. } 14443. stmt_text= "select name from t1"; 14444. rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); ^ 14445. type= (ulong) CURSOR_TYPE_READ_ONLY; 14446. mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type); #2737 tests/mysql_client_test.c:14470: error: Dead Store The value written to `&rc` is never used. 14468. rc= mysql_stmt_bind_result(stmt1, my_bind); 14469. check_execute(stmt1, rc); 14470. rc= mysql_stmt_execute(stmt1); ^ 14471. while (1) 14472. { #2738 tests/mysql_client_test.c:14546: error: Uninitialized Value `id` is read without initialization. 14544. { 14545. if (!opt_silent) 14546. printf("fetched data %d:%d-%d-%d\n", id, ^ 14547. hired.year, hired.month, hired.day); 14548. } #2739 tests/mysql_client_test.c:14751: error: Dead Store The value written to `&rc` is never used. 14749. stmt_text= "select id FROM t1"; 14750. stmt= mysql_stmt_init(mysql); 14751. rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); ^ 14752. 14753. /* expected error */ #2740 tests/mysql_client_test.c:14866: error: Dead Store The value written to `&rc` is never used. 14864. mysql_stmt_bind_result(stmt, my_bind); 14865. 14866. rc= mysql_stmt_execute(stmt); ^ 14867. rc= mysql_stmt_fetch(stmt); 14868. DIE_UNLESS(rc == 0); #2741 tests/mysql_client_test.c:15017: error: Uninitialized Value `empno` is read without initialization. 15015. rc= mysql_stmt_fetch(stmt1); 15016. DIE_UNLESS(rc == 0); 15017. DIE_UNLESS(empno == 10); ^ 15018. DIE_UNLESS(strcmp(firstname, "CHRISTINE") == 0); 15019. DIE_UNLESS(strcmp(midinit, "I") == 0); #2742 tests/mysql_client_test.c:15022: error: Uninitialized Value `salary` is read without initialization. 15020. DIE_UNLESS(strcmp(lastname, "HAAS") == 0); 15021. DIE_UNLESS(strcmp(workdept, "A00") == 0); 15022. DIE_UNLESS(salary == (double) 52750.0); ^ 15023. DIE_UNLESS(bonus == (float) 1000.0); 15024. #2743 tests/mysql_client_test.c:15023: error: Uninitialized Value `bonus` is read without initialization. 15021. DIE_UNLESS(strcmp(workdept, "A00") == 0); 15022. DIE_UNLESS(salary == (double) 52750.0); 15023. DIE_UNLESS(bonus == (float) 1000.0); ^ 15024. 15025. stmt2= open_cursor("SELECT empno, firstname FROM t1"); #2744 tests/mysql_client_test.c:15166: error: Dead Store The value written to `&empno` is never used. 15164. check_execute(stmt, rc); 15165. 15166. empno= 10; ^ 15167. /* ERROR: next statement causes a server crash */ 15168. rc= mysql_stmt_execute(stmt); #2745 tests/mysql_client_test.c:15384: error: Dead Store The value written to `&rc` is never used. 15382. rc= mysql_query(mysql, "insert into t1 (a) values (repeat('a', 256))"); 15383. myquery(rc); 15384. rc= mysql_query(mysql, "set @@session.max_heap_table_size=16384"); ^ 15385. /* Create a big enough table (more than max_heap_table_size) */ 15386. for (i= 0; i < 8; i++) #2746 tests/mysql_client_test.c:15400: error: Dead Store The value written to `&rc` is never used. 15398. rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); 15399. check_execute(stmt, rc); 15400. rc= mysql_stmt_execute(stmt); ^ 15401. while ((rc= mysql_stmt_fetch(stmt)) == 0) 15402. ; #2747 tests/mysql_client_test.c:15405: error: Dead Store The value written to `&rc` is never used. 15403. DIE_UNLESS(rc == MYSQL_NO_DATA); 15404. 15405. rc= mysql_stmt_close(stmt); ^ 15406. 15407. rc= mysql_query(mysql, "drop table t1"); #2748 tests/mysql_client_test.c:15611: error: Dead Store The value written to `&rc` is never used. 15609. check_execute(stmt, rc); 15610. 15611. rc= mysql_stmt_fetch(stmt); ^ 15612. DIE_UNLESS(mysql_warning_count(mysql)); 15613. #2749 tests/mysql_client_test.c:15795: error: Dead Store The value written to `&rc` is never used. 15793. /* II. Check SELECT metadata */ 15794. stmt_text= ("select t, tt, mt, lt, vl, vb, vu from t1"); 15795. rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); ^ 15796. metadata= mysql_stmt_result_metadata(stmt); 15797. field= mysql_fetch_fields(metadata); #2750 tests/mysql_client_test.c:16160: error: Dead Store The value written to `&rc` is never used. 16158. "auto_increment, f2 varchar(255), unique (f2))"); 16159. myquery(rc); 16160. rc= mysql_query(mysql, "insert into t2 values (null,'e')"); ^ 16161. res= mysql_insert_id(mysql); 16162. DIE_UNLESS(res == 1); #2751 tests/mysql_client_test.c:16282: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `wrap_mysql_real_connect()`. 16280. 16281. mysql_client_init(&mysql_local); 16282. if (! mysql_real_connect(&mysql_local, opt_host, opt_user, ^ 16283. opt_password, current_db, opt_port, 16284. opt_unix_socket, #2752 tests/mysql_client_test.c:16290: error: Uninitialized Value `mysql.fields` is read without initialization during the call to `wrap_mysql_real_query()`. 16288. DIE_UNLESS(0); 16289. } 16290. rc= mysql_real_query(&mysql_local, query, strlen(query)); ^ 16291. myquery(rc); 16292. mysql_free_result(mysql_store_result(&mysql_local)); #2753 tests/mysql_client_test.c:16290: error: Uninitialized Value `root.field_alloc.used` is read without initialization during the call to `wrap_mysql_real_query()`. 16288. DIE_UNLESS(0); 16289. } 16290. rc= mysql_real_query(&mysql_local, query, strlen(query)); ^ 16291. myquery(rc); 16292. mysql_free_result(mysql_store_result(&mysql_local)); #2754 tests/mysql_client_test.c:17347: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `wrap_mysql_real_connect()`. 17345. DIE_UNLESS(mysql_client_init(&con)); 17346. 17347. DIE_UNLESS(mysql_real_connect(&con, ^ 17348. opt_host, 17349. opt_user, #2755 tests/mysql_client_test.c:17521: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `wrap_mysql_real_connect()`. 17519. DIE_UNLESS(mysql_client_init(&con)); 17520. 17521. DIE_UNLESS(mysql_real_connect(&con, ^ 17522. opt_host, 17523. opt_user, #2756 tests/mysql_client_test.c:17658: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `wrap_mysql_real_connect()`. 17656. DIE_UNLESS(mysql_client_init(&con)); 17657. 17658. DIE_UNLESS(mysql_real_connect(&con, ^ 17659. opt_host, 17660. opt_user, #2757 tests/mysql_client_test.c:18094: error: Uninitialized Value `c_int` is read without initialization. 18092. check_execute(stmt, rc); 18093. 18094. DIE_UNLESS(c_int == 42); ^ 18095. DIE_UNLESS(d_date.year == 1948); 18096. DIE_UNLESS(d_date.month == 5); #2758 tests/mysql_client_test.c:18095: error: Uninitialized Value `_.year` is read without initialization. 18093. 18094. DIE_UNLESS(c_int == 42); 18095. DIE_UNLESS(d_date.year == 1948); ^ 18096. DIE_UNLESS(d_date.month == 5); 18097. DIE_UNLESS(d_date.day == 15); #2759 tests/mysql_client_test.c:18096: error: Uninitialized Value `_.month` is read without initialization. 18094. DIE_UNLESS(c_int == 42); 18095. DIE_UNLESS(d_date.year == 1948); 18096. DIE_UNLESS(d_date.month == 5); ^ 18097. DIE_UNLESS(d_date.day == 15); 18098. #2760 tests/mysql_client_test.c:18097: error: Uninitialized Value `_.day` is read without initialization. 18095. DIE_UNLESS(d_date.year == 1948); 18096. DIE_UNLESS(d_date.month == 5); 18097. DIE_UNLESS(d_date.day == 15); ^ 18098. 18099. rc= mysql_stmt_fetch(stmt); #2761 tests/mysql_client_test.c:18284: error: Uninitialized Value `buf1_len` is read without initialization. 18282. check_execute(stmt, rc); 18283. 18284. DIE_UNLESS(buf1_len == strlen(cp1251)); ^ 18285. DIE_UNLESS(buf2_len == strlen(cp1251)); 18286. DIE_UNLESS(!memcmp(buf1, cp1251, buf1_len)); #2762 tests/mysql_client_test.c:18285: error: Uninitialized Value `buf2_len` is read without initialization. 18283. 18284. DIE_UNLESS(buf1_len == strlen(cp1251)); 18285. DIE_UNLESS(buf2_len == strlen(cp1251)); ^ 18286. DIE_UNLESS(!memcmp(buf1, cp1251, buf1_len)); 18287. DIE_UNLESS(!memcmp(buf2, cp1251, buf1_len)); #2763 tests/mysql_client_test.c:18386: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 18380 is not freed after the last access at line 18386, column 3. 18384. mytest(row); 18385. 18386. mysql_free_result(result); ^ 18387. 18388. /* set AUTOCOMMIT to ON */ #2764 tests/mysql_client_test.c:18614: error: Dead Store The value written to `&length` is never used. 18612. /* First execute; should succeed. */ 18613. strncpy(buffer, values[0], BUFSIZE); 18614. length= strlen(buffer); ^ 18615. rc= mysql_stmt_execute(stmt); 18616. check_execute(stmt, rc); #2765 tests/mysql_client_test.c:18627: error: Dead Store The value written to `&length` is never used. 18625. /* Second execute; should fail due to socket closed during execution. */ 18626. strncpy(buffer, values[1], BUFSIZE); 18627. length= strlen(buffer); ^ 18628. rc= mysql_stmt_execute(stmt); 18629. DIE_UNLESS(rc && mysql_stmt_errno(stmt) == CR_SERVER_LOST); #2766 tests/mysql_client_test.c:18636: error: Dead Store The value written to `&length` is never used. 18634. */ 18635. strncpy(buffer, values[2], BUFSIZE); 18636. length= strlen(buffer); ^ 18637. rc= mysql_stmt_execute(stmt); 18638. DIE_UNLESS(rc && (mysql_stmt_errno(stmt) == CR_SERVER_LOST || #2767 tests/mysql_client_test.c:18709: error: Dead Store The value written to `&rc` is never used. 18707. rc= mysql_query(mysql, "DROP TABLE t1"); 18708. myquery(rc); 18709. rc= mysql_query(mysql, "SET GLOBAL query_cache_size = @save_query_cache_size"); ^ 18710. rc= mysql_query(mysql, "SET GLOBAL query_cache_type = @save_query_cache_type"); 18711. myquery(rc); #2768 tests/mysql_client_test.c:18836: error: Uninitialized Value `mysql.options.extension` is read without initialization during the call to `wrap_mysql_real_connect()`. 18834. DIE_UNLESS(mysql_client_init(&con)); 18835. 18836. DIE_UNLESS(mysql_real_connect(&con, opt_host, opt_user, opt_password, ^ 18837. current_db, opt_port, opt_unix_socket, 18838. CLIENT_MULTI_RESULTS)); #2769 tests/mysql_client_test.c:18840: error: Uninitialized Value `mysql.stmts` is read without initialization during the call to `mysql_simple_prepare()`. 18838. CLIENT_MULTI_RESULTS)); 18839. 18840. stmt= mysql_simple_prepare(&con, "CALL p1('abc')"); ^ 18841. check_stmt(stmt); 18842. #2770 tests/mysql_client_test.c:18870: error: Dead Store The value written to `&rc` is never used. 18868. rc= mysql_query(mysql, "DROP DATABASE IF EXISTS bug53371"); 18869. myquery(rc); 18870. rc= mysql_query(mysql, "DROP USER 'testbug'@localhost"); ^ 18871. 18872. rc= mysql_query(mysql, "CREATE TABLE t1 (a INT)"); #2771 tests/mysql_client_test.c:19271: error: Dead Store The value written to `&rc` is never used. 19269. in_param_bind.is_null= 0; 19270. 19271. rc= mysql_stmt_bind_param(stmt, &in_param_bind); ^ 19272. 19273. rc= mysql_stmt_execute(stmt); #2772 tests/mysql_client_test.c:19287: error: Dead Store The value written to `&rc` is never used. 19285. check_execute(stmt, rc); 19286. 19287. rc= mysql_stmt_fetch(stmt); ^ 19288. rc= mysql_stmt_fetch(stmt); 19289. DBUG_ASSERT(rc == MYSQL_NO_DATA); #2773 tests/mysql_client_test.c:19288: error: Dead Store The value written to `&rc` is never used. 19286. 19287. rc= mysql_stmt_fetch(stmt); 19288. rc= mysql_stmt_fetch(stmt); ^ 19289. DBUG_ASSERT(rc == MYSQL_NO_DATA); 19290. #2774 tests/mysql_client_test.c:19315: error: Dead Store The value written to `&rc` is never used. 19313. check_execute(stmt, rc); 19314. 19315. rc= mysql_stmt_fetch(stmt); ^ 19316. rc= mysql_stmt_fetch(stmt); 19317. DBUG_ASSERT(rc == MYSQL_NO_DATA); #2775 tests/mysql_client_test.c:19316: error: Dead Store The value written to `&rc` is never used. 19314. 19315. rc= mysql_stmt_fetch(stmt); 19316. rc= mysql_stmt_fetch(stmt); ^ 19317. DBUG_ASSERT(rc == MYSQL_NO_DATA); 19318. #2776 tests/mysql_client_test.c:19564: error: Dead Store The value written to `&rc` is never used. 19562. Creating table with specific charset. 19563. */ 19564. rc= mysql_query(mysql, "drop table if exists charset_tab"); ^ 19565. rc= mysql_query(mysql, "create table charset_tab("\ 19566. "txt1 varchar(32) character set Latin1,"\ #2777 tests/mysql_client_test.c:19577: error: Dead Store The value written to `&rc` is never used. 19575. Creating view from table created earlier. 19576. */ 19577. rc= mysql_query(mysql, "drop view if exists charset_view"); ^ 19578. rc= mysql_query(mysql, "create view charset_view as "\ 19579. "select * from charset_tab;"); #2778 tests/mysql_client_test.c:20217: error: Dead Store The value written to `&rc` is never used. 20215. myquery(rc); 20216. 20217. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); ^ 20218. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); 20219. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); #2779 tests/mysql_client_test.c:20218: error: Dead Store The value written to `&rc` is never used. 20216. 20217. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); 20218. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); ^ 20219. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); 20220. #2780 tests/mysql_client_test.c:20219: error: Dead Store The value written to `&rc` is never used. 20217. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); 20218. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); 20219. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); ^ 20220. 20221. memset(bind, 0, sizeof(MYSQL_BIND) * 2); #2781 tests/mysql_client_test.c:20298: error: Dead Store The value written to `&count` is never used. 20296. my_bind[0].buffer= (void *)&count; 20297. my_bind[0].buffer_type= MYSQL_TYPE_LONG; 20298. count= 100; ^ 20299. 20300. strcpy(str_data,""); #2782 tests/mysql_client_test.c:20305: error: Dead Store The value written to `&rc` is never used. 20303. my_bind[1].buffer_length= strlen(str_data); 20304. 20305. rc= mysql_stmt_bind_param(stmt1, my_bind); ^ 20306. 20307. rc= mysql_stmt_execute(stmt1); #2783 tests/mysql_client_test.c:20312: error: Dead Store The value written to `&rc` is never used. 20310. verify_st_affected_rows(stmt1, 1); 20311. 20312. rc= mysql_stmt_close(stmt1); ^ 20313. 20314. strmov(query, "SET SQL_MODE= default"); #2784 tests/mysql_client_test.c:20324: error: Dead Store The value written to `&count` is never used. 20322. check_stmt(stmt1); 20323. 20324. count= 200; ^ 20325. rc= mysql_stmt_bind_param(stmt1, my_bind); 20326. #2785 tests/mysql_client_test.c:20325: error: Dead Store The value written to `&rc` is never used. 20323. 20324. count= 200; 20325. rc= mysql_stmt_bind_param(stmt1, my_bind); ^ 20326. 20327. rc= mysql_stmt_execute(stmt1); #2786 tests/mysql_client_test.c:20445: error: Dead Store The value written to `&rc` is never used. 20443. 20444. mysql_stmt_bind_result(stmt1, my_bind); 20445. rc= mysql_stmt_fetch(stmt1); ^ 20446. 20447. if (!opt_silent) #2787 tests/mysql_client_test.c:21699: error: Uninitialized Value `res` is read without initialization. 21697. check_execute(stmt, rc); 21698. DIE_UNLESS(bind_res.buffer_type == MYSQL_TYPE_LONG); 21699. DIE_UNLESS(res == 300); ^ 21700. 21701. memset(&bind, 0, sizeof(bind)); #2788 tests/mysql_client_test.c:21736: error: Dead Store The value written to `¶mCount` is never used. 21734. int rc; 21735. MYSQL_BIND bind[MDEV19838_MAX_PARAM_COUNT]; 21736. unsigned int i, paramCount = 1; ^ 21737. char charvalue[] = "012345678901234567890123456789012345"; 21738. MYSQL_STMT *stmt; #2789 tests/mysql_client_test.c:21880: error: Dead Store The value written to `¶mCount` is never used. 21878. { 21879. int rc; 21880. unsigned paramCount = 1; ^ 21881. MYSQL_STMT *stmt; 21882. MYSQL_FIELD *fld; #2790 tests/mysql_client_test.c:22161: error: Dead Store The value written to `&rc` is never used. 22159. myquery(rc); 22160. 22161. rc= mysql_query(mysql, "CREATE TRIGGER t1_au AFTER UPDATE ON t1 " ^ 22162. "FOR EACH ROW BEGIN INSERT INTO t2 (a) VALUES (NEW.a); END;"); 22163. #2791 tests/mysql_client_test.c:22283: error: Dead Store The value written to `&rc` is never used. 22281. myquery(rc); 22282. 22283. rc= mysql_query(mysql, "CREATE TRIGGER t1_au BEFORE UPDATE ON t1 " ^ 22284. "FOR EACH ROW BEGIN INSERT INTO t2 (a) VALUES (NEW.a); END;"); 22285. #2792 tests/mysql_client_test.c:22404: error: Dead Store The value written to `&rc` is never used. 22402. myquery(rc); 22403. 22404. rc= mysql_query(mysql, "CREATE TRIGGER t1_bd BEFORE DELETE ON t1 " ^ 22405. "FOR EACH ROW BEGIN INSERT INTO t2 (a) VALUES (OLD.a); END;"); 22406. #2793 tests/mysql_client_test.c:22503: error: Dead Store The value written to `&rc` is never used. 22501. myquery(rc); 22502. 22503. rc= mysql_query(mysql, "CREATE TRIGGER t1_bd AFTER DELETE ON t1 " ^ 22504. "FOR EACH ROW BEGIN INSERT INTO t2 (a) VALUES (OLD.a); END;"); 22505. #2794 tests/mysql_client_test.c:22593: error: Dead Store The value written to `&rc` is never used. 22591. myquery(rc); 22592. 22593. rc= mysql_query(mysql, "CREATE TRIGGER t1_ai AFTER INSERT ON t1 " ^ 22594. "FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);"); 22595. #2795 tests/mysql_client_test.c:22916: error: Memory Leak Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 22912 is not freed after the last access at line 22916, column 3. 22914. row= mysql_fetch_row(result); 22915. DIE_UNLESS(atoi(row[0]) == val); 22916. mysql_free_result(result); ^ 22917. } 22918. #2796 tests/mysql_client_test.c:22956: error: Dead Store The value written to `&rc` is never used. 22954. param.buffer_length = 4; 22955. 22956. rc= mysql_stmt_bind_param(stmt,¶m); ^ 22957. exec_stmt(stmt); 22958. #2797 tests/mysql_client_test.c:22973: error: Dead Store The value written to `&rc` is never used. 22971. param.buffer_type= MYSQL_TYPE_LONG; 22972. param.is_null= &is_null; 22973. rc= mysql_stmt_bind_param(stmt, ¶m); ^ 22974. exec_stmt(stmt); 22975. assert_metadata_skipped_count_equals(mysql, 0); #2798 tests/nonblock-wrappers.h:165: error: Uninitialized Value `res` is read without initialization. 163. } 164. 165. MK_WRAPPER( ^ 166. MYSQL *, 167. mysql_real_connect, #2799 tests/nonblock-wrappers.h:175: error: Uninitialized Value `res` is read without initialization. 173. 174. 175. MK_WRAPPER( ^ 176. int, 177. mysql_real_query, #2800 tests/nonblock-wrappers.h:184: error: Uninitialized Value `res` is read without initialization. 182. mysql) 183. 184. MK_WRAPPER( ^ 185. MYSQL_ROW, 186. mysql_fetch_row, #2801 tests/nonblock-wrappers.h:193: error: Uninitialized Value `res` is read without initialization. 191. result->handle) 192. 193. MK_WRAPPER( ^ 194. int, 195. mysql_set_character_set, #2802 tests/nonblock-wrappers.h:202: error: Uninitialized Value `res` is read without initialization. 200. mysql) 201. 202. MK_WRAPPER( ^ 203. int, 204. mysql_select_db, #2803 tests/nonblock-wrappers.h:211: error: Uninitialized Value `res` is read without initialization. 209. mysql) 210. 211. MK_WRAPPER( ^ 212. int, 213. mysql_send_query, #2804 tests/nonblock-wrappers.h:220: error: Uninitialized Value `res` is read without initialization. 218. mysql) 219. 220. MK_WRAPPER( ^ 221. MYSQL_RES *, 222. mysql_store_result, #2805 tests/nonblock-wrappers.h:243: error: Uninitialized Value `res` is read without initialization. 241. sock) 242. 243. MK_WRAPPER( ^ 244. my_bool, 245. mysql_change_user, #2806 tests/nonblock-wrappers.h:252: error: Uninitialized Value `res` is read without initialization. 250. mysql) 251. 252. MK_WRAPPER( ^ 253. int, 254. mysql_query, #2807 tests/nonblock-wrappers.h:261: error: Uninitialized Value `res` is read without initialization. 259. mysql) 260. 261. MK_WRAPPER( ^ 262. int, 263. mysql_shutdown, #2808 tests/nonblock-wrappers.h:270: error: Uninitialized Value `res` is read without initialization. 268. mysql) 269. 270. MK_WRAPPER( ^ 271. int, 272. mysql_dump_debug_info, #2809 tests/nonblock-wrappers.h:279: error: Uninitialized Value `res` is read without initialization. 277. mysql) 278. 279. MK_WRAPPER( ^ 280. int, 281. mysql_refresh, #2810 tests/nonblock-wrappers.h:288: error: Uninitialized Value `res` is read without initialization. 286. mysql) 287. 288. MK_WRAPPER( ^ 289. int, 290. mysql_kill, #2811 tests/nonblock-wrappers.h:306: error: Uninitialized Value `res` is read without initialization. 304. mysql) 305. 306. MK_WRAPPER( ^ 307. int, 308. mysql_ping, #2812 tests/nonblock-wrappers.h:315: error: Uninitialized Value `res` is read without initialization. 313. mysql) 314. 315. MK_WRAPPER( ^ 316. const char *, 317. mysql_stat, #2813 tests/nonblock-wrappers.h:324: error: Uninitialized Value `res` is read without initialization. 322. mysql) 323. 324. MK_WRAPPER( ^ 325. my_bool, 326. mysql_read_query_result, #2814 tests/nonblock-wrappers.h:333: error: Uninitialized Value `res` is read without initialization. 331. mysql) 332. 333. MK_WRAPPER( ^ 334. int, 335. mysql_stmt_prepare, #2815 tests/nonblock-wrappers.h:342: error: Uninitialized Value `res` is read without initialization. 340. stmt->mysql) 341. 342. MK_WRAPPER( ^ 343. int, 344. mysql_stmt_execute, #2816 tests/nonblock-wrappers.h:351: error: Uninitialized Value `res` is read without initialization. 349. stmt->mysql) 350. 351. MK_WRAPPER( ^ 352. int, 353. mysql_stmt_fetch, #2817 tests/nonblock-wrappers.h:360: error: Uninitialized Value `res` is read without initialization. 358. stmt->mysql) 359. 360. MK_WRAPPER( ^ 361. int, 362. mysql_stmt_store_result, #2818 tests/nonblock-wrappers.h:369: error: Uninitialized Value `res` is read without initialization. 367. stmt->mysql) 368. 369. MK_WRAPPER( ^ 370. my_bool, 371. mysql_stmt_close, #2819 tests/nonblock-wrappers.h:378: error: Uninitialized Value `res` is read without initialization. 376. stmt->mysql) 377. 378. MK_WRAPPER( ^ 379. my_bool, 380. mysql_stmt_reset, #2820 tests/nonblock-wrappers.h:387: error: Uninitialized Value `res` is read without initialization. 385. stmt->mysql) 386. 387. MK_WRAPPER( ^ 388. my_bool, 389. mysql_stmt_free_result, #2821 tests/nonblock-wrappers.h:396: error: Uninitialized Value `res` is read without initialization. 394. stmt->mysql) 395. 396. MK_WRAPPER( ^ 397. my_bool, 398. mysql_stmt_send_long_data, #2822 tests/nonblock-wrappers.h:405: error: Uninitialized Value `res` is read without initialization. 403. stmt->mysql) 404. 405. MK_WRAPPER( ^ 406. my_bool, 407. mysql_commit, #2823 tests/nonblock-wrappers.h:414: error: Uninitialized Value `res` is read without initialization. 412. mysql) 413. 414. MK_WRAPPER( ^ 415. my_bool, 416. mysql_rollback, #2824 tests/nonblock-wrappers.h:423: error: Uninitialized Value `res` is read without initialization. 421. mysql) 422. 423. MK_WRAPPER( ^ 424. my_bool, 425. mysql_autocommit, #2825 tests/nonblock-wrappers.h:432: error: Uninitialized Value `res` is read without initialization. 430. mysql) 431. 432. MK_WRAPPER( ^ 433. int, 434. mysql_next_result, #2826 tpool/tpool_generic.cc:875: warning: Lock Consistency Violation Read/Write race. Non-private method `tpool::thread_pool_generic::wait_begin` indirectly reads without synchronization from `tpool::tls_worker_data->m_state`, which races with the write in method `tpool::thread_pool_generic::wait_begin`. 873. void thread_pool_generic::wait_begin() 874. { 875. if (!tls_worker_data || tls_worker_data->is_long_task()) ^ 876. return; 877. std::unique_lock lk(m_mtx); #2827 tpool/tpool_generic.cc:897: warning: Lock Consistency Violation Read/Write race. Non-private method `tpool::thread_pool_generic::wait_end` indirectly reads without synchronization from `tpool::tls_worker_data->m_state`, which races with the write in method `tpool::thread_pool_generic::wait_begin`. 895. void thread_pool_generic::wait_end() 896. { 897. if (tls_worker_data && tls_worker_data->is_waiting()) ^ 898. { 899. std::unique_lock lk(m_mtx); #2828 tpool/tpool_structs.h:237: error: Unnecessary Copy Assignment `&new_buffer` is copy assigned into field `m_buffer` but is not modified afterwards. Rather than copying into the field, move into it instead. 235. new_buffer[i++] = ele; 236. } 237. m_buffer = new_buffer; ^ 238. m_capacity = new_capacity; 239. m_tail = 0; #2829 unittest/json_lib/json_lib-t.c:76: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_scan_next()`. 74. break; 75. }; 76. } while (json_scan_next(&je) == 0); ^ 77. 78. result->error= je.s.error; #2830 unittest/json_lib/json_lib-t.c:117: error: Uninitialized Value `p.s.c_next` is read without initialization during the call to `json_path_setup()`. 115. { 116. json_path_t p; 117. if (json_path_setup(&p, ci, s_e(p0))) ^ 118. return; 119. ok(p.last_step - p.steps == 4 && #2831 unittest/json_lib/json_lib-t.c:117: error: Uninitialized Value `s.s.c_next` is read without initialization during the call to `json_path_setup()`. 115. { 116. json_path_t p; 117. if (json_path_setup(&p, ci, s_e(p0))) ^ 118. return; 119. ok(p.last_step - p.steps == 4 && #2832 unittest/json_lib/json_lib-t.c:146: error: Uninitialized Value `p.s.c_next` is read without initialization during the call to `json_path_setup()`. 144. 145. if (json_scan_start(&je, ci, s_e(fj0)) || 146. json_path_setup(&p, ci, s_e(fp0))) ^ 147. return; 148. #2833 unittest/json_lib/json_lib-t.c:146: error: Uninitialized Value `s.s.c_next` is read without initialization during the call to `json_path_setup()`. 144. 145. if (json_scan_start(&je, ci, s_e(fj0)) || 146. json_path_setup(&p, ci, s_e(fp0))) ^ 147. return; 148. #2834 unittest/json_lib/json_lib-t.c:154: error: Uninitialized Value `js.s.c_next` is read without initialization during the call to `json_read_value()`. 152. { 153. n_matches++; 154. if (json_read_value(&je)) ^ 155. return; 156. if (json_value_scalar(&je)) #2835 unittest/mysys/aes-t.c:93: error: Uninitialized Value `dst_len2` is read without initialization. 91. ok(result == MY_AES_OK, "encrypt bytewise %s %u", mode_str, src_len); 92. /* Compare with non-bytewise encryption result*/ 93. ok(dst_len == dst_len2 && memcmp(dst, dst2, dst_len) == 0, ^ 94. "memcmp bytewise %s %u", mode_str, src_len); 95. } #2836 unittest/mysys/aes-t.c:98: error: Dead Store The value written to `&dst_len_real` is never used. 96. else 97. { 98. int dst_len_real= my_aes_get_size(mode, src_len); ^ 99. ok(dst_len_real= dst_len, "my_aes_get_size"); 100. } #2837 unittest/mysys/aes-t.c:109: error: Uninitialized Value `ddst_len` is read without initialization. 107. 108. ok(result == MY_AES_OK, "decrypt %s %u", mode_str, dst_len); 109. ok(ddst_len == src_len && memcmp(src, ddst, src_len) == 0, "memcmp"); ^ 110. } 111. #2838 unittest/mysys/bitmap-t.c:139: error: Uninitialized Value `_.n_bits` is read without initialization. 137. my_bitmap_init(&map3_obj, map3buf, bitsize, FALSE); 138. bitmap_clear_all(map2); 139. bitmap_clear_all(map3); ^ 140. for (i=0; i < no_loops; i++) 141. { #2839 unittest/mysys/bitmap-t.c:156: error: Dead Store The value written to `&test_bit3` is never used. 154. test_bit1=get_rand_bit(bitsize); 155. test_bit2=get_rand_bit(bitsize); 156. test_bit3=get_rand_bit(bitsize); ^ 157. bitmap_set_prefix(map, test_bit1); 158. bitmap_set_prefix(map2, test_bit2); #2840 unittest/mysys/bitmap-t.c:169: error: Dead Store The value written to `&test_bit3` is never used. 167. test_bit1=get_rand_bit(bitsize); 168. test_bit2=get_rand_bit(bitsize); 169. test_bit3=get_rand_bit(bitsize); ^ 170. bitmap_set_prefix(map, test_bit1); 171. bitmap_set_prefix(map2, test_bit2); #2841 unittest/mysys/bitmap-t.c:185: error: Dead Store The value written to `&test_bit3` is never used. 183. test_bit1=get_rand_bit(bitsize); 184. test_bit2=get_rand_bit(bitsize); 185. test_bit3=get_rand_bit(bitsize); ^ 186. bitmap_set_prefix(map, test_bit1); 187. bitmap_set_prefix(map2, test_bit2); #2842 unittest/mysys/bitmap-t.c:526: error: Uninitialized Value `map.n_bits` is read without initialization during the call to `bitmap_set_all()`. 524. my_bitmap_init(&map3, buff2, sizeof(buff)*8, FALSE); 525. bitmap_set_all(&map2); 526. bitmap_set_all(&map3); ^ 527. 528. bitsize= MY_MIN(bitsize, map2.n_bits); #2843 unittest/mysys/bitmap-t.c:567: error: Uninitialized Value `_.n_bits` is read without initialization. 565. my_bitmap_init(&map2, 0, bitsize, FALSE); 566. bitmap_clear_all(map); 567. bitmap_clear_all(&map2); ^ 568. 569. start_bit= get_rand_bit(bitsize); #2844 unittest/mysys/ma_dyncol-t.c:163: error: Uninitialized Value `str.str` is read without initialization during the call to `mariadb_dyncol_free()`. 161. ok(rc, "%s - %s", num, buff); 162. /* cleanup */ 163. mariadb_dyncol_free(&str); ^ 164. } 165. #2845 unittest/mysys/ma_dyncol-t.c:464: error: Uninitialized Value `str.str` is read without initialization during the call to `mariadb_dyncol_free()`. 462. /* cleanup */ 463. val[4].x.string.value.str= NULL; // we did not allocated it 464. mariadb_dyncol_free(&str); ^ 465. } 466. #2846 unittest/mysys/my_atomic-t.c:109: error: Null Dereference The call to `test_concurrently` may trigger the following issue: null (from the call to `test_concurrently()` on line 109) is dereferenced in the call to `test_concurrently()`. 107. 108. b32= c32= 0; 109. test_concurrently("my_atomic_add32", test_atomic_add, THREADS, CYCLES); ^ 110. b32= c32= 0; 111. test_concurrently("my_atomic_fas32", test_atomic_fas, THREADS, CYCLES); #2847 unittest/mysys/my_atomic-t.c:111: error: Null Dereference The call to `test_concurrently` may trigger the following issue: null (from the call to `test_concurrently()` on line 111) is dereferenced in the call to `test_concurrently()`. 109. test_concurrently("my_atomic_add32", test_atomic_add, THREADS, CYCLES); 110. b32= c32= 0; 111. test_concurrently("my_atomic_fas32", test_atomic_fas, THREADS, CYCLES); ^ 112. b32= c32= 0; 113. test_concurrently("my_atomic_cas32", test_atomic_cas, THREADS, CYCLES); #2848 unittest/mysys/thr_template.c:38: error: Uninitialized Value a value is read without initialization. 36. for (i= 0; i < n; i++) 37. { 38. if (pthread_create(&threads[i], 0, handler, &m) != 0) ^ 39. { 40. diag("Could not create thread"); #2849 unittest/strings/json-t.c:38: error: Uninitialized Value `value_len` is read without initialization. 36. key, &value_start, &value_len); 37. if (type) 38. ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len), ^ 39. "%s: type=%u, value(%d)=\"%.*s\"", key, value_type, value_len, value_len, value_start); 40. else #2850 unittest/strings/json-t.c:38: error: Uninitialized Value `value_start` is read without initialization. 36. key, &value_start, &value_len); 37. if (type) 38. ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len), ^ 39. "%s: type=%u, value(%d)=\"%.*s\"", key, value_type, value_len, value_len, value_start); 40. else #2851 unittest/strings/json-t.c:39: error: Uninitialized Value `value_len` is read without initialization. 37. if (type) 38. ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len), 39. "%s: type=%u, value(%d)=\"%.*s\"", key, value_type, value_len, value_len, value_start); ^ 40. else 41. ok(value_type == type && value_len == (int)strlen(value), #2852 unittest/strings/json-t.c:39: error: Uninitialized Value `value_start` is read without initialization. 37. if (type) 38. ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len), 39. "%s: type=%u, value(%d)=\"%.*s\"", key, value_type, value_len, value_len, value_start); ^ 40. else 41. ok(value_type == type && value_len == (int)strlen(value), #2853 unittest/strings/json-t.c:42: error: Uninitialized Value `value_len` is read without initialization. 40. else 41. ok(value_type == type && value_len == (int)strlen(value), 42. "%s: type=%u keys=%u end=\"%s\"", key, value_type, value_len, value_start); ^ 43. } 44. #2854 unittest/strings/json-t.c:42: error: Uninitialized Value `value_start` is read without initialization. 40. else 41. ok(value_type == type && value_len == (int)strlen(value), 42. "%s: type=%u keys=%u end=\"%s\"", key, value_type, value_len, value_start); ^ 43. } 44. #2855 unittest/strings/json-t.c:54: error: Uninitialized Value `value_len` is read without initialization. 52. n, &value_start, &value_len); 53. if (type) 54. ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len), ^ 55. "%i: type=%u, value(%d)=\"%.*s\"", n, value_type, value_len, value_len, value_start); 56. else #2856 unittest/strings/json-t.c:54: error: Uninitialized Value `value_start` is read without initialization. 52. n, &value_start, &value_len); 53. if (type) 54. ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len), ^ 55. "%i: type=%u, value(%d)=\"%.*s\"", n, value_type, value_len, value_len, value_start); 56. else #2857 unittest/strings/json-t.c:55: error: Uninitialized Value `value_len` is read without initialization. 53. if (type) 54. ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len), 55. "%i: type=%u, value(%d)=\"%.*s\"", n, value_type, value_len, value_len, value_start); ^ 56. else 57. ok(value_type == type && value_len == (int)strlen(value), #2858 unittest/strings/json-t.c:55: error: Uninitialized Value `value_start` is read without initialization. 53. if (type) 54. ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len), 55. "%i: type=%u, value(%d)=\"%.*s\"", n, value_type, value_len, value_len, value_start); ^ 56. else 57. ok(value_type == type && value_len == (int)strlen(value), #2859 unittest/strings/json-t.c:58: error: Uninitialized Value `value_len` is read without initialization. 56. else 57. ok(value_type == type && value_len == (int)strlen(value), 58. "%i: type=%u keys=%u end=\"%s\"", n, value_type, value_len, value_start); ^ 59. } 60. #2860 unittest/strings/json-t.c:58: error: Uninitialized Value `value_start` is read without initialization. 56. else 57. ok(value_type == type && value_len == (int)strlen(value), 58. "%i: type=%u keys=%u end=\"%s\"", n, value_type, value_len, value_start); ^ 59. } 60. #2861 unittest/strings/json-t.c:68: error: Uninitialized Value `key_start` is read without initialization. 66. res= json_locate_key(json, json + strlen(json), 67. key, &key_start, &key_end, &comma_pos); 68. if (key_start) ^ 69. ok(res == 0 && key_start - json == from && key_end - json == to && 70. comma_pos == cp, "%s: [%d,%d,%d] %.*s%s", key, (int)(key_start-json), #2862 unittest/strings/json-t.c:71: error: Uninitialized Value `key_end` is read without initialization. 69. ok(res == 0 && key_start - json == from && key_end - json == to && 70. comma_pos == cp, "%s: [%d,%d,%d] %.*s%s", key, (int)(key_start-json), 71. (int)(key_end-json), comma_pos, (int)(key_start - json), json, key_end); ^ 72. else 73. ok(res == 0 && from == -1, "%s: key not found", key); #2863 unittest/strings/json-t.c:71: error: Uninitialized Value `comma_pos` is read without initialization. 69. ok(res == 0 && key_start - json == from && key_end - json == to && 70. comma_pos == cp, "%s: [%d,%d,%d] %.*s%s", key, (int)(key_start-json), 71. (int)(key_end-json), comma_pos, (int)(key_start - json), json, key_end); ^ 72. else 73. ok(res == 0 && from == -1, "%s: key not found", key); #2864 wsrep-lib/include/wsrep/client_state.hpp:952: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::is_rollbacker_active` reads without synchronization from `this->rollbacker_active_`, which races with the write in method `wsrep::client_state::open`. 950. bool is_rollbacker_active() 951. { 952. return rollbacker_active_; ^ 953. } 954. protected: #2865 wsrep-lib/include/wsrep/transaction.hpp:148: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::pa_unsafe` indirectly reads without synchronization from `this->flags_`, which races with the write in method `wsrep::transaction::after_applying`. 146. void pa_unsafe(bool pa_unsafe) { 147. if (pa_unsafe) { 148. flags(flags() | wsrep::provider::flag::pa_unsafe); ^ 149. } else { 150. flags(flags() & ~wsrep::provider::flag::pa_unsafe); #2866 wsrep-lib/src/client_state.cpp:70: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::close` indirectly reads without synchronization from `this->transaction_.id_.id_`, which races with the write in method `wsrep::client_state::before_command`. 68. keep_command_error_ = false; 69. lock.unlock(); 70. if (transaction_.active() && ^ 71. (mode_ != m_local || !client_service_.is_prepared_xa())) 72. { #2867 wsrep-lib/src/client_state.cpp:71: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::close` reads without synchronization from `this->mode_`, which races with the write in method `wsrep::client_state::end_nbo_phase_two`. 69. lock.unlock(); 70. if (transaction_.active() && 71. (mode_ != m_local || !client_service_.is_prepared_xa())) ^ 72. { 73. client_service_.bf_rollback(); #2868 wsrep-lib/src/client_state.cpp:91: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::cleanup` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 89. void wsrep::client_state::cleanup(wsrep::unique_lock& lock) 90. { 91. debug_log_state("cleanup: enter"); ^ 92. state(lock, s_none); 93. debug_log_state("cleanup: leave"); #2869 wsrep-lib/src/client_state.cpp:305: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::append_key` indirectly reads without synchronization from `this->transaction_.id_.id_`, which races with the write in method `wsrep::client_state::before_command`. 303. assert(mode_ == m_local); 304. assert(state_ == s_exec); 305. return transaction_.append_key(key); ^ 306. } 307. #2870 wsrep-lib/src/client_state.cpp:314: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::append_keys` indirectly reads without synchronization from `this->transaction_.id_.id_`, which races with the write in method `wsrep::client_state::before_command`. 312. for (auto i(keys.begin()); i != keys.end(); ++i) 313. { 314. if (transaction_.append_key(*i)) ^ 315. { 316. return 1; #2871 wsrep-lib/src/client_state.cpp:341: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::fragment_applied` indirectly reads without synchronization from `this->transaction_.streaming_context_.fragments_certified_`, which races with the write in method `wsrep::client_state::before_command`. 339. { 340. assert(mode_ == m_high_priority); 341. transaction_.fragment_applied(seqno); ^ 342. } 343. #2872 wsrep-lib/src/client_state.cpp:349: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::prepare_for_ordering` indirectly reads without synchronization from `this->transaction_.state_`, which races with the write in method `wsrep::client_state::before_command`. 347. { 348. assert(state_ == s_exec); 349. return transaction_.prepare_for_ordering(ws_handle, ws_meta, is_commit); ^ 350. } 351. #2873 wsrep-lib/src/client_state.cpp:466: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::enable_streaming` indirectly reads without synchronization from `this->transaction_.streaming_context_.fragments_certified_`, which races with the write in method `wsrep::client_state::before_command`. 464. { 465. assert(mode_ == m_local); 466. if (transaction_.is_streaming() && ^ 467. transaction_.streaming_context().fragment_unit() != 468. fragment_unit) #2874 wsrep-lib/src/client_state.cpp:494: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::xa_detach` indirectly reads without synchronization from `this->transaction_.bf_abort_state_`, which races with the write in method `wsrep::client_state::before_command`. 492. assert(mode_ == m_local); 493. assert(state_ == s_none || state_ == s_exec || state_ == s_quitting); 494. transaction_.xa_detach(); ^ 495. } 496. #2875 wsrep-lib/src/client_state.cpp:514: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::bf_abort` indirectly reads without synchronization from `this->transaction_.bf_abort_state_`, which races with the write in method `wsrep::client_state::before_command`. 512. assert(lock.owns_lock()); 513. assert(mode_ == m_local || transaction_.is_streaming()); 514. auto ret = transaction_.bf_abort(lock, bf_seqno, client_service_); ^ 515. assert(lock.owns_lock()); 516. return ret; #2876 wsrep-lib/src/client_state.cpp:530: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::total_order_bf_abort` indirectly reads without synchronization from `this->transaction_.bf_abort_state_`, which races with the write in method `wsrep::client_state::before_command`. 528. assert(lock.owns_lock()); 529. assert(mode_ == m_local || transaction_.is_streaming()); 530. auto ret = transaction_.total_order_bf_abort(lock, bf_seqno, client_service_); ^ 531. assert(lock.owns_lock()); 532. return ret; #2877 wsrep-lib/src/client_state.cpp:545: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::adopt_transaction` indirectly reads without synchronization from `this->transaction_.bf_abort_state_`, which races with the write in method `wsrep::client_state::before_command`. 543. { 544. assert(mode_ == m_high_priority); 545. transaction_.adopt(transaction); ^ 546. } 547. #2878 wsrep-lib/src/client_state.cpp:625: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::enter_toi_local` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 623. std::chrono::time_point wait_until) 624. { 625. debug_log_state("enter_toi_local: enter"); ^ 626. assert(state_ == s_exec); 627. assert(mode_ == m_local); #2879 wsrep-lib/src/client_state.cpp:668: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::enter_toi_mode` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 666. void wsrep::client_state::enter_toi_mode(const wsrep::ws_meta& ws_meta) 667. { 668. debug_log_state("enter_toi_mode: enter"); ^ 669. wsrep::unique_lock lock(mutex_); 670. assert(mode_ == m_high_priority); #2880 wsrep-lib/src/client_state.cpp:690: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::leave_toi_local` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 688. int wsrep::client_state::leave_toi_local(const wsrep::mutable_buffer& err) 689. { 690. debug_log_state("leave_toi_local: enter"); ^ 691. assert(toi_mode_ == m_local); 692. #2881 wsrep-lib/src/client_state.cpp:702: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::leave_toi_mode` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 700. void wsrep::client_state::leave_toi_mode() 701. { 702. debug_log_state("leave_toi_mode: enter"); ^ 703. assert(toi_mode_ == m_high_priority); 704. leave_toi_common(); #2882 wsrep-lib/src/client_state.cpp:767: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::begin_nbo_phase_one` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 765. std::chrono::time_point wait_until) 766. { 767. debug_log_state("begin_nbo_phase_one: enter"); ^ 768. debug_log_keys(keys); 769. wsrep::unique_lock lock(mutex_); #2883 wsrep-lib/src/client_state.cpp:809: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::end_nbo_phase_one` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 807. int wsrep::client_state::end_nbo_phase_one(const wsrep::mutable_buffer& err) 808. { 809. debug_log_state("end_nbo_phase_one: enter"); ^ 810. assert(state_ == s_exec); 811. assert(mode_ == m_nbo); #2884 wsrep-lib/src/client_state.cpp:849: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::begin_nbo_phase_two` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 847. std::chrono::time_point wait_until) 848. { 849. debug_log_state("begin_nbo_phase_two: enter"); ^ 850. debug_log_keys(keys); 851. assert(state_ == s_exec); #2885 wsrep-lib/src/client_state.cpp:909: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::client_state::end_nbo_phase_two` indirectly reads without synchronization from `this->current_error_`, which races with the write in method `wsrep::client_state::before_command`. 907. int wsrep::client_state::end_nbo_phase_two(const wsrep::mutable_buffer& err) 908. { 909. debug_log_state("end_nbo_phase_two: enter"); ^ 910. assert(state_ == s_exec); 911. assert(mode_ == m_nbo); #2886 wsrep-lib/src/client_state.cpp:1087: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::high_priority_context::high_priority_context` reads without synchronization from `client->mode_`, which races with the write in method `wsrep::high_priority_context::high_priority_context`. 1085. wsrep::high_priority_context::high_priority_context(wsrep::client_state& client) 1086. : client_(client) 1087. , orig_mode_(client.mode_) ^ 1088. { 1089. wsrep::unique_lock lock(client.mutex_); #2887 wsrep-lib/src/config_service_v1.cpp:99: error: Dead Store The value written to `&ret` is never used. 97. { 98. const int flags = map_flags(p->flags); 99. enum wsrep::provider::status ret(wsrep::provider::error_unknown); ^ 100. wsrep::provider_options* options = (wsrep::provider_options*)context; 101. switch (p->flags & WSREP_PARAM_TYPE_MASK) #2888 wsrep-lib/src/server_state.cpp:134: error: Unnecessary Copy copied variable `xid` is not modified after it is copied from `wsrep::transaction::xid()` on line 134. To avoid the copy, use reference `&`. If this copy was intentional, call `folly::copy` to make it explicit and hence suppress the warning. 132. { 133. high_priority_service.debug_crash("crash_apply_cb_before_append_frag"); 134. const wsrep::xid xid(streaming_applier->transaction().xid()); ^ 135. ret = high_priority_service.append_fragment_and_commit( 136. ws_handle, ws_meta, data, xid); #2889 wsrep-lib/src/server_state.cpp:234: error: Dead Store The value written to `&no_error` is never used. 232. // Adopt failure will leave stale entries in streaming log which can 233. // be removed manually. 234. wsrep::const_buffer no_error; ^ 235. { 236. wsrep::high_priority_switch ws( #2890 wsrep-lib/src/server_state.cpp:530: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::server_state::connect` reads without synchronization from `this->bootstrap_`, which races with the write in method `wsrep::server_state::on_view`. 528. { 529. bootstrap_ = is_bootstrap(cluster_address, bootstrap); 530. wsrep::log_info() << "Connecting with bootstrap option: " << bootstrap_; ^ 531. return provider().connect(cluster_name, cluster_address, state_donor, 532. bootstrap_); #2891 wsrep-lib/src/server_state.cpp:1435: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::server_state::recover_streaming_appliers_if_not_recovered` reads without synchronization from `this->streaming_appliers_recovered_`, which races with the write in method `wsrep::server_state::on_view`. 1433. { 1434. assert(lock.owns_lock()); 1435. if (streaming_appliers_recovered_ == false) ^ 1436. { 1437. lock.unlock(); #2892 wsrep-lib/src/server_state.cpp:1435: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::server_state::recover_streaming_appliers_if_not_recovered` reads without synchronization from `this->streaming_appliers_recovered_`, which races with the write in method `wsrep::server_state::on_view`. 1433. { 1434. assert(lock.owns_lock()); 1435. if (streaming_appliers_recovered_ == false) ^ 1436. { 1437. lock.unlock(); #2893 wsrep-lib/src/transaction.cpp:131: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::start_transaction` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 129. const wsrep::transaction_id& id) 130. { 131. debug_log_state("start_transaction enter"); ^ 132. assert(active() == false); 133. assert(is_xa() == false); #2894 wsrep-lib/src/transaction.cpp:160: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::start_transaction` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 158. const wsrep::ws_meta& ws_meta) 159. { 160. debug_log_state("start_transaction enter"); ^ 161. if (state() != s_replaying) 162. { #2895 wsrep-lib/src/transaction.cpp:193: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::next_fragment` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 191. const wsrep::ws_meta& ws_meta) 192. { 193. debug_log_state("next_fragment enter"); ^ 194. ws_meta_ = ws_meta; 195. debug_log_state("next_fragment leave"); #2896 wsrep-lib/src/transaction.cpp:201: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::adopt` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 199. void wsrep::transaction::adopt(const wsrep::transaction& transaction) 200. { 201. debug_log_state("adopt enter"); ^ 202. assert(transaction.is_streaming()); 203. start_transaction(transaction.id()); #2897 wsrep-lib/src/transaction.cpp:213: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::fragment_applied` indirectly reads without synchronization from `this->streaming_context_.fragments_certified_`, which races with the write in method `wsrep::transaction::after_applying`. 211. { 212. assert(active()); 213. streaming_context_.applied(seqno); ^ 214. } 215. #2898 wsrep-lib/src/transaction.cpp:223: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::prepare_for_ordering` reads without synchronization from `this->state_`, which races with the write in method `wsrep::transaction::after_applying`. 221. assert(active()); 222. 223. if (state_ != s_replaying) ^ 224. { 225. ws_handle_ = ws_handle; #2899 wsrep-lib/src/transaction.cpp:250: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::append_key` indirectly reads without synchronization from `this->id_.id_`, which races with the write in method `wsrep::transaction::after_applying`. 248. try 249. { 250. debug_log_key_append(key); ^ 251. sr_keys_.insert(key); 252. return provider().append_key(ws_handle_, key); #2900 wsrep-lib/src/transaction.cpp:286: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::before_prepare` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 284. assert(lock.owns_lock()); 285. int ret(0); 286. debug_log_state("before_prepare_enter"); ^ 287. assert(state() == s_executing || state() == s_must_abort || 288. state() == s_replaying); #2901 wsrep-lib/src/transaction.cpp:312: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::before_prepare` indirectly reads without synchronization from `this->xid_.format_id_`, which races with the write in method `wsrep::transaction::after_applying`. 310. ret = 1; 311. } 312. else if (!is_xa()) ^ 313. { 314. // Note: we can't remove fragments here for XA, #2902 wsrep-lib/src/transaction.cpp:409: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::after_prepare` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 407. 408. int ret = 0; 409. debug_log_state("after_prepare_enter"); ^ 410. if (is_xa()) 411. { #2903 wsrep-lib/src/transaction.cpp:410: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::after_prepare` indirectly reads without synchronization from `this->xid_.format_id_`, which races with the write in method `wsrep::transaction::after_applying`. 408. int ret = 0; 409. debug_log_state("after_prepare_enter"); 410. if (is_xa()) ^ 411. { 412. switch (state()) #2904 wsrep-lib/src/transaction.cpp:838: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::after_statement` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 836. { 837. int ret(0); 838. debug_log_state("after_statement_enter"); ^ 839. assert(lock.owns_lock()); 840. assert(client_state_.mode() == wsrep::client_state::m_local); #2905 wsrep-lib/src/transaction.cpp:853: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::after_statement` indirectly reads without synchronization from `this->bf_abort_client_state_`, which races with the write in method `wsrep::transaction::after_applying`. 851. streaming_context_.fragment_unit() == streaming_context::statement) 852. { 853. ret = streaming_step(lock); ^ 854. } 855. #2906 wsrep-lib/src/transaction.cpp:943: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::after_command_must_abort` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 941. wsrep::unique_lock& lock) 942. { 943. debug_log_state("after_command_must_abort enter"); ^ 944. assert(active()); 945. assert(state_ == s_must_abort); #2907 wsrep-lib/src/transaction.cpp:947: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::after_command_must_abort` indirectly reads without synchronization from `this->xid_.format_id_`, which races with the write in method `wsrep::transaction::after_applying`. 945. assert(state_ == s_must_abort); 946. 947. if (is_xa() && is_streaming()) ^ 948. { 949. state(lock, s_must_replay); #2908 wsrep-lib/src/transaction.cpp:1002: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::bf_abort` indirectly reads without synchronization from `this->state_`, which races with the write in method `wsrep::transaction::after_applying`. 1000. { 1001. bool ret(false); 1002. const enum wsrep::transaction::state state_at_enter(state()); ^ 1003. assert(lock.owns_lock()); 1004. #2909 wsrep-lib/src/transaction.cpp:1005: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::bf_abort` indirectly reads without synchronization from `this->id_.id_`, which races with the write in method `wsrep::transaction::after_applying`. 1003. assert(lock.owns_lock()); 1004. 1005. if (active() == false) ^ 1006. { 1007. WSREP_LOG_DEBUG(client_state_.debug_log_level(), #2910 wsrep-lib/src/transaction.cpp:1011: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::bf_abort` reads without synchronization from `this->is_bf_immutable_`, which races with the write in method `wsrep::transaction::after_applying`. 1009. "Transaction not active, skipping bf abort"); 1010. } 1011. else if (is_bf_immutable_) ^ 1012. { 1013. WSREP_LOG_DEBUG(client_state_.debug_log_level(), #2911 wsrep-lib/src/transaction.cpp:1073: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::bf_abort` indirectly reads without synchronization from `this->streaming_context_.fragments_certified_`, which races with the write in method `wsrep::transaction::after_applying`. 1071. // handled from before_rollback() call. 1072. if (client_state_.mode() == wsrep::client_state::m_local && 1073. is_streaming() && state_at_enter == s_executing) ^ 1074. { 1075. streaming_rollback(lock); #2912 wsrep-lib/src/transaction.cpp:1075: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::bf_abort` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 1073. is_streaming() && state_at_enter == s_executing) 1074. { 1075. streaming_rollback(lock); ^ 1076. } 1077. #2913 wsrep-lib/src/transaction.cpp:1125: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::total_order_bf_abort` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 1123. * bf_abort() not to release lock if the BF abort is not allowed. */ 1124. bf_aborted_in_total_order_ = true; 1125. bool ret(bf_abort(lock, bf_seqno, victim_ctx)); ^ 1126. if (not ret) 1127. { #2914 wsrep-lib/src/transaction.cpp:1175: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::commit_or_rollback_by_xid` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 1173. bool commit) 1174. { 1175. debug_log_state("commit_or_rollback_by_xid enter"); ^ 1176. wsrep::unique_lock lock(client_state_.mutex_); 1177. wsrep::server_state& server_state(client_state_.server_state()); #2915 wsrep-lib/src/transaction.cpp:1238: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::xa_detach` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 1236. void wsrep::transaction::xa_detach() 1237. { 1238. debug_log_state("xa_detach enter"); ^ 1239. assert(state() == s_prepared || 1240. client_state_.state() == wsrep::client_state::s_quitting); #2916 wsrep-lib/src/transaction.cpp:1284: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::xa_replay` indirectly reads without synchronization from `this->bf_abort_state_`, which races with the write in method `wsrep::transaction::after_applying`. 1282. int wsrep::transaction::xa_replay(wsrep::unique_lock& lock) 1283. { 1284. debug_log_state("xa_replay enter"); ^ 1285. xa_replay_common(lock); 1286. state(lock, s_aborted); #2917 wsrep-lib/src/transaction.cpp:1339: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::state` indirectly reads without synchronization from `this->id_.id_`, which races with the write in method `wsrep::transaction::after_applying`. 1337. enum wsrep::transaction::state next_state) 1338. { 1339. WSREP_LOG_DEBUG(client_state_.debug_log_level(), ^ 1340. wsrep::log::debug_level_transaction, 1341. "client: " << client_state_.id().get() #2918 wsrep-lib/src/transaction.cpp:1339: warning: Lock Consistency Violation Read/Write race. Non-private method `wsrep::transaction::state` reads without synchronization from `this->state_`, which races with the write in method `wsrep::transaction::after_applying`. 1337. enum wsrep::transaction::state next_state) 1338. { 1339. WSREP_LOG_DEBUG(client_state_.debug_log_level(), ^ 1340. wsrep::log::debug_level_transaction, 1341. "client: " << client_state_.id().get() #2919 wsrep-lib/src/wsrep_provider_v26.cpp:576: error: Dead Store The value written to `&ll` is never used. 574. { 575. static const char* const pfx("P:"); // "provider" 576. wsrep::log::level ll(wsrep::log::unknown); ^ 577. switch (level) 578. { Found 2920 issues Issue Type(ISSUED_TYPE_ID): # Uninitialized Value(PULSE_UNINITIALIZED_VALUE): 1129 Dead Store(DEAD_STORE): 1080 Null Dereference(NULLPTR_DEREFERENCE): 129 Static Initialization Order Fiasco(STATIC_INITIALIZATION_ORDER_FIASCO): 116 Unnecessary Copy(PULSE_UNNECESSARY_COPY): 102 Unnecessary Copy Intermediate(PULSE_UNNECESSARY_COPY_INTERMEDIATE): 93 Const Refable Parameter(PULSE_CONST_REFABLE): 66 Lock Consistency Violation(LOCK_CONSISTENCY_VIOLATION): 63 Use After Lifetime(USE_AFTER_LIFETIME): 45 Memory Leak(MEMORY_LEAK_C): 37 Unnecessary Copy Assignment(PULSE_UNNECESSARY_COPY_ASSIGNMENT): 26 Deadlock(DEADLOCK): 22 Use After Delete(USE_AFTER_DELETE): 9 Optional Empty Access(OPTIONAL_EMPTY_ACCESS): 2 Unnecessary Copy Assignment from Const(PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST): 1