comparison src/register.c @ 21068:ac493e63b192 v8.2.1085

patch 8.2.1085: Coverity complains about ignoring dict_add() return value Commit: https://github.com/vim/vim/commit/6d90c61c5a6437ff5058b6c5874ba71bff574e60 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 29 20:23:32 2020 +0200 patch 8.2.1085: Coverity complains about ignoring dict_add() return value Problem: Coverity complains about ignoring dict_add() return value. Solution: Add (void).
author Bram Moolenaar <Bram@vim.org>
date Mon, 29 Jun 2020 20:30:04 +0200
parents 3af71cbcfdbe
children 136b33ce8216
comparison
equal deleted inserted replaced
21067:85b078be8036 21068:ac493e63b192
987 if (list == NULL) 987 if (list == NULL)
988 return; 988 return;
989 for (n = 0; n < reg->y_size; n++) 989 for (n = 0; n < reg->y_size; n++)
990 list_append_string(list, reg->y_array[n], -1); 990 list_append_string(list, reg->y_array[n], -1);
991 list->lv_lock = VAR_FIXED; 991 list->lv_lock = VAR_FIXED;
992 dict_add_list(v_event, "regcontents", list); 992 (void)dict_add_list(v_event, "regcontents", list);
993 993
994 buf[0] = (char_u)oap->regname; 994 buf[0] = (char_u)oap->regname;
995 buf[1] = NUL; 995 buf[1] = NUL;
996 dict_add_string(v_event, "regname", buf); 996 (void)dict_add_string(v_event, "regname", buf);
997 997
998 buf[0] = get_op_char(oap->op_type); 998 buf[0] = get_op_char(oap->op_type);
999 buf[1] = get_extra_op_char(oap->op_type); 999 buf[1] = get_extra_op_char(oap->op_type);
1000 buf[2] = NUL; 1000 buf[2] = NUL;
1001 dict_add_string(v_event, "operator", buf); 1001 (void)dict_add_string(v_event, "operator", buf);
1002 1002
1003 buf[0] = NUL; 1003 buf[0] = NUL;
1004 buf[1] = NUL; 1004 buf[1] = NUL;
1005 switch (get_reg_type(oap->regname, &reglen)) 1005 switch (get_reg_type(oap->regname, &reglen))
1006 { 1006 {
1009 case MBLOCK: 1009 case MBLOCK:
1010 vim_snprintf((char *)buf, sizeof(buf), "%c%ld", Ctrl_V, 1010 vim_snprintf((char *)buf, sizeof(buf), "%c%ld", Ctrl_V,
1011 reglen + 1); 1011 reglen + 1);
1012 break; 1012 break;
1013 } 1013 }
1014 dict_add_string(v_event, "regtype", buf); 1014 (void)dict_add_string(v_event, "regtype", buf);
1015 1015
1016 dict_add_bool(v_event, "visual", oap->is_VIsual); 1016 (void)dict_add_bool(v_event, "visual", oap->is_VIsual);
1017 1017
1018 // Lock the dictionary and its keys 1018 // Lock the dictionary and its keys
1019 dict_set_items_ro(v_event); 1019 dict_set_items_ro(v_event);
1020 1020
1021 recursive = TRUE; 1021 recursive = TRUE;