diff --git a/3rdparty/nvtt/nvcore/defsgnucdarwin.h b/3rdparty/nvtt/nvcore/defsgnucdarwin.h index ef8e04e9..04900cfb 100644 --- a/3rdparty/nvtt/nvcore/defsgnucdarwin.h +++ b/3rdparty/nvtt/nvcore/defsgnucdarwin.h @@ -44,7 +44,7 @@ #define NV_NOINLINE __attribute__((noinline)) // Define __FUNC__ properly. -#if __STDC_VERSION__ < 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 # define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__ # else diff --git a/3rdparty/nvtt/nvcore/defsgnuclinux.h b/3rdparty/nvtt/nvcore/defsgnuclinux.h index 438db8f8..5d2e4b8d 100644 --- a/3rdparty/nvtt/nvcore/defsgnuclinux.h +++ b/3rdparty/nvtt/nvcore/defsgnuclinux.h @@ -50,7 +50,7 @@ #define NV_NOINLINE __attribute__((noinline)) // Define __FUNC__ properly. -#if __STDC_VERSION__ < 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 # define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__ # else diff --git a/3rdparty/nvtt/nvcore/defsgnucwin32.h b/3rdparty/nvtt/nvcore/defsgnucwin32.h index f35ed885..e416d3d4 100644 --- a/3rdparty/nvtt/nvcore/defsgnucwin32.h +++ b/3rdparty/nvtt/nvcore/defsgnucwin32.h @@ -33,7 +33,7 @@ #define NV_NOINLINE __attribute__((noinline)) // Define __FUNC__ properly. -#if __STDC_VERSION__ < 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 # define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__ # else diff --git a/3rdparty/nvtt/nvcore/memory.h b/3rdparty/nvtt/nvcore/memory.h index 8e706a10..b332fab8 100644 --- a/3rdparty/nvtt/nvcore/memory.h +++ b/3rdparty/nvtt/nvcore/memory.h @@ -9,19 +9,19 @@ namespace nv { // C++ helpers. - template NV_FORCEINLINE T * malloc(size_t count) { + template inline T * malloc(size_t count) { return (T *)::malloc(sizeof(T) * count); } - template NV_FORCEINLINE T * realloc(T * ptr, size_t count) { + template inline T * realloc(T * ptr, size_t count) { return (T *)::realloc(ptr, sizeof(T) * count); } - template NV_FORCEINLINE void free(const T * ptr) { + template inline void free(const T * ptr) { ::free((void *)ptr); } - template NV_FORCEINLINE void zero(T & data) { + template inline void zero(T & data) { memset(&data, 0, sizeof(T)); } diff --git a/3rdparty/nvtt/nvcore/nvcore.h b/3rdparty/nvtt/nvcore/nvcore.h index 7a1b7287..689feff4 100644 --- a/3rdparty/nvtt/nvcore/nvcore.h +++ b/3rdparty/nvtt/nvcore/nvcore.h @@ -185,6 +185,7 @@ # pragma GCC diagnostic ignored "-Wunused-but-set-variable" # pragma GCC diagnostic ignored "-Wunused-variable" # pragma GCC diagnostic ignored "-Wunused-parameter" +# pragma GCC diagnostic ignored "-Warray-bounds" #elif defined POSH_COMPILER_MSVC # define NV_CC_MSVC 1 # define NV_CC_STRING "msvc" @@ -222,14 +223,6 @@ #define NV_ENDIAN_STRING POSH_ENDIAN_STRING -// Define the right printf prefix for size_t arguments: -#if POSH_64BIT_POINTER -# define NV_SIZET_PRINTF_PREFIX POSH_I64_PRINTF_PREFIX -#else -# define NV_SIZET_PRINTF_PREFIX -#endif - - // Type definitions: typedef posh_u8_t uint8; typedef posh_i8_t int8;