mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Fixed GCC 5 warnings.
This commit is contained in:
parent
930fbe9e1a
commit
7c102d6d6d
5 changed files with 8 additions and 15 deletions
2
3rdparty/nvtt/nvcore/defsgnucdarwin.h
vendored
2
3rdparty/nvtt/nvcore/defsgnucdarwin.h
vendored
|
@ -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
|
||||
|
|
2
3rdparty/nvtt/nvcore/defsgnuclinux.h
vendored
2
3rdparty/nvtt/nvcore/defsgnuclinux.h
vendored
|
@ -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
|
||||
|
|
2
3rdparty/nvtt/nvcore/defsgnucwin32.h
vendored
2
3rdparty/nvtt/nvcore/defsgnucwin32.h
vendored
|
@ -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
|
||||
|
|
8
3rdparty/nvtt/nvcore/memory.h
vendored
8
3rdparty/nvtt/nvcore/memory.h
vendored
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
9
3rdparty/nvtt/nvcore/nvcore.h
vendored
9
3rdparty/nvtt/nvcore/nvcore.h
vendored
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue