To: vim_dev@googlegroups.com Subject: Patch 8.2.4244 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4244 Problem: MS-Windows: warning from MSVC on debug build. Solution: Adjust "/opt"o options. Remove unused variables. Make variables uppercase for consistency. (Ken Takata, closes #9647) Files: src/Make_mvc.mak *** ../vim-8.2.4243/src/Make_mvc.mak 2022-01-26 16:20:18.067215753 +0000 --- src/Make_mvc.mak 2022-01-28 18:50:46.488490228 +0000 *************** *** 252,258 **** MAKEFLAGS_GVIMEXT = DEBUG=yes !endif ! link = link # Check VC version. !if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul] --- 252,258 ---- MAKEFLAGS_GVIMEXT = DEBUG=yes !endif ! LINK = link # Check VC version. !if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul] *************** *** 1260,1284 **** # CFLAGS with /Fo$(OUTDIR)/ CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/ - # Add /opt:ref to remove unreferenced functions and data even when /DEBUG is - # added. - conflags = /nologo /opt:ref - PATHDEF_SRC = $(OUTDIR)\pathdef.c ! !IF "$(MAP)" == "yes" ! # "/map" is for debugging ! conflags = $(conflags) /map ! !ELSEIF "$(MAP)" == "lines" ! # "/mapinfo:lines" is for debugging, only works for VC6 and later ! conflags = $(conflags) /map /mapinfo:lines ! !ENDIF ! ! LINKARGS1 = $(linkdebug) $(conflags) LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) \ $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \ $(TCL_LIB) $(SOUND_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(SOD_LIB) $(LINK_PDB) # Enable link time code generation if needed. !ifdef NODEBUG ! if "$(OPTIMIZE)" != "SPACE" --- 1260,1288 ---- # CFLAGS with /Fo$(OUTDIR)/ CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/ PATHDEF_SRC = $(OUTDIR)\pathdef.c ! LINKARGS1 = /nologo LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) \ $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \ $(TCL_LIB) $(SOUND_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(SOD_LIB) $(LINK_PDB) + !ifdef NODEBUG + # Add /opt:ref to remove unreferenced functions and data even when /DEBUG is + # added. + LINKARGS1 = $(LINKARGS1) /opt:ref + !else + LINKARGS1 = $(LINKARGS1) /opt:noref /opt:noicf + !endif + + !if "$(MAP)" == "yes" + # "/map" is for debugging + LINKARGS1 = $(LINKARGS1) /map + !elseif "$(MAP)" == "lines" + # "/mapinfo:lines" is for debugging, only works for VC6 and later + LINKARGS1 = $(LINKARGS1) /map /mapinfo:lines + !endif + # Enable link time code generation if needed. !ifdef NODEBUG ! if "$(OPTIMIZE)" != "SPACE" *************** *** 1317,1323 **** GvimExt/gvimext.dll # To get around the command line limit: Make use of nmake's response files to ! # capture the arguments for $(link) in a file using the @<> $(PATHDEF_SRC) @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC) @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC) ! @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(E_LINKARGS2)"; >> $(PATHDEF_SRC) @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC) @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC) --- 1900,1906 ---- @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC) @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC) @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC) ! @echo char_u *all_lflags = (char_u *)"$(LINK:\=\\) $(LINKARGS1:\=\\) $(E_LINKARGS2)"; >> $(PATHDEF_SRC) @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC) @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC) *** ../vim-8.2.4243/src/version.c 2022-01-28 17:19:59.478972427 +0000 --- src/version.c 2022-01-28 18:50:39.108597933 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4244, /**/ -- SOLDIER: What? A swallow carrying a coconut? ARTHUR: It could grip it by the husk ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///