Skip to content

Fixed some of the compiler warnings#127

Open
OmerFarukBOUN wants to merge 1 commit intoSkeli789:masterfrom
OmerFarukBOUN:fix-some-warnings
Open

Fixed some of the compiler warnings#127
OmerFarukBOUN wants to merge 1 commit intoSkeli789:masterfrom
OmerFarukBOUN:fix-some-warnings

Conversation

@OmerFarukBOUN
Copy link
Contributor

Fix for some of the compiler warnings.

Skeli789 added a commit that referenced this pull request Jan 24, 2025
@Skeli789 Skeli789 closed this Jan 24, 2025
#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided")

#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
#define NELEMS(arr) (sizeof(arr)/sizeof(*(arr)))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution for the issue caused by this isn't to change this line, but instead to remove the lines in dexnav.c that are throwing this warning. Those lines aren't used for anything.

bool8 ShouldTrap(u8 bankAtk, u8 bankDef, u16 move, u8 class);
bool8 ShouldRecover(u8 bankAtk, u8 bankDef, u16 move);
u8 ShouldProtect(u8 bankAtk, u8 bankDef, u16 move);
ProtectQueries ShouldProtect(u8 bankAtk, u8 bankDef, u16 move);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simpler to just change the function itself to return a u8 in the .C file

@Skeli789 Skeli789 reopened this Jan 24, 2025
@OmerFarukBOUN
Copy link
Contributor Author

Thanks for the feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants