summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-16 07:34:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-16 07:37:06 +0200
commitf35c3be9f8968daaa1b3e81808f9b99079d17a68 (patch)
treeadb84f327c8e50e83b2107d6539fa8fa3d5aca09 /cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
parentlibdl: Fix the tests loading the correct files (diff)
downloadrtems-f35c3be9f8968daaa1b3e81808f9b99079d17a68.tar.bz2
Remove register keyword from public header files
The following code void f(void) { register int i; } gives a warning with GCC and -std=c++17 test.cc: In function ‘void f()’: test.cc:3:15: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister] register int i; ^ and clang with -std=c++14 test.cc:3:3: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] register int i; ^~~~~~~~~ 1 warning generated. Remove the use of the register keyword at least in the public header files for C++ compatibility. Close #3397.
Diffstat (limited to 'cpukit/score/cpu/powerpc/include/rtems/score/cpu.h')
-rw-r--r--cpukit/score/cpu/powerpc/include/rtems/score/cpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
index 02560695bd..31e74aba95 100644
--- a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
@@ -661,7 +661,7 @@ RTEMS_INLINE_ROUTINE bool _CPU_ISR_Is_enabled( uint32_t level )
static inline uint32_t _CPU_ISR_Get_level( void )
{
- register unsigned int msr;
+ uint32_t msr;
_CPU_MSR_GET(msr);
if (msr & MSR_EE) return 0;
else return 1;
@@ -669,7 +669,7 @@ static inline uint32_t _CPU_ISR_Get_level( void )
static inline void _CPU_ISR_Set_level( uint32_t level )
{
- register unsigned int msr;
+ uint32_t msr;
_CPU_MSR_GET(msr);
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
msr |= ppc_interrupt_get_disable_mask();