Hi All,

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>

The second:
<snip>
gcc -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  -c tee.c
ing: return type of 'main' is not 'int' [-Wmain]
   82 | main(int argc, char *argv[])
      | ^~~~
tee.c: In function 'main':
tee.c:86:17: warning: unused variable 'opt' [-Wunused-variable]
   86 |         int     opt;
      |                 ^~~
tee.c:122:24: warning: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  122 |         filepointers = calloc(numfiles, sizeof(FILE *));
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tee.c:33:
d:\users\john\documents\software\mingw\mingw64\x86_64-w64-mingw32\include\malloc.h:57:17: note: in a call to allocation function 'calloc' declared here    57 |   void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
      |                 ^~~~~~
</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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/655faf6b-33cf-2540-27b9-ce0f8ef29715%40internode.on.net.

Raspunde prin e-mail lui