summaryrefslogtreecommitdiff
path: root/arm9/lib/src
diff options
context:
space:
mode:
authorred031000 <rubenru09@aol.com>2020-05-25 15:43:23 +0100
committerred031000 <rubenru09@aol.com>2020-05-25 15:43:23 +0100
commit0985659425ab1a9035d85512e330cdc247b24e6b (patch)
tree31ec68ffd57f0d43df60f6885636cc12de782306 /arm9/lib/src
parent00f7b96e44ef644ec2b5382eda87e3f47c06b436 (diff)
kill all warnings
Diffstat (limited to 'arm9/lib/src')
-rw-r--r--arm9/lib/src/FX_atan.c53
-rw-r--r--arm9/lib/src/OS_alloc.c8
-rw-r--r--arm9/lib/src/OS_protectionUnit.c1
3 files changed, 31 insertions, 31 deletions
diff --git a/arm9/lib/src/FX_atan.c b/arm9/lib/src/FX_atan.c
index 9a936fa0..fa2d0dbe 100644
--- a/arm9/lib/src/FX_atan.c
+++ b/arm9/lib/src/FX_atan.c
@@ -141,11 +141,11 @@ ARM_FUNC u16 FX_Atan(fx32 x){
{
x = FX_Inv(x);
fx16 y = FX_AtanTable_[x >> 5];
- return 0x4000 - y;
+ return (u16)(0x4000 - y);
}
else if (x < 0x1000)
{
- return FX_AtanTable_[x >> 5];
+ return (u16)FX_AtanTable_[x >> 5];
}
else
{
@@ -158,21 +158,20 @@ ARM_FUNC u16 FX_Atan(fx32 x){
{
x = FX_Inv(-x);
fx16 y = FX_AtanTable_[x >> 5];
- return y - 0x4000;
+ return (u16)(y - 0x4000);
}
else if (x > -0x1000)
{
- return -FX_AtanTable_[-x >> 5];
+ return (u16)(-FX_AtanTable_[-x >> 5]);
}
else
{
- return -0x2000;
+ return (u16)(-0x2000);
}
}
}
ARM_FUNC u16 FX_Atan2(fx32 x, fx32 y){
- fx32 result;
u32 positive, bias, denominator, numerator;
if (x > 0)
{
@@ -180,15 +179,15 @@ ARM_FUNC u16 FX_Atan2(fx32 x, fx32 y){
{
if (y > x)
{
- numerator = x;
- denominator = y;
+ numerator = (u32)x;
+ denominator = (u32)y;
bias = 0;
positive = TRUE;
}
else if (y < x)
{
- numerator = y;
- denominator = x;
+ numerator = (u32)y;
+ denominator = (u32)x;
bias = 0x4000;
positive = FALSE;
}
@@ -202,15 +201,15 @@ ARM_FUNC u16 FX_Atan2(fx32 x, fx32 y){
y = -y;
if (y < x)
{
- numerator = y;
- denominator = x;
+ numerator = (u32)y;
+ denominator = (u32)x;
bias = 0x4000;
positive = TRUE;
}
else if (y > x)
{
- numerator = x;
- denominator = y;
+ numerator = (u32)x;
+ denominator = (u32)y;
bias = 0x8000;
positive = FALSE;
}
@@ -232,16 +231,16 @@ ARM_FUNC u16 FX_Atan2(fx32 x, fx32 y){
y = -y;
if (y > x)
{
- numerator = x;
- denominator = y;
- bias = -0x8000;
+ numerator = (u32)x;
+ denominator = (u32)y;
+ bias = (u32)(-0x8000);
positive = TRUE;
}
else if (y < x)
{
- numerator = y;
- denominator = x;
- bias = -0x4000;
+ numerator = (u32)y;
+ denominator = (u32)x;
+ bias = (u32)(-0x4000);
positive = FALSE;
}
else
@@ -253,15 +252,15 @@ ARM_FUNC u16 FX_Atan2(fx32 x, fx32 y){
{
if (y < x)
{
- numerator = y;
- denominator = x;
- bias = -0x4000;
+ numerator = (u32)y;
+ denominator = (u32)x;
+ bias = (u32)(-0x4000);
positive = TRUE;
}
else if (y > x)
{
- numerator = x;
- denominator = y;
+ numerator = (u32)x;
+ denominator = (u32)y;
bias = 0x0;
positive = FALSE;
}
@@ -285,7 +284,7 @@ ARM_FUNC u16 FX_Atan2(fx32 x, fx32 y){
if (denominator == 0x0)
return 0x0;
if (positive)
- return bias + FX_AtanTable_[FX_Div(numerator, denominator) >> 5];
+ return (u16)(bias + FX_AtanTable_[FX_Div((fx32)numerator, (fx32)denominator) >> 5]);
else
- return bias - FX_AtanTable_[FX_Div(numerator, denominator) >> 5];
+ return (u16)(bias - FX_AtanTable_[FX_Div((fx32)numerator, (fx32)denominator) >> 5]);
}
diff --git a/arm9/lib/src/OS_alloc.c b/arm9/lib/src/OS_alloc.c
index e883656e..32f386a8 100644
--- a/arm9/lib/src/OS_alloc.c
+++ b/arm9/lib/src/OS_alloc.c
@@ -94,7 +94,7 @@ ARM_FUNC void* OS_AllocFromHeap(OSArenaId id, OSHeapHandle heap, u32 size) {
OSIntrMode enabled = OS_DisableInterrupts();
heapInfo = OSiHeapInfo[id];
if (!heapInfo) {
- OS_RestoreInterrupts(enabled);
+ (void)OS_RestoreInterrupts(enabled);
return NULL;
}
@@ -114,7 +114,7 @@ ARM_FUNC void* OS_AllocFromHeap(OSArenaId id, OSHeapHandle heap, u32 size) {
}
if (cell == NULL) {
- OS_RestoreInterrupts(enabled);
+ (void)OS_RestoreInterrupts(enabled);
return NULL;
}
@@ -143,7 +143,7 @@ ARM_FUNC void* OS_AllocFromHeap(OSArenaId id, OSHeapHandle heap, u32 size) {
hd->allocated = DLAddFront(hd->allocated, cell);
- OS_RestoreInterrupts(enabled);
+ (void)OS_RestoreInterrupts(enabled);
return (void *)((char *)cell + HEADERSIZE);
}
@@ -165,5 +165,5 @@ ARM_FUNC void OS_FreeToHeap(OSArenaId id, OSHeapHandle heap, void* ptr) {
hd->allocated = DLExtract(hd->allocated, cell);
hd->free = DLInsert(hd->free, cell);
- OS_RestoreInterrupts(enabled);
+ (void)OS_RestoreInterrupts(enabled);
}
diff --git a/arm9/lib/src/OS_protectionUnit.c b/arm9/lib/src/OS_protectionUnit.c
index be57dcd6..6d3b7952 100644
--- a/arm9/lib/src/OS_protectionUnit.c
+++ b/arm9/lib/src/OS_protectionUnit.c
@@ -3,6 +3,7 @@
//
#include "function_target.h"
+#include "OS_protectionUnit.h"
ARM_FUNC asm void OS_EnableProtectionUnit(void)
{