Revert SkNO_RETURN_HINT fix in favor of a simpler fix
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 11 Jul 2012 13:30:08 +0000 (13:30 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 11 Jul 2012 13:30:08 +0000 (13:30 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@4529 2bbb7eff-a529-9590-31e7-b0007b416f81

include/core/SkPostConfig.h
src/core/SkUtils.cpp

index 6107faa..c5f4a37 100644 (file)
  */
 #if !defined(SkNO_RETURN_HINT)
     #if SK_HAS_COMPILER_FEATURE(attribute_analyzer_noreturn)
-        // If we make this a static clang will complain that it isn't called in
-        // any file that has no asserts.
-        void SkNoReturnHint() __attribute__((analyzer_noreturn));
-        #define SkNO_RETURN_HINT() SkNoReturnHint()
+        namespace {
+            inline void SkNO_RETURN_HINT() __attribute__((analyzer_noreturn));
+            inline void SkNO_RETURN_HINT() {}
+        }
     #else
         #define SkNO_RETURN_HINT() do {} while (false)
     #endif
index 2617120..3f1c65e 100644 (file)
@@ -9,11 +9,6 @@
 
 #include "SkUtils.h"
 
-// declared in SkPostConfig.h, see comment there.
-void SkNoReturnHint() {}
-
-///////////////////////////////////////////////////////////////////////////////
-
 #if 0
 #define assign_16_longs(dst, value)             \
     do {                                        \