[ruby-cvs:69420] k0kubun:r62239 (trunk): mjit.c: fix MinGW warning by r62221

k0kubun at ruby-lang.org k0kubun at ruby-lang.org
Tue Feb 6 02:00:43 JST 2018


k0kubun	2018-02-06 02:00:43 +0900 (Tue, 06 Feb 2018)

  New Revision: 62239

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62239

  Log:
    mjit.c: fix MinGW warning by r62221
    
    mjit.c: In function 'worker':
    mjit.c:126:64: warning: passing argument 1 of '_InterlockedExchangePointer' from incompatible pointer type [-Wincompatible-pointer-types]
     #  define MJIT_ATOMIC_SET(var, val) InterlockedExchangePointer(&(var), val)
                                                                    ^
    mjit.c:828:17: note: in expansion of macro 'MJIT_ATOMIC_SET'
                     MJIT_ATOMIC_SET(node->unit->iseq->body->jit_func, func);
                     ^
    In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:27:0,
                     from C:/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
                     from C:/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:8,
                     from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69,
                     from C:/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23,
                     from ./include/ruby/win32.h:41,
                     from ./include/ruby/defines.h:250,
                     from ./include/ruby/ruby.h:29,
                     from ./include/ruby.h:33,
                     from internal.h:15,
                     from mjit.c:76:
    C:/msys64/mingw64/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:1420:7: note: expected 'void * volatile*' but argument is of type 'VALUE (**)(struct rb_execution_context_struct *, struct rb_control_frame_struct *) {aka long long unsigned int (**)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)}'
     void *_InterlockedExchangePointer(void *volatile *Target,void *Value) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~

  Modified files:
    trunk/mjit.c


More information about the ruby-cvs mailing list