Skip to content

Fixed some of the compiler warnings#127

Open
sebatkar wants to merge 1 commit into
Skeli789:masterfrom
sebatkar:fix-some-warnings
Open

Fixed some of the compiler warnings#127
sebatkar wants to merge 1 commit into
Skeli789:masterfrom
sebatkar:fix-some-warnings

Conversation

@sebatkar

Copy link
Copy Markdown
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
Comment thread include/global.h
#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
Copy Markdown
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.

Comment thread include/new/ai_advanced.h
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
Copy Markdown
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

Comment thread src/battle_controller_opponent.c
@Skeli789 Skeli789 reopened this Jan 24, 2025
@sebatkar

Copy link
Copy Markdown
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