Hi all,

After this patch, mingw64 throws this warning if FEAT_TEXT_PROP is not defined: gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return ex_cmds.c -o gobjnative/ex_cmds.o
ex_cmds.c: In function 'do_sub':
ex_cmds.c:3859:14: warning: unused variable 'total_added' [-Wunused-variable]
 3859 |      colnr_T total_added =  0;
      |              ^~~~~~~~~~~

Please check the attached patch which tries to correct 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/ce518fc1-a74b-a39b-4043-7a1d3b1652db%40internode.on.net.
--- ex_cmds.c.orig      2019-10-26 07:17:43.768319300 +1100
+++ ex_cmds.c   2019-10-26 09:16:55.152100900 +1100
@@ -3856,7 +3856,6 @@
            colnr_T     matchcol;
            colnr_T     prev_matchcol = MAXCOL;
            char_u      *new_end, *new_start = NULL;
-           colnr_T     total_added =  0;
            unsigned    new_start_len = 0;
            char_u      *p1;
            int         did_sub = FALSE;
@@ -3867,6 +3866,7 @@
            int         skip_match = FALSE;
            linenr_T    sub_firstlnum;  /* nr of first sub line */
 #ifdef FEAT_TEXT_PROP
+           colnr_T     total_added =  0;
            int         apc_flags = APC_SAVE_FOR_UNDO | APC_SUBSTITUTE;
 #endif
 

Raspunde prin e-mail lui