Mercurial > vim
comparison src/evalfunc.c @ 21062:c2a368193769 v8.2.1082
patch 8.2.1082: Coverity complains about ignoring dict_add() return value
Commit: https://github.com/vim/vim/commit/91639195eff7b29213a0a3c279ac46e46ac76edd
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 29 19:55:58 2020 +0200
patch 8.2.1082: 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:00:04 +0200 |
parents | 7ee565134d4a |
children | d69ead03ba93 |
comparison
equal
deleted
inserted
replaced
21061:6a1d744580b0 | 21062:c2a368193769 |
---|---|
6270 dict = rettv->vval.v_dict; | 6270 dict = rettv->vval.v_dict; |
6271 | 6271 |
6272 list = (list_T *)get_reg_contents(regname, GREG_EXPR_SRC | GREG_LIST); | 6272 list = (list_T *)get_reg_contents(regname, GREG_EXPR_SRC | GREG_LIST); |
6273 if (list == NULL) | 6273 if (list == NULL) |
6274 return; | 6274 return; |
6275 dict_add_list(dict, "regcontents", list); | 6275 (void)dict_add_list(dict, "regcontents", list); |
6276 | 6276 |
6277 buf[0] = NUL; | 6277 buf[0] = NUL; |
6278 buf[1] = NUL; | 6278 buf[1] = NUL; |
6279 switch (get_reg_type(regname, ®len)) | 6279 switch (get_reg_type(regname, ®len)) |
6280 { | 6280 { |
6283 case MBLOCK: | 6283 case MBLOCK: |
6284 vim_snprintf((char *)buf, sizeof(buf), "%c%ld", Ctrl_V, | 6284 vim_snprintf((char *)buf, sizeof(buf), "%c%ld", Ctrl_V, |
6285 reglen + 1); | 6285 reglen + 1); |
6286 break; | 6286 break; |
6287 } | 6287 } |
6288 dict_add_string(dict, (char *)"regtype", buf); | 6288 (void)dict_add_string(dict, (char *)"regtype", buf); |
6289 | 6289 |
6290 buf[0] = get_register_name(get_unname_register()); | 6290 buf[0] = get_register_name(get_unname_register()); |
6291 buf[1] = NUL; | 6291 buf[1] = NUL; |
6292 if (regname == '"') | 6292 if (regname == '"') |
6293 dict_add_string(dict, (char *)"points_to", buf); | 6293 (void)dict_add_string(dict, (char *)"points_to", buf); |
6294 else | 6294 else |
6295 { | 6295 { |
6296 dictitem_T *item = dictitem_alloc((char_u *)"isunnamed"); | 6296 dictitem_T *item = dictitem_alloc((char_u *)"isunnamed"); |
6297 | 6297 |
6298 if (item != NULL) | 6298 if (item != NULL) |
6299 { | 6299 { |
6300 item->di_tv.v_type = VAR_SPECIAL; | 6300 item->di_tv.v_type = VAR_SPECIAL; |
6301 item->di_tv.vval.v_number = regname == buf[0] | 6301 item->di_tv.vval.v_number = regname == buf[0] |
6302 ? VVAL_TRUE : VVAL_FALSE; | 6302 ? VVAL_TRUE : VVAL_FALSE; |
6303 dict_add(dict, item); | 6303 (void)dict_add(dict, item); |
6304 } | 6304 } |
6305 } | 6305 } |
6306 } | 6306 } |
6307 | 6307 |
6308 static void | 6308 static void |