1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Schwabe/silence register warnings clang (#3940)

* Ignore deprecated register warning for the the STM include files

Ignore the warning with the use of #pragma which is not elegant but otherwise we would have to change the vendor files

* Remove usage of register in C/C++ files.

Modern compilers ignore it anyway and C++11 actually deprecates it. Removing also removes a number of clang warnings about this
This commit is contained in:
Arne Schwabe 2016-10-21 00:09:54 +02:00 committed by Bertrand Songis
parent ba824537d4
commit ad8cd2546e
21 changed files with 140 additions and 116 deletions

View file

@ -917,27 +917,27 @@ inline int divRoundClosest(const int n, const int d)
#define calc100to256_16Bits(x) calc100to256(x)
#define calc100toRESX_16Bits(x) calc100toRESX(x)
inline int calc100to256(register int x)
inline int calc100to256(int x)
{
return divRoundClosest(x*256, 100);
}
inline int calc100toRESX(register int x)
inline int calc100toRESX(int x)
{
return divRoundClosest(x*RESX, 100);
}
inline int calc1000toRESX(register int x)
inline int calc1000toRESX(int x)
{
return divRoundClosest(x*RESX, 1000);
}
inline int calcRESXto1000(register int x)
inline int calcRESXto1000(int x)
{
return divRoundClosest(x*1000, RESX);
}
inline int calcRESXto100(register int x)
inline int calcRESXto100(int x)
{
return divRoundClosest(x*100, RESX);
}