mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
cortex-m: Suppress cppcheck error about uninitialized result
False positive, the variable result is assigned from within inline assembly
This commit is contained in:
parent
684a7d5b42
commit
01c5120039
@ -345,6 +345,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, control" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -372,6 +373,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_IPSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -387,6 +389,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_APSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, apsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -402,6 +405,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, xpsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -417,6 +421,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
|
||||
register uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, psp\n" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -444,6 +449,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
|
||||
register uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, msp\n" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -471,6 +477,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PRIMASK(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, primask" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -345,6 +345,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, control" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -372,6 +373,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_IPSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -387,6 +389,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_APSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, apsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -402,6 +405,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, xpsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -417,6 +421,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
|
||||
register uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, psp\n" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -444,6 +449,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
|
||||
register uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, msp\n" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -471,6 +477,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PRIMASK(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, primask" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -345,6 +345,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, control" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -372,6 +373,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_IPSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -387,6 +389,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_APSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, apsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -402,6 +405,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, xpsr" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -417,6 +421,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
|
||||
register uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, psp\n" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -444,6 +449,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
|
||||
register uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, msp\n" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
@ -471,6 +477,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PRIMASK(void)
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile ("MRS %0, primask" : "=r" (result) );
|
||||
/* cppcheck-suppress uninitvar */
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user