Mercurial > vim
comparison src/vim9expr.c @ 27114:98a01021e465 v8.2.4086
patch 8.2.4086: "cctx" argument of find_func_even_dead() is unused
Commit: https://github.com/vim/vim/commit/d9d2fd0aa33dd9f7460d6f1e403505a60f7ce2fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 13 21:15:21 2022 +0000
patch 8.2.4086: "cctx" argument of find_func_even_dead() is unused
Problem: "cctx" argument of find_func_even_dead() is unused.
Solution: Remove the argument.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Jan 2022 22:30:05 +0100 |
parents | 1e2a6c6c7e42 |
children | 6af18c69c59d |
comparison
equal
deleted
inserted
replaced
27113:93194ce58678 | 27114:98a01021e465 |
---|---|
348 } | 348 } |
349 | 349 |
350 static int | 350 static int |
351 generate_funcref(cctx_T *cctx, char_u *name) | 351 generate_funcref(cctx_T *cctx, char_u *name) |
352 { | 352 { |
353 ufunc_T *ufunc = find_func(name, FALSE, cctx); | 353 ufunc_T *ufunc = find_func(name, FALSE); |
354 | 354 |
355 if (ufunc == NULL) | 355 if (ufunc == NULL) |
356 return FAIL; | 356 return FAIL; |
357 | 357 |
358 // Need to compile any default values to get the argument types. | 358 // Need to compile any default values to get the argument types. |
416 switch (**arg) | 416 switch (**arg) |
417 { | 417 { |
418 case 'v': res = generate_LOADV(cctx, name, error); | 418 case 'v': res = generate_LOADV(cctx, name, error); |
419 break; | 419 break; |
420 case 's': if (is_expr && ASCII_ISUPPER(*name) | 420 case 's': if (is_expr && ASCII_ISUPPER(*name) |
421 && find_func(name, FALSE, cctx) != NULL) | 421 && find_func(name, FALSE) != NULL) |
422 res = generate_funcref(cctx, name); | 422 res = generate_funcref(cctx, name); |
423 else | 423 else |
424 res = compile_load_scriptvar(cctx, name, | 424 res = compile_load_scriptvar(cctx, name, |
425 NULL, &end, error); | 425 NULL, &end, error); |
426 break; | 426 break; |
427 case 'g': if (vim_strchr(name, AUTOLOAD_CHAR) == NULL) | 427 case 'g': if (vim_strchr(name, AUTOLOAD_CHAR) == NULL) |
428 { | 428 { |
429 if (is_expr && ASCII_ISUPPER(*name) | 429 if (is_expr && ASCII_ISUPPER(*name) |
430 && find_func(name, FALSE, cctx) != NULL) | 430 && find_func(name, FALSE) != NULL) |
431 res = generate_funcref(cctx, name); | 431 res = generate_funcref(cctx, name); |
432 else | 432 else |
433 isn_type = ISN_LOADG; | 433 isn_type = ISN_LOADG; |
434 } | 434 } |
435 else | 435 else |
777 if (lookup_local(namebuf, varlen, NULL, cctx) == FAIL | 777 if (lookup_local(namebuf, varlen, NULL, cctx) == FAIL |
778 && arg_exists(namebuf, varlen, NULL, NULL, NULL, cctx) != OK) | 778 && arg_exists(namebuf, varlen, NULL, NULL, NULL, cctx) != OK) |
779 { | 779 { |
780 // If we can find the function by name generate the right call. | 780 // If we can find the function by name generate the right call. |
781 // Skip global functions here, a local funcref takes precedence. | 781 // Skip global functions here, a local funcref takes precedence. |
782 ufunc = find_func(name, FALSE, cctx); | 782 ufunc = find_func(name, FALSE); |
783 if (ufunc != NULL && !func_is_global(ufunc)) | 783 if (ufunc != NULL && !func_is_global(ufunc)) |
784 { | 784 { |
785 res = generate_CALL(cctx, ufunc, argcount); | 785 res = generate_CALL(cctx, ufunc, argcount); |
786 goto theend; | 786 goto theend; |
787 } | 787 } |