]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.3930: getcmdline() argument has a misleading type v8.2.3930
authorBram Moolenaar <Bram@vim.org>
Tue, 28 Dec 2021 20:59:56 +0000 (20:59 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 28 Dec 2021 20:59:56 +0000 (20:59 +0000)
Problem:    getcmdline() argument has a misleading type.
Solution:   Use the correct type, even though the value is not used.

src/ex_docmd.c
src/ex_getln.c
src/normal.c
src/proto/ex_getln.pro
src/register.c
src/userfunc.c
src/version.c

index 20b24572cef49f677f5db947ee30f8b70fbfefd5..d4c725c6fc9e47069c4e75f098849f21c3594d3d 100644 (file)
@@ -1467,7 +1467,7 @@ get_loop_line(int c, void *cookie, int indent, getline_opt_T options)
 
        // First time inside the ":while"/":for": get line normally.
        if (cp->getline == NULL)
-           line = getcmdline(c, 0L, indent, options);
+           line = getcmdline(c, 0L, indent, 0);
        else
            line = cp->getline(c, cp->cookie, indent, options);
        if (line != NULL && store_loop_line(cp->lines_gap, line) == OK)
index bffdf657fa70dcd7cc0054c5a226a4f52943aff2..b4316d8452a9fce0390d4dd6676eb1ff322ad1cb 100644 (file)
@@ -1554,10 +1554,10 @@ init_ccline(int firstc, int indent)
  */
     char_u *
 getcmdline(
-    int                firstc,
-    long       count,          // only used for incremental search
-    int                indent,         // indent for inside conditionals
-    int                do_concat UNUSED)
+    int                  firstc,
+    long         count,        // only used for incremental search
+    int                  indent,       // indent for inside conditionals
+    getline_opt_T do_concat UNUSED)
 {
     return getcmdline_int(firstc, count, indent, TRUE);
 }
index f925aa14ab7253b6d3c4194380a694360c1cab0d..165b1856b6a1e2d347c493ef5b9ee6a27060a578 100644 (file)
@@ -4388,7 +4388,7 @@ nv_search(cmdarg_T *cap)
 
     // When using 'incsearch' the cursor may be moved to set a different search
     // start position.
-    cap->searchbuf = getcmdline(cap->cmdchar, cap->count1, 0, TRUE);
+    cap->searchbuf = getcmdline(cap->cmdchar, cap->count1, 0, 0);
 
     if (cap->searchbuf == NULL)
     {
index d6f19110e733c5dbe130927fe4f746b5408f216c..d56893a65766bf694d247c6b7497965ca2f33c6f 100644 (file)
@@ -1,6 +1,6 @@
 /* ex_getln.c */
 void cmdline_init(void);
-char_u *getcmdline(int firstc, long count, int indent, int do_concat);
+char_u *getcmdline(int firstc, long count, int indent, getline_opt_T do_concat);
 char_u *getcmdline_prompt(int firstc, char_u *prompt, int attr, int xp_context, char_u *xp_arg);
 int check_opt_wim(void);
 int text_and_win_locked(void);
index 6a4bc2cc1a36e20f82d0583cf5e40865e53e803d..2a5f1196a9d4ca35720f5cdcbeca7efc91eb21bc 100644 (file)
@@ -97,7 +97,7 @@ get_expr_register(void)
 {
     char_u     *new_line;
 
-    new_line = getcmdline('=', 0L, 0, TRUE);
+    new_line = getcmdline('=', 0L, 0, 0);
     if (new_line == NULL)
        return NUL;
     if (*new_line == NUL)      // use previous line
index f79e4cdf40df2cce5d8b8a2059b8e2d94b8de4d2..d4d28c52975372b7bfdc9fb4c3905ca35fbfef26 100644 (file)
@@ -180,7 +180,7 @@ get_function_line(
     char_u *theline;
 
     if (eap->getline == NULL)
-       theline = getcmdline(':', 0L, indent, getline_options);
+       theline = getcmdline(':', 0L, indent, 0);
     else
        theline = eap->getline(':', eap->cookie, indent, getline_options);
     if (theline != NULL)
index 505d3f1430003547421f46affe47a1ab85ed9592..b752bc4c7965be479ee59f418e4fe6f9a2dfdf2f 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3930,
 /**/
     3929,
 /**/