On Sat, Oct 26, 2019 at 12:18 AM John Marriott
<[email protected]> wrote:
>
> 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

I see the same warning on Linux gcc but only when building with Tiny
or Small features, as follows:

linux-2iyu:~/.build/vim/vim-hg/src/shadow-tiny # (make || echo 'exit
status' $? ; date) 2>&1 |tee -a make.log
gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -fno-strength-reduce -Wall
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        -o objects/ex_cmds.o
ex_cmds.c
ex_cmds.c: In function ‘do_sub’:
ex_cmds.c:3859:14: warning: unused variable ‘total_added’ [-Wunused-variable]
      colnr_T total_added =  0;
              ^~~~~~~~~~~
gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -fno-strength-reduce -Wall
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        -o objects/textprop.o
textprop.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -fno-strength-reduce -Wall
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        version.c -o
objects/version.o
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
  gcc   -L/usr/local/lib -Wl,--as-needed        -o vi objects/arabic.o
objects/arglist.o objects/autocmd.o objects/beval.o objects/buffer.o
objects/change.o objects/blob.o objects/blowfish.o objects/cindent.o
objects/cmdexpand.o objects/cmdhist.o objects/crypt.o
objects/crypt_zip.o objects/debugger.o objects/dict.o objects/diff.o
objects/digraph.o objects/drawline.o objects/drawscreen.o
objects/edit.o objects/eval.o objects/evalbuffer.o objects/evalfunc.o
objects/evalvars.o objects/evalwindow.o objects/ex_cmds.o
objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o
objects/ex_getln.o objects/fileio.o objects/filepath.o
objects/findfile.o objects/fold.o objects/getchar.o objects/hardcopy.o
objects/hashtab.o objects/highlight.o  objects/if_cscope.o
objects/if_xcmdsrv.o objects/indent.o objects/insexpand.o
objects/list.o objects/map.o objects/mark.o objects/memline.o
objects/menu.o objects/misc1.o objects/misc2.o objects/mouse.o
objects/move.o objects/mbyte.o objects/normal.o objects/ops.o
objects/option.o objects/optionstr.o objects/os_unix.o
objects/pathdef.o objects/popupmenu.o objects/popupwin.o
objects/profiler.o objects/pty.o objects/quickfix.o objects/regexp.o
objects/register.o objects/scriptfile.o objects/screen.o
objects/search.o objects/session.o objects/sha256.o objects/sign.o
objects/sound.o objects/spell.o objects/spellfile.o
objects/spellsuggest.o objects/syntax.o objects/tag.o objects/term.o
objects/terminal.o objects/testing.o objects/textprop.o objects/ui.o
objects/undo.o objects/usercmd.o objects/userfunc.o objects/version.o
objects/viminfo.o objects/window.o objects/bufwrite.o
objects/xdiffi.o objects/xemit.o objects/xprepare.o objects/xutils.o
objects/xhistogram.o objects/xpatience.o  objects/charset.o
objects/json.o objects/main.o objects/memfile.o objects/message.o
-lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lelf
-lgpm -ldl
link.sh: Linked fine
Sat 26 Oct 00:20:29 CEST 2019
linux-2iyu:~/.build/vim/vim-hg/src/shadow-tiny #

-- 
-- 
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/CAJkCKXverLEYwcbm9e%2BNmSbOQg7xkOiTfzw842UA5KV4SC0N2Q%40mail.gmail.com.

Raspunde prin e-mail lui