diff --git a/uppsrc/GridCtrl/GridUtils.h b/uppsrc/GridCtrl/GridUtils.h index 6c919e0d5..b43691328 100644 --- a/uppsrc/GridCtrl/GridUtils.h +++ b/uppsrc/GridCtrl/GridUtils.h @@ -40,7 +40,9 @@ inline int32 Round(double a) #ifdef flagDEBUG #define LG LogGui #else -#define LG +inline void LG_Dummy_Nop__(int level, const char *fmt, ...) {} // needed to silence CLANG warnings +inline void LG_Dummy_Nop__(const char *fmt, ...) {} // about unused value +#define LG LG_Dummy_Nop__ #endif #define LGR LogGui diff --git a/uppsrc/Web/util.h b/uppsrc/Web/util.h index 41a9d0da2..0e00bfcf4 100644 --- a/uppsrc/Web/util.h +++ b/uppsrc/Web/util.h @@ -53,9 +53,9 @@ public: ASSERT(refcount == 0); } - void AddRef() const { if(this) AtomicInc(refcount); } + void AddRef() const { AtomicInc(refcount); } int GetRefCount() const { return refcount; } - void Release() const { if(this && !AtomicDec(refcount)) delete this; } + void Release() const { if(!AtomicDec(refcount)) delete this; } #ifdef REF_DEBUG int GetAllocIndex() const { return allocindex; } #endif//REF_DEBUG