Исправление выявленных ошибок

- исправление выявленных ошибок
- если используется не-void функция без return, появляется ошибка вместо предупреждения
Co-authored-by: KLASSENTS <klassen@elron.tech>
Co-committed-by: KLASSENTS <klassen@elron.tech>
This commit was merged in pull request #23.
This commit is contained in:
klassents authored and klassents committed 2025-05-28 12:55:19 +03:00
1 parent ae811a9847
commit 2cb29ab673
3 files changed
+17 -19

No files matched your search

+14 -16
View File
@@ -56,25 +56,23 @@ enum BitOrder
#define NOT_AN_INTERRUPT -1
// Math
#ifdef __cplusplus
#include <algorithm>
using std::min;
using std::max;
#else // C
#include <stdlib.h>
#ifndef abs
#define abs(x) ((x)>0?(x):-(x))
#endif // abs
#include <stdlib.h>
// undefine stdlib's abs if encountered
#ifdef abs
#undef abs
#endif
#ifndef abs
#define abs(x) ((x)>0?(x):-(x))
#endif // abs
#ifndef min
#define min(a,b) ((a)<(b)?(a):(b))
#endif // min
#ifndef min
#define min(a,b) ((a)<(b)?(a):(b))
#endif // min
#ifndef max
#define max(a,b) ((a)>(b)?(a):(b))
#endif // max
#ifndef max
#define max(a,b) ((a)>(b)?(a):(b))
#endif // max
#endif // __cplusplus
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define radians(deg) ((deg)*DEG_TO_RAD)
#define degrees(rad) ((rad)*RAD_TO_DEG)