On 17-Feb-2016 6:12 AM, Bram Moolenaar wrote:
Patch 7.4.1339
Problem:    Warnings when building the GUI with MingW. (Cesar Romani)
Solution:   Add type cats. (Yasuhiro Matsumoto)
Files:      src/edit.c, src/gui_w32.c, src/gui_w48.c, src/os_mswin.c,
             src/os_win32.c



I get an error after this patch (on Mingw64):
...
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DMS_WIN64 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -pipe -march=x86-64 -Wall -O3 -fomit-frame-pointer -freg-struct-return -s os_mswin.c -o gobjx86-64/os_mswin.o
os_win32.c:357:2: error: #endif without #if
 #endif
  ^
Make_cyg_ming.mak:848: recipe for target 'gobjx86-64/os_win32.o' failed
make: *** [gobjx86-64/os_win32.o] Error 1
make: *** Waiting for unfinished jobs....

Also, there are still more warnings:
...
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DMS_WIN64 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -pipe -march=x86-64 -Wall -O3 -fomit-frame-pointer -freg-struct-return -s gui_w32.c -o gobjx86-64/gui_w32.o
gui_w32.c: In function 'gui_mch_set_rendering_options':
gui_w32.c:98:29: warning: pointer targets in passing argument 1 of 'atof' differ in signedness [-Wpointer-sign]
      dx_gamma = (float)atof(value);
                             ^
In file included from os_win32.h:92:0,
                 from vim.h:316,
                 from gui_w32.c:26:
C:/Programs/MinGW64/x86_64-w64-mingw32/include/stdlib.h:343:18: note: expected 'const char *' but argument is of type 'char_u * {aka unsigned char *}'
   double __cdecl atof(const char *_String);
                  ^
gui_w32.c:103:32: warning: pointer targets in passing argument 1 of 'atof' differ in signedness [-Wpointer-sign]
      dx_contrast = (float)atof(value);
                                ^
In file included from os_win32.h:92:0,
                 from vim.h:316,
                 from gui_w32.c:26:
C:/Programs/MinGW64/x86_64-w64-mingw32/include/stdlib.h:343:18: note: expected 'const char *' but argument is of type 'char_u * {aka unsigned char *}'
   double __cdecl atof(const char *_String);
                  ^
gui_w32.c:108:29: warning: pointer targets in passing argument 1 of 'atof' differ in signedness [-Wpointer-sign]
      dx_level = (float)atof(value);
                             ^
In file included from os_win32.h:92:0,
                 from vim.h:316,
                 from gui_w32.c:26:
C:/Programs/MinGW64/x86_64-w64-mingw32/include/stdlib.h:343:18: note: expected 'const char *' but argument is of type 'char_u * {aka unsigned char *}'
   double __cdecl atof(const char *_String);
                  ^
gui_w32.c:113:21: warning: pointer targets in passing argument 1 of 'atoi' differ in signedness [-Wpointer-sign]
      dx_geom = atoi(value);
                     ^
In file included from os_win32.h:92:0,
                 from vim.h:316,
                 from gui_w32.c:26:
C:/Programs/MinGW64/x86_64-w64-mingw32/include/stdlib.h:346:15: note: expected 'const char *' but argument is of type 'char_u * {aka unsigned char *}'
   int __cdecl atoi(const char *_Str);
               ^
gui_w32.c:120:24: warning: pointer targets in passing argument 1 of 'atoi' differ in signedness [-Wpointer-sign]
      dx_renmode = atoi(value);
                        ^
In file included from os_win32.h:92:0,
                 from vim.h:316,
                 from gui_w32.c:26:
C:/Programs/MinGW64/x86_64-w64-mingw32/include/stdlib.h:346:15: note: expected 'const char *' but argument is of type 'char_u * {aka unsigned char *}'
   int __cdecl atoi(const char *_Str);
               ^
gui_w32.c:127:24: warning: pointer targets in passing argument 1 of 'atoi' differ in signedness [-Wpointer-sign]
      dx_taamode = atoi(value);
                        ^
In file included from os_win32.h:92:0,
                 from vim.h:316,
                 from gui_w32.c:26:
C:/Programs/MinGW64/x86_64-w64-mingw32/include/stdlib.h:346:15: note: expected 'const char *' but argument is of type 'char_u * {aka unsigned char *}'
   int __cdecl atoi(const char *_Str);
               ^
gui_w32.c:60:13: warning: unused variable 'retval' [-Wunused-variable]
     int     retval = FAIL;
             ^
In file included from gui_w32.c:188:0:
gui_w48.c: In function 'add_tabline_popup_menu_entry':
gui_w48.c:2445:18: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
  info.dwTypeData = item_text;
                  ^
gui_w32.c: In function 'gui_mch_init':
gui_w32.c:1773:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 #   define HandleToLong(h) ((long)(h))
                             ^
gui_w32.c:1777:33: note: in expansion of macro 'HandleToLong'
     set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd));
                                 ^

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

Raspunde prin e-mail lui