cppchecker fixes

This commit is contained in:
iceman1001 2021-02-23 23:00:29 +01:00
commit 4620c0b21e
6 changed files with 41 additions and 46 deletions

View file

@ -15,18 +15,15 @@
extern const uint8_t OddByteParity[256];
static inline bool oddparity8(const uint8_t x) {
static inline uint8_t oddparity8(const uint8_t x) {
return OddByteParity[x];
}
static inline bool evenparity8(const uint8_t x) {
static inline uint8_t evenparity8(const uint8_t x) {
return !OddByteParity[x];
}
static inline bool evenparity32(uint32_t x) {
static inline uint8_t evenparity32(uint32_t x) {
#if !defined __GNUC__
x ^= x >> 16;
x ^= x >> 8;
@ -36,8 +33,7 @@ static inline bool evenparity32(uint32_t x) {
#endif
}
static inline bool oddparity32(uint32_t x) {
static inline uint8_t oddparity32(uint32_t x) {
#if !defined __GNUC__
x ^= x >> 16;
x ^= x >> 8;