Selaa lähdekoodia

Fixed GCC 5 warnings.

Branimir Karadžić 10 vuotta sitten
vanhempi
sitoutus
7c102d6d6d

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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

+ 4 - 4
3rdparty/nvtt/nvcore/memory.h

@@ -9,19 +9,19 @@
 namespace nv {
 
     // C++ helpers.
-    template <typename T> NV_FORCEINLINE T * malloc(size_t count) {
+    template <typename T> inline T * malloc(size_t count) {
         return (T *)::malloc(sizeof(T) * count);
     }
 
-    template <typename T> NV_FORCEINLINE T * realloc(T * ptr, size_t count) {
+    template <typename T> inline T * realloc(T * ptr, size_t count) {
         return (T *)::realloc(ptr, sizeof(T) * count);
     }
 
-    template <typename T> NV_FORCEINLINE void free(const T * ptr) {
+    template <typename T> inline void free(const T * ptr) {
         ::free((void *)ptr);
     }
 
-    template <typename T> NV_FORCEINLINE void zero(T & data) {
+    template <typename T> inline void zero(T & data) {
         memset(&data, 0, sizeof(T));
     }
 

+ 1 - 8
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;