Add more tests for RGBASM code coverage (#1257)

* Add more tests for RGBASM code coverage

* Use C++ unnamed parameters, not `(void)` casting

* Fix crash in `sect_AlignPC` from #1253
This commit is contained in:
Rangi
2023-12-01 10:21:43 -05:00
committed by GitHub
parent cee3d1c859
commit 6132b77c1e
85 changed files with 450 additions and 65 deletions

View File

@@ -502,8 +502,8 @@ void patch_CheckAssertions(struct Assertion *assert)
/*
* Applies all of a section's patches
* @param section The section to patch
* @param arg Ignored callback arg
* @param section The section component to patch
* @param dataSection The section to patch
*/
static void applyFilePatches(struct Section *section, struct Section *dataSection)
{
@@ -554,23 +554,17 @@ static void applyFilePatches(struct Section *section, struct Section *dataSectio
}
/*
* Applies all of a section's patches, iterating over "components" of
* unionized sections
* Applies all of a section's patches, iterating over "components" of unionized sections
* @param section The section to patch
* @param arg Ignored callback arg
*/
static void applyPatches(struct Section *section, void *arg)
static void applyPatches(struct Section *section, void *)
{
if (!sect_HasData(section->type))
return;
(void)arg;
struct Section *dataSection = section;
do {
applyFilePatches(section, dataSection);
section = section->nextu;
} while (section);
for (struct Section *component = section; component; component = component->nextu)
applyFilePatches(component, section);
}
void patch_ApplyPatches(void)