Bug 839257: Mark Factory.cpp's HasCPUIDBit() as inline, to fix build warnings on some configurations about the function being defined but not used. r=Bas
authorDaniel Holbert <dholbert@cs.stanford.edu>
Sun, 17 Feb 2013 00:45:10 -0800
changeset 132046 db9ec9c7ce228c79c23a9a5e1bb42f6fd0fe5a4b
parent 132045 5e137a87e84f08a1143349300c8d0f999602af7a
child 132047 03f26f5e781cd18888b771659449b06b19b83be7
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs839257
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 839257: Mark Factory.cpp's HasCPUIDBit() as inline, to fix build warnings on some configurations about the function being defined but not used. r=Bas
gfx/2d/Factory.cpp
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -61,17 +61,17 @@ GetGFX2DLog()
 // made a little simpler.
 enum CPUIDRegister { eax = 0, ebx = 1, ecx = 2, edx = 3 };
 
 #ifdef HAVE_CPUID_H
 
 // cpuid.h is available on gcc 4.3 and higher on i386 and x86_64
 #include <cpuid.h>
 
-static bool
+static inline bool
 HasCPUIDBit(unsigned int level, CPUIDRegister reg, unsigned int bit)
 {
   unsigned int regs[4];
   return __get_cpuid(level, &regs[0], &regs[1], &regs[2], &regs[3]) &&
          (regs[reg] & bit);
 }
 
 #define HAVE_CPU_DETECTION
@@ -123,17 +123,17 @@ static void
   );
 }
 
 #define HAVE_CPU_DETECTION
 #endif
 #endif
 
 #ifdef HAVE_CPU_DETECTION
-static bool
+static inline bool
 HasCPUIDBit(unsigned int level, CPUIDRegister reg, unsigned int bit)
 {
   // Check that the level in question is supported.
   volatile int regs[4];
   __cpuid((int *)regs, level & 0x80000000u);
   if (unsigned(regs[0]) < level)
     return false;
   __cpuid((int *)regs, level);