John Marriott wrote:

> >> I just moved up to mingw64 with gcc 12.1.0 on my windows 8.1 x64 box.
> >>
> >> I now have two warnings. The first:
> >> <snip>
> >> gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
> >> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
> >> -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return
> >> -fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD ui.c -o gobjnative/ui.o
> >> In file included from ui.c:18:
> >> In function 'read_from_input_buf',
> >>       inlined from 'inchar_loop' at ui.c:396:12:
> >> vim.h:1776:37: warning: 'memmove' offset [-2147483647, -1] is out of the
> >> bounds [0, 256] of object 'inbuf' with type 'char_u[256]' {aka 'unsigned
> >> char[256]'} [-Warray-bounds]
> >>    1776 | # define mch_memmove(to, from, len) memmove((char*)(to),
> >> (char*)(from), (size_t)(len))
> >>         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> vim.h:1776:37: note: in definition of macro 'mch_memmove'
> >>    1776 | # define mch_memmove(to, from, len) memmove((char*)(to),
> >> (char*)(from), (size_t)(len))
> >>         |                                     ^~~~~~~
> >> ui.c: In function 'inchar_loop':
> >> ui.c:750:17: note: 'inbuf' declared here
> >>     750 | static char_u   inbuf[INBUFLEN + MAX_KEY_CODE_LEN];
> >>         |                 ^~~~~
> >> </snip>
> > No idea what's wrong here, probably nothing.
>
> The attached patch shuts gcc 12.1 up.

Thanks!

-- 
"When I die, I want a tombstone that says "GAME OVER" - Ton Richters

 /// Bram Moolenaar -- b...@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    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220610135537.508871C1809%40moolenaar.net.

Raspunde prin e-mail lui