Resolve compile warnings in modern

This commit is contained in:
PikalaxALT
2020-04-05 13:07:40 -04:00
parent 585a1170c9
commit f15a705021
7 changed files with 9 additions and 7 deletions
+1
View File
@@ -221,6 +221,7 @@ $(C_BUILDDIR)/librfu_intr.o: CC1 := tools/agbcc/bin/agbcc_arm
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -O2 -mthumb-interwork -quiet
else
$(C_BUILDDIR)/berry_crush_2.o: CFLAGS += -Wno-address-of-packed-member
$(C_BUILDDIR)/berry_crush_3.o: CFLAGS += -Wno-address-of-packed-member
$(C_BUILDDIR)/text.o: CFLAGS += -Wno-address-of-packed-member
$(C_BUILDDIR)/battle_tower.o: CFLAGS += -Wno-div-by-zero
$(C_BUILDDIR)/librfu_intr.o: override CFLAGS += -marm -mthumb-interwork -O2 -mtune=arm7tdmi -march=armv4t -mabi=apcs-gnu -fno-toplevel-reorder -fno-aggressive-loop-optimizations -Wno-pointer-to-int-cast
+1 -1
View File
@@ -33,7 +33,7 @@ void SwitchTaskToFollowupFunc(u8 taskId);
bool8 FuncIsActiveTask(TaskFunc func);
u8 FindTaskIdByFunc(TaskFunc func);
u8 GetTaskCount(void);
void SetWordTaskArg(u8 taskId, u8 dataElem, u32 value);
void SetWordTaskArg(u8 taskId, u8 dataElem, unsigned long value);
u32 GetWordTaskArg(u8 taskId, u8 dataElem);
#endif // GUARD_TASK_H
+2 -2
View File
@@ -9,8 +9,8 @@ extern const u8 gMiscBlank_Gfx[]; // unused in Emerald
extern const u32 gBitTable[];
u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *));
void StoreWordInTwoHalfwords(u16 *, u32);
void LoadWordFromTwoHalfwords(u16 *, u32 *);
void StoreWordInTwoHalfwords(u16 *, unsigned);
void LoadWordFromTwoHalfwords(u16 *, unsigned *);
int CountTrailingZeroBits(u32 value);
u16 CalcCRC16(const u8 *data, u32 length);
u16 CalcCRC16WithTable(const u8 *data, u32 length);
+1
View File
@@ -4,6 +4,7 @@
#include "task.h"
#include "trig.h"
#undef abs
#define abs(x) ((x) < 0 ? -(x) : (x))
static void AnimTask_ShakeMonStep(u8 taskId);
+1 -1
View File
@@ -2045,7 +2045,7 @@ static void Task_FightScene3_Bg0Scroll(u8 taskId)
static void SpriteCB_LargeStar(struct Sprite * sprite)
{
u32 v;
unsigned v;
sprite->data[0] -= sprite->data[2];
sprite->data[1] += sprite->data[3];
sprite->data[4] += 48;
+1 -1
View File
@@ -201,7 +201,7 @@ u8 GetTaskCount(void)
return count;
}
void SetWordTaskArg(u8 taskId, u8 dataElem, u32 value)
void SetWordTaskArg(u8 taskId, u8 dataElem, unsigned long value)
{
if (dataElem <= 14)
{
+2 -2
View File
@@ -120,13 +120,13 @@ u8 CreateInvisibleSpriteWithCallback(void (*callback)(struct Sprite *))
return sprite;
}
void StoreWordInTwoHalfwords(u16 *h, u32 w)
void StoreWordInTwoHalfwords(u16 *h, unsigned w)
{
h[0] = (u16)(w);
h[1] = (u16)(w >> 16);
}
void LoadWordFromTwoHalfwords(u16 *h, u32 *w)
void LoadWordFromTwoHalfwords(u16 *h, unsigned *w)
{
*w = h[0] | (s16)h[1] << 16;
}