On 29-Nov-2022 05:52, Bram Moolenaar wrote:
Patch 9.0.0965
Problem:    Using one window for executing autocommands is insufficient.
Solution:   Use up to five windows for executing autocommands.
Files:      src/globals.h, src/structs.h, src/autocmd.c,
             src/proto/autocmd.pro, src/main.c, src/eval.c, src/evalwindow.c,
             src/ex_docmd.c, src/screen.c, src/terminal.c, src/window.c,
             src/buffer.c, src/bufwrite.c, src/channel.c, src/diff.c,
             src/evalbuffer.c, src/evalvars.c, src/ex_cmds2.c, src/fileio.c,
             src/if_ruby.c, src/os_unix.c, src/os_win32.c, src/quickfix.c,
             src/term.c, src/if_perl.xs, src/if_py_both.h,
             src/testdir/test_autocmd.vim


After this patch mingw64 (clang 15.0.5) gives this build error:
</snip>
clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD screen.c -o gobjx86-64/screen.o
screen.c:2513:5: error: expected expression
    int found_null = FALSE;
    ^
screen.c:2517:6: error: use of undeclared identifier 'found_null'
            found_null = TRUE;
            ^
screen.c:2521:52: error: use of undeclared identifier 'found_null'; did you mean 'func_call'?
            || (enc_utf8 && (new_ScreenLinesUC == NULL || found_null))
                                                          ^~~~~~~~~~
                                                          func_call
proto/userfunc.pro:35:5: note: 'func_call' declared here
int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv);
    ^
screen.c:2521:52: warning: address of function 'func_call' will always evaluate to 'true' [-Wpointer-bool-conversion]
            || (enc_utf8 && (new_ScreenLinesUC == NULL || found_null))
                                                       ~~ ^~~~~~~~~~
screen.c:2521:52: note: prefix with the address-of operator to silence this warning
            || (enc_utf8 && (new_ScreenLinesUC == NULL || found_null))
                                                          ^
                                                          &
1 warning and 3 errors generated.
make: *** [Make_cyg_ming.mak:1204: gobjx86-64/screen.o] Error 1
</snip>


The attached patch tries to fix it.
Cheers
John

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/4a390bf7-605d-ccd7-9099-8703a86995c4%40internode.on.net.
--- screen.c.orig       2022-11-29 05:57:29.576345800 +1100
+++ screen.c    2022-11-29 06:01:48.438552200 +1100
@@ -2383,6 +2383,7 @@
     static int     entered = FALSE;            // avoid recursiveness
     static int     done_outofmem_msg = FALSE;  // did outofmem message
     int                    retry_count = 0;
+    int                    found_null;
 
 retry:
     /*
@@ -2510,7 +2511,7 @@
 
 give_up:
 
-    int found_null = FALSE;
+    found_null = FALSE;
     for (int i = 0; i < p_mco; ++i)
        if (new_ScreenLinesC[i] == NULL)
        {

Raspunde prin e-mail lui