Hi All,

Compiling 8.1.22 with the new gcc 8.1 (mingw64) removes the warnings about signed overflow that have been around since gcc 7.1.

But it's not all good news, I have a few new warnings. This one in vim proper:
<snip>
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_MBYTE -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -s memline.c -o objnative/memline.o
In file included from memline.c:45:
memline.c: In function 'ml_open':
vim.h:1577:29: warning: 'strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
 #define STRNCPY(d, s, n)    strncpy((char *)(d), (char *)(s), (size_t)(n))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim.h:1577:29: note: in definition of macro 'STRNCPY'
 #define STRNCPY(d, s, n)    strncpy((char *)(d), (char *)(s), (size_t)(n))
                             ^~~~~~~
</snip>

...and these in dosinst and uninstal:

<snip>
gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_MBYTE -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -s -o install.exe dosinst.c -lkernel32 -luser32 -lgdi32 -ladvap
i32 -lcomdlg32 -lcomctl32 -lversion -lole32 -luuid
gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_MBYTE -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -s -o uninstal.exe uninstal.c -lkernel32 -luser32 -lgdi32 -ladv
api32 -lcomdlg32 -lcomctl32 -lversion
dosinst.c: In function 'install_vimfilesdir':
dosinst.c:2132:31: warning: '\vimfiles' directive writing 9 bytes into a region of size between 1 and 512 [-Wformat-overflow=]
     sprintf(vimfiles_path, "%s\\vimfiles", vimdir_path);
^~~~~~~~~~
dosinst.c:2132:5: note: 'sprintf' output between 10 and 521 bytes into a destination of size 512
     sprintf(vimfiles_path, "%s\\vimfiles", vimdir_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c:2138:30: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
  sprintf(tmp_dirname, "%s\\%s", vimfiles_path, vimfiles_subdirs[i]);
^
dosinst.c:2138:2: note: 'sprintf' output 2 or more bytes (assuming 513) into a destination of size 512
  sprintf(tmp_dirname, "%s\\%s", vimfiles_path, vimfiles_subdirs[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
uninstal.c: In function 'main':
uninstal.c:366:27: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
      sprintf(icon, "%s\\%s", path, icon_link_names[i]);
^
uninstal.c:366:6: note: 'sprintf' output 2 or more bytes (assuming 513) into a destination of size 512
      sprintf(icon, "%s\\%s", path, icon_link_names[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c: In function 'uninstall_check':
dosinst.c:556:23: warning: '"' directive writing 1 byte into a region of size between 0 and 511 [-Wformat-overflow=]
     sprintf(buf, "\"%s\"", temp_string_buffer);
^~
dosinst.c:556:5: note: 'sprintf' output between 3 and 514 bytes into a destination of size 512
     sprintf(buf, "\"%s\"", temp_string_buffer);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dosinst.c:20:
dosinst.h:413:29: warning: '%s' directive writing up to 511 bytes into a region of size 503 [-Wformat-overflow=]
  sprintf(cmd_buf, "start /w %s", cmd);
^~
dosinst.h:413:2: note: 'sprintf' output between 10 and 521 bytes into a destination of size 512
  sprintf(cmd_buf, "start /w %s", cmd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.h:407:49: warning: '%s' directive writing up to 511 bytes into a region of size 487 [-Wformat-overflow=]
  sprintf(cmd_buf, "%s /c start \"vimcmd\" /wait %s", cmd_path, cmd);
^~
dosinst.h:407:2: note: 'sprintf' output 26 or more bytes (assuming 537) into a destination of size 512
  sprintf(cmd_buf, "%s /c start \"vimcmd\" /wait %s", cmd_path, cmd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c: In function 'install_registry':
dosinst.c:1526:30: warning: '\gvim.exe' directive writing 9 bytes into a region of size between 1 and 512 [-Wformat-overflow=
]
     sprintf(vim_exe_path, "%s\\gvim.exe", installdir);
^~~~~~~~~~
dosinst.c:1526:5: note: 'sprintf' output between 10 and 521 bytes into a destination of size 512
     sprintf(vim_exe_path, "%s\\gvim.exe", installdir);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c:1543:17: warning: '\GvimExt64\gvimext.dll' directive writing 22 bytes into a region of size between 1 and 512 [-Wfo
rmat-overflow=]
   sprintf(bufg, "%s\\" GVIMEXT64_PATH, installdir);
^~~~~~
dosinst.c:1543:20: note: format string is defined here
   sprintf(bufg, "%s\\" GVIMEXT64_PATH, installdir);
^
dosinst.c:1543:3: note: 'sprintf' output between 23 and 534 bytes into a destination of size 512
   sprintf(bufg, "%s\\" GVIMEXT64_PATH, installdir);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c:1538:17: warning: '\GvimExt32\gvimext.dll' directive writing 22 bytes into a region of size between 1 and 512 [-Wfo
rmat-overflow=]
   sprintf(bufg, "%s\\" GVIMEXT32_PATH, installdir);
^~~~~~
dosinst.c:1538:20: note: format string is defined here
   sprintf(bufg, "%s\\" GVIMEXT32_PATH, installdir);
^
dosinst.c:1538:3: note: 'sprintf' output between 23 and 534 bytes into a destination of size 512
   sprintf(bufg, "%s\\" GVIMEXT32_PATH, installdir);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c:1462:27: warning: '" "' directive writing 3 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
     sprintf(exe_cmd, "\"%s\" \"%%1\"", exe_path);
^~~~~
dosinst.c:1462:5: note: 'sprintf' output between 8 and 519 bytes into a destination of size 512
     sprintf(exe_cmd, "\"%s\" \"%%1\"", exe_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c:1588:31: warning: '\uninstall-gui.exe' directive writing 18 bytes into a region of size between 1 and 512 [-Wformat
-overflow=]
  sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir);
^~~~~~~~~~~~~~~~~~~
dosinst.c:1588:2: note: 'sprintf' output between 19 and 530 bytes into a destination of size 512
  sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c:1583:31: warning: '\uninstal.exe' directive writing 13 bytes into a region of size between 1 and 512 [-Wformat-over
flow=]
  sprintf(uninstall_string, "%s\\uninstal.exe", installdir);
^~~~~~~~~~~~~~
dosinst.c:1583:2: note: 'sprintf' output between 14 and 525 bytes into a destination of size 512
  sprintf(uninstall_string, "%s\\uninstal.exe", installdir);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c: In function 'build_shortcut':
dosinst.c:1799:37: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
     sprintf(executable_path, "%s\\%s", installdir, exename);
^
dosinst.c:1799:5: note: 'sprintf' output 2 or more bytes (assuming 513) into a destination of size 512
     sprintf(executable_path, "%s\\%s", installdir, exename);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c:1783:31: warning: '.lnk' directive writing 4 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
     sprintf(link_path, "%s\\%s.lnk", shell_folder_path, link_name);
^~~~
dosinst.c:1783:5: note: 'sprintf' output 6 or more bytes (assuming 517) into a destination of size 512
     sprintf(link_path, "%s\\%s.lnk", shell_folder_path, link_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dosinst.c: In function 'main':
dosinst.c:207:21: warning: '\filetype.vim' directive writing 13 bytes into a region of size between 1 and 512 [-Wformat-overf
low=]
     sprintf(buf, "%s\\filetype.vim", installdir);
^~~~~~~~~~~~~~
dosinst.c:207:5: note: 'sprintf' output between 14 and 525 bytes into a destination of size 512
     sprintf(buf, "%s\\filetype.vim", installdir);
</snip>

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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui