[MPlayer-dev-eng] [patch] fix compilation error in gui/win32/interface.c

Stephen Sheldon sfsheldo at gmail.com
Fri Nov 23 20:45:56 CET 2012


I am getting a compilation error in gui/win32/interface.c.

x86_64-w64-mingw32-gcc -MD -MP -Wundef -Wall -Wno-switch 
-Wno-parentheses -Wpointer-arith -Wredundant-decls -Wstrict-prototypes 
-Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign 
-Wdeclaration-after-statement -std=gnu99 
-Werror-implicit-function-declaration -O4 -march=native -mtune=native 
-pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE 
-Ilibdvdread4 -I. -Iffmpeg -I/mingw64/include -fno-common -DPIC  
-I/mingw64/include/freetype2 -I/mingw64/include -I/mingw64/include   
-Wno-strict-prototypes -c -o gui/win32/interface.o gui/win32/interface.c
In file included from gui/win32/interface.c:27:0:
/mingw64/include/cdio/cdda.h:178:5: warning: "TESTING_IS_FINISHED" is 
not defined
In file included from ./libmpdemux/stheader.h:23:0,
                  from ./gui/interface.h:24,
                  from gui/win32/interface.c:46:
./libmpdemux/aviheader.h:132:0: warning: "FOURCC_RIFF" redefined
/usr/x86_64-w64-mingw32/sys-root/mingw/include/mmsystem.h:1726:0: note: 
this is the location of the previous definition
./libmpdemux/aviheader.h:133:0: warning: "FOURCC_LIST" redefined
/usr/x86_64-w64-mingw32/sys-root/mingw/include/mmsystem.h:1727:0: note: 
this is the location of the previous definition
gui/win32/interface.c: In function 'guiInit':
gui/win32/interface.c:530:17: warning: assignment makes pointer from 
integer without a cast
gui/win32/interface.c: In function 'gui':
gui/win32/interface.c:693:31: warning: cast from pointer to integer of 
different size
gui/win32/interface.c:717:54: warning: cast from pointer to integer of 
different size
gui/win32/interface.c:719:20: warning: cast from pointer to integer of 
different size
gui/win32/interface.c: At top level:
gui/win32/interface.c:820:12: error: static declaration of 
'add_to_gui_playlist' follows non-static declaration
./gui/interface.h:153:5: note: previous declaration of 
'add_to_gui_playlist' was here
Makefile:747: recipe for target `gui/win32/interface.o' failed
make: *** [gui/win32/interface.o] Error 1

The following fixes it for me.

Index: gui/win32/interface.c
===================================================================
--- gui/win32/interface.c       (revision 35463)
+++ gui/win32/interface.c       (working copy)
@@ -817,7 +817,7 @@
  }

  /* This function adds/inserts one file into the gui playlist */
-static int add_to_gui_playlist(const char *what, int how)
+int add_to_gui_playlist(const char *what, int how)
  {
      char filename[MAX_PATH];
      char *filepart = filename;




More information about the MPlayer-dev-eng mailing list