[Groonga-commit] groonga/groonga at 5c4325a [master] windows: remove needless cast

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Wed May 11 10:29:00 JST 2016


Kouhei Sutou	2016-05-11 10:29:00 +0900 (Wed, 11 May 2016)

  New Revision: 5c4325ae9792cba6c4c684bcbcfbc173d3a856c8
  https://github.com/groonga/groonga/commit/5c4325ae9792cba6c4c684bcbcfbc173d3a856c8

  Message:
    windows: remove needless cast
    
    It causes build error on C++:
    
        C:\projects\groonga\lib\dat.cpp(133): error C2665: '_InterlockedExchangeAdd' : none of the 4 overloads could convert all the argument types [C:\projects\groonga\lib\libgroonga.vcxproj]
                  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8964): could be 'unsigned __int64 _InterlockedExchangeAdd(volatile unsigned __int64 *,unsigned __int64)'
                  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8942): or       'unsigned long _InterlockedExchangeAdd(volatile unsigned long *,unsigned long)'
                  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8922): or       'unsigned int _InterlockedExchangeAdd(volatile unsigned int *,unsigned int)'
                  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(5227): or       'LONG _InterlockedExchangeAdd(volatile LONG *,LONG)'
                  while trying to match the argument list '(int32_t *, int32_t)'
        C:\projects\groonga\lib\dat.cpp(1167): error C2665: '_InterlockedExchangeAdd' : none of the 4 overloads could convert all the argument types [C:\projects\groonga\lib\libgroonga.vcxproj]
                  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8964): could be 'unsigned __int64 _InterlockedExchangeAdd(volatile unsigned __int64 *,unsigned __int64)'
                  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8942): or       'unsigned long _InterlockedExchangeAdd(volatile unsigned long *,unsigned long)'
                  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8922): or       'unsigned int _InterlockedExchangeAdd(volatile unsigned int *,unsigned int)'
                  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(5227): or       'LONG _InterlockedExchangeAdd(volatile LONG *,LONG)'
                  while trying to match the argument list '(int32_t *, int32_t)'

  Modified files:
    lib/grn.h

  Modified: lib/grn.h (+1 -1)
===================================================================
--- lib/grn.h    2016-05-11 10:23:33 +0900 (a305e8f)
+++ lib/grn.h    2016-05-11 10:29:00 +0900 (39990aa)
@@ -543,7 +543,7 @@ typedef int grn_cond;
 #elif (defined(WIN32) || defined (_WIN64)) /* __GNUC__ */
 
 # define GRN_ATOMIC_ADD_EX(p,i,r) \
-  ((r) = (uint32_t)InterlockedExchangeAdd((int32_t *)(p), (int32_t)(i)))
+  ((r) = InterlockedExchangeAdd((p), (i)))
 # if defined(_WIN64) /* ATOMIC 64BIT SET */
 #  define GRN_SET_64BIT(p,v) \
   (*(p) = (v))
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る