{"push_id":1422729721,"size":4,"distinct_size":4,"ref":"refs/heads/fix-c-compiler-warnings-on-mingw","head":"d2e2fac765c482688d91f817e164aab1bc318d28","before":"205894721f5e648eb52ccb9670394c3c80253a86","commits":[{"sha":"0657fd8193dd3ef7d0c84b9cf7f56fe9440e045a","author":{"name":"Gabriel Scherer","email":"a3945f45cfbfa37d2c6e8548d8a3f60ffaaa95a0@gmail.com"},"message":"Revert \"Improve handling of platforms that do not have gprof profiling support (#933)\"\n\nThis reverts commit 8adfe15f182b9bfced844746bb0e8596dbf41d12.\n\nThis is a temporary revert caused by Continuous Integration\nfailure. We'll investigate the issue and merge again when it is fixed.","distinct":true,"url":"https://api.github.com/repos/shindere/ocaml/commits/0657fd8193dd3ef7d0c84b9cf7f56fe9440e045a"},{"sha":"54e6aecd773d9c01afa45e5717de84426897e177","author":{"name":"Sébastien Hinderer","email":"f1fd98374aa9aa3d8579146024b452410fb0ce1d@inria.fr"},"message":"Improve handling of platforms that do not have gprof profiling support (#933)\n\nThis commit modifies these two behaviours:\r\n\r\n1. ``make install'' installs libraries with profiling support only when\r\nthis makes sense.\r\n\r\n2. On platforms that do not support profiling with gprof, the -p option of\r\nocamlopt produces an error message.\r\nOn such platforms, ``make install'' was installing dummy profiling\r\nlibraries and ocamlopt's -p option was silently ignored.\r\n\r\nIn addition, this commit modifies the values of the PROFILING make\r\nvariable. Before the commit it was either prof or noprof. After the\r\ncommit it is either true or false.\r\n\r\nIn the asmrun directory, the call to ranlib for libasmrunp.a has also been\r\nremoved from the install target because this command is already invoked\r\nin the rule that builds libasmrunp.a.\r\n\r\nocamlc/ocamlopt -config now prints the state of profiling support","distinct":true,"url":"https://api.github.com/repos/shindere/ocaml/commits/54e6aecd773d9c01afa45e5717de84426897e177"},{"sha":"3caf25d4da744e2d474d768d2619bc8aecc97c69","author":{"name":"Sébastien Hinderer","email":"f1fd98374aa9aa3d8579146024b452410fb0ce1d@inria.fr"},"message":"Fix asmrun/Makefile\n\nranlib was called on the dummy profiling library libasmrunp.a instead\nof being called on libasmrun_pic.a.\n\nBefore PR#933 was merged this did not cause any error because\nlibasmrunp.a was always provided, but now that PR#933 has been merged\nthis wrong call fails on platforms that do not have gprof profiling\nsupport.","distinct":true,"url":"https://api.github.com/repos/shindere/ocaml/commits/3caf25d4da744e2d474d768d2619bc8aecc97c69"},{"sha":"d2e2fac765c482688d91f817e164aab1bc318d28","author":{"name":"Sébastien Hinderer","email":"f1fd98374aa9aa3d8579146024b452410fb0ce1d@inria.fr"},"message":"Fix a couple of warnings in C code.\n\nThis commit fixes the list of warnings below.\nThey have been obtained while compiling the MinGW port with gcc version\n4.9.2.\n\nGiven that the code now compiles without any warning, this commit also turns\nC compiler warnings into errors for the MinGW port.\n\nA few remarks are due:\n\n1. Several warnings are about the _WIN32_WINNT macro. This commit gets\nrid of those warnings by #undef-ing the macro in those files that define\nit anyway.\n\n2. In win32graph, the function caml_gr_show_bitmap which causes a\nwarning has been removed, because this code is not called by any other\nfunction. The unused functions AfficheBitmap, DessinerBitmap and\nChargerBitmap all defined in in dib.c have also been removed.\n\n3. The warnings about variables that might be used without having been\npreviously initialised occur because the C compiler does not realise\nthat unix_error never returns. So, fixing this warning does not require\nany modification of the source files where it occurs. It rather requires\nto declare that unix_error does not return on Windows, as is actually\nalready done on Unix.\n\nList of fixed warnings :\n\nasmrun/clambda_checks.c:\nclambda_checks.c: In function ‘caml_check_field_access’:\nclambda_checks.c:62:7: warning: unknown conversion type character ‘l’ in format [-Wformat=]\n       (ARCH_UINT64_TYPE) Long_val(pos), descr);\n       ^\nclambda_checks.c:62:7: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]\nclambda_checks.c:62:7: warning: too many arguments for format [-Wformat-extra-args]\nclambda_checks.c:68:7: warning: unknown conversion type character ‘l’ in format [-Wformat=]\n       (ARCH_UINT64_TYPE) Long_val(pos), (void*) v, descr);\n       ^\nclambda_checks.c:68:7: warning: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]\nclambda_checks.c:68:7: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘void *’ [-Wformat=]\nclambda_checks.c:68:7: warning: too many arguments for format [-Wformat-extra-args]\nclambda_checks.c:82:7: warning: unknown conversion type character ‘l’ in format [-Wformat=]\n       descr);\n       ^\nclambda_checks.c:82:7: warning: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]\nclambda_checks.c:82:7: warning: unknown conversion type character ‘l’ in format [-Wformat=]\nclambda_checks.c:82:7: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘void *’ [-Wformat=]\nclambda_checks.c:82:7: warning: too many arguments for format [-Wformat-extra-args]\notherlibs/win32unix/createprocess.c:\ncreateprocess.c: In function ‘win_create_process_native’:\ncreateprocess.c:66:5: warning: implicit declaration of function ‘caml_stat_free’ [-Wimplicit-function-declaration]\n     caml_stat_free(exefile);\n     ^\notherlibs/win32unix/select.c:\nIn file included from select.c:21:0:\nwinworker.h:19:0: warning: \"_WIN32_WINNT\" redefined\n #define _WIN32_WINNT 0x0400\n ^\nIn file included from /usr/i686-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0,\n                 from /usr/i686-w64-mingw32/sys-root/mingw/include/stdint.h:28,\n                 from /usr/lib/gcc/i686-w64-mingw32/4.9.2/include/stdint.h:9,\n                 from ../../byterun/caml/config.h:34,\n                 from ../../byterun/caml/mlvalues.h:22,\n                 from select.c:16:\n/usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:225:0: note: this is the location of the previous definition\n #define _WIN32_WINNT 0x502\n ^\nselect.c: In function ‘find_handle’:\nselect.c:906:3: warning: enumeration value ‘SELECT_MODE_NONE’ not handled in switch [-Wswitch]\n   switch( iterResult->EMode )\n   ^\nselect.c: In function ‘unix_select’:\nselect.c:1267:19: warning: enumeration value ‘SELECT_MODE_NONE’ not handled in switch [-Wswitch]\n                   switch (iterResult->EMode)\n                   ^\notherlibs/win32unix/sockopt.c:\nsockopt.c: In function ‘unix_setsockopt_aux’:\nsockopt.c:200:7: warning: ‘optsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n   if (setsockopt(Socket_val(socket), level, option,\n       ^\notherlibs/win32unix/startup.cstartup.c:\nIn file included from startup.c:20:0:\nwinworker.h:19:0: warning: \"_WIN32_WINNT\" redefined\n #define _WIN32_WINNT 0x0400\n ^\nIn file included from /usr/i686-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0,\n                 from /usr/i686-w64-mingw32/sys-root/mingw/include/stdio.h:9,\n                 from startup.c:16:\n/usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:225:0: note: this is the location of the previous definition\n #define _WIN32_WINNT 0x502\n ^\notherlibs/win32unix/winworker.c\nIn file included from winworker.c:20:0:\nwinworker.h:19:0: warning: \"_WIN32_WINNT\" redefined\n #define _WIN32_WINNT 0x0400\n ^\nIn file included from /usr/i686-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0,\n                 from /usr/i686-w64-mingw32/sys-root/mingw/include/stdint.h:28,\n                 from /usr/lib/gcc/i686-w64-mingw32/4.9.2/include/stdint.h:9,\n                 from ../../byterun/caml/config.h:34,\n                 from ../../byterun/caml/mlvalues.h:22,\n                 from winworker.c:16:\n/usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:225:0: note: this is the location of the previous definition\n #define _WIN32_WINNT 0x502\n ^\notherlibs/unix/access.c:\naccess.c:36:0: warning: \"X_OK\" redefined\n #  define X_OK    4/* test for execute permission - not implemented in Win32 */\n ^\nIn file included from /usr/i686-w64-mingw32/sys-root/mingw/include/direct.h:10:0,\n                 from unixsupport.h:23,\n                 from access.c:20:\n/usr/i686-w64-mingw32/sys-root/mingw/include/io.h:174:0: note: this is the location of the previous definition\n #define X_OK 1 /* Check for execute permission. */\n ^\notherlibs/unix/socketaddr.c:\nsocketaddr.c: In function ‘alloc_sockaddr’:\nsocketaddr.c:153:3: warning: ‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n   return res;\n   ^\notherlibs/win32graph/open.c:\nopen.c: In function ‘caml_gr_open_graph’:\nopen.c:270:18: warning: pointer targets in passing argument 6 of ‘CreateThread’ differ in signedness [-Wpointer-sign]\n                  &tid);\n                  ^\nIn file included from /usr/i686-w64-mingw32/sys-root/mingw/include/winbase.h:29:0,\n                 from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:70,\n                 from libgraph.h:17,\n                 from open.c:20:\n/usr/i686-w64-mingw32/sys-root/mingw/include/processthreadsapi.h:160:28: note: expected ‘LPDWORD’ but argument is of type ‘long int *’\n   WINBASEAPI HANDLE WINAPI CreateThread (LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);\n                            ^\notherlibs/win32graph/draw.c:\ndraw.c: In function ‘caml_gr_show_bitmap’:\ndraw.c:309:9: warning: implicit declaration of function ‘AfficheBitmap’ [-Wimplicit-function-declaration]\n         AfficheBitmap(filename,grwindow.gcBitmap,x,Wcvt(y));\n         ^\notherlibs/systhreads/st_stubs.c:\nIn file included from st_stubs.c:50:0:\nst_win32.h:18:0: warning: \"_WIN32_WINNT\" redefined\n #define _WIN32_WINNT 0x0400\n ^\nIn file included from /usr/i686-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0,\n                 from /usr/i686-w64-mingw32/sys-root/mingw/include/stdint.h:28,\n                 from /usr/lib/gcc/i686-w64-mingw32/4.9.2/include/stdint.h:9,\n                 from ../../byterun/caml/config.h:34,\n                 from ../../byterun/caml/misc.h:24,\n                 from ../../byterun/caml/alloc.h:23,\n                 from st_stubs.c:18:\n/usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:225:0: note: this is the location of the previous definition\n #define _WIN32_WINNT 0x502\n ^","distinct":true,"url":"https://api.github.com/repos/shindere/ocaml/commits/d2e2fac765c482688d91f817e164aab1bc318d28"}]}
{"actor":{"display_login":"shindere"}}