mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 10:42:07 +00:00
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:
@@ -328,9 +328,8 @@ static struct UnassignedSection *sections;
|
||||
* @param section The section to categorize
|
||||
* @param arg Callback arg, unused
|
||||
*/
|
||||
static void categorizeSection(struct Section *section, void *arg)
|
||||
static void categorizeSection(struct Section *section, void *)
|
||||
{
|
||||
(void)arg;
|
||||
uint8_t constraints = 0;
|
||||
|
||||
if (section->isBankFixed)
|
||||
|
||||
@@ -406,7 +406,6 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
case 's':
|
||||
// TODO: implement "smart linking" with `-s`
|
||||
(void)musl_optarg;
|
||||
warning(NULL, 0, "Nobody has any idea what `-s` does");
|
||||
break;
|
||||
case 't':
|
||||
|
||||
@@ -669,10 +669,8 @@ static void freeNode(struct FileStackNode *node)
|
||||
free(node->name);
|
||||
}
|
||||
|
||||
static void freeSection(struct Section *section, void *arg)
|
||||
static void freeSection(struct Section *section, void *)
|
||||
{
|
||||
(void)arg;
|
||||
|
||||
do {
|
||||
struct Section *next = section->nextu;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -219,10 +219,8 @@ void sect_CleanupSections(void)
|
||||
hash_EmptyMap(sections);
|
||||
}
|
||||
|
||||
static void doSanityChecks(struct Section *section, void *ptr)
|
||||
static void doSanityChecks(struct Section *section, void *)
|
||||
{
|
||||
(void)ptr;
|
||||
|
||||
// Sanity check the section's type
|
||||
|
||||
if (section->type < 0 || section->type >= SECTTYPE_INVALID) {
|
||||
|
||||
Reference in New Issue
Block a user