mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
Remove redundant (void) parameter declarations
This commit is contained in:
@@ -36,7 +36,7 @@ FreeSpace *memory[SECTTYPE_INVALID];
|
||||
uint64_t nbSectionsToAssign;
|
||||
|
||||
// Init the free space-modelling structs
|
||||
static void initFreeSpace(void)
|
||||
static void initFreeSpace()
|
||||
{
|
||||
for (enum SectionType type : EnumSeq(SECTTYPE_INVALID)) {
|
||||
memory[type] = (FreeSpace *)malloc(sizeof(*memory[type]) * nbbanks(type));
|
||||
@@ -360,7 +360,7 @@ static void categorizeSection(Section *section)
|
||||
nbSectionsToAssign++;
|
||||
}
|
||||
|
||||
void assign_AssignSections(void)
|
||||
void assign_AssignSections()
|
||||
{
|
||||
verbosePrint("Beginning assignment...\n");
|
||||
|
||||
@@ -418,7 +418,7 @@ max_out:
|
||||
unreachable_();
|
||||
}
|
||||
|
||||
void assign_Cleanup(void)
|
||||
void assign_Cleanup()
|
||||
{
|
||||
for (enum SectionType type : EnumSeq(SECTTYPE_INVALID)) {
|
||||
for (uint32_t bank = 0; bank < nbbanks(type); bank++) {
|
||||
|
||||
@@ -191,7 +191,7 @@ static option const longopts[] = {
|
||||
{ nullptr, no_argument, nullptr, 0 }
|
||||
};
|
||||
|
||||
static void printUsage(void)
|
||||
static void printUsage()
|
||||
{
|
||||
fputs(
|
||||
"Usage: rgblink [-dMtVvwx] [-l script] [-m map_file] [-n sym_file]\n"
|
||||
@@ -336,7 +336,7 @@ next:
|
||||
}
|
||||
}
|
||||
|
||||
[[noreturn]] void reportErrors(void) {
|
||||
[[noreturn]] void reportErrors() {
|
||||
fprintf(stderr, "Linking failed with %" PRIu32 " error%s\n",
|
||||
nbErrors, nbErrors == 1 ? "" : "s");
|
||||
exit(1);
|
||||
|
||||
@@ -525,12 +525,12 @@ void obj_ReadFile(char const *fileName, unsigned int fileID)
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
void obj_DoSanityChecks(void)
|
||||
void obj_DoSanityChecks()
|
||||
{
|
||||
sect_DoSanityChecks();
|
||||
}
|
||||
|
||||
void obj_CheckAssertions(void)
|
||||
void obj_CheckAssertions()
|
||||
{
|
||||
patch_CheckAssertions(assertions);
|
||||
}
|
||||
@@ -548,7 +548,7 @@ static void freeSection(Section *section)
|
||||
};
|
||||
}
|
||||
|
||||
void obj_Cleanup(void)
|
||||
void obj_Cleanup()
|
||||
{
|
||||
sect_ForEach(freeSection);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ Section const *out_OverlappingSection(Section const *section)
|
||||
* Performs sanity checks on the overlay file.
|
||||
* @return The number of ROM banks in the overlay file
|
||||
*/
|
||||
static uint32_t checkOverlaySize(void)
|
||||
static uint32_t checkOverlaySize()
|
||||
{
|
||||
if (!overlayFile)
|
||||
return 0;
|
||||
@@ -192,7 +192,7 @@ static void writeBank(std::deque<Section const *> *bankSections, uint16_t baseOf
|
||||
}
|
||||
|
||||
// Writes a ROM file to the output.
|
||||
static void writeROM(void)
|
||||
static void writeROM()
|
||||
{
|
||||
if (outputFileName) {
|
||||
if (strcmp(outputFileName, "-")) {
|
||||
@@ -450,7 +450,7 @@ static void writeMapBank(SortedSections const §List, enum SectionType type,
|
||||
/*
|
||||
* Write the total used and free space by section type to the map file
|
||||
*/
|
||||
static void writeMapSummary(void)
|
||||
static void writeMapSummary()
|
||||
{
|
||||
fputs("SUMMARY:\n", mapFile);
|
||||
|
||||
@@ -500,7 +500,7 @@ static void writeMapSummary(void)
|
||||
}
|
||||
|
||||
// Writes the sym file, if applicable.
|
||||
static void writeSym(void)
|
||||
static void writeSym()
|
||||
{
|
||||
if (!symFileName)
|
||||
return;
|
||||
@@ -527,7 +527,7 @@ static void writeSym(void)
|
||||
}
|
||||
|
||||
// Writes the map file, if applicable.
|
||||
static void writeMap(void)
|
||||
static void writeMap()
|
||||
{
|
||||
if (!mapFileName)
|
||||
return;
|
||||
@@ -553,7 +553,7 @@ static void writeMap(void)
|
||||
fclose(mapFile);
|
||||
}
|
||||
|
||||
void out_WriteFiles(void)
|
||||
void out_WriteFiles()
|
||||
{
|
||||
writeROM();
|
||||
writeSym();
|
||||
|
||||
@@ -505,7 +505,7 @@ static void applyPatches(Section *section)
|
||||
applyFilePatches(component, section);
|
||||
}
|
||||
|
||||
void patch_ApplyPatches(void)
|
||||
void patch_ApplyPatches()
|
||||
{
|
||||
sect_ForEach(applyPatches);
|
||||
}
|
||||
|
||||
@@ -34,21 +34,21 @@
|
||||
using namespace std::literals;
|
||||
|
||||
static void includeFile(std::string &&path);
|
||||
static void incLineNo(void);
|
||||
static void incLineNo();
|
||||
|
||||
static void setSectionType(SectionType type);
|
||||
static void setSectionType(SectionType type, uint32_t bank);
|
||||
static void setAddr(uint32_t addr);
|
||||
static void makeAddrFloating(void);
|
||||
static void makeAddrFloating();
|
||||
static void alignTo(uint32_t alignment, uint32_t offset);
|
||||
static void pad(uint32_t length);
|
||||
static void placeSection(std::string const &name, bool isOptional);
|
||||
|
||||
static yy::parser::symbol_type yylex(void);
|
||||
static yy::parser::symbol_type yylex();
|
||||
|
||||
struct Keyword {
|
||||
std::string_view name;
|
||||
yy::parser::symbol_type (* tokenGen)(void);
|
||||
yy::parser::symbol_type (* tokenGen)();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ static void includeFile(std::string &&path) {
|
||||
}
|
||||
}
|
||||
|
||||
static void incLineNo(void) {
|
||||
static void incLineNo() {
|
||||
++lexerStack.back().lineNo;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ static uint8_t parseHexDigit(int c) {
|
||||
}
|
||||
}
|
||||
|
||||
yy::parser::symbol_type yylex(void) {
|
||||
yy::parser::symbol_type yylex() {
|
||||
try_again: // Can't use a `do {} while(0)` loop, otherwise compilers (wrongly) think it can end.
|
||||
auto &context = lexerStack.back();
|
||||
auto c = context.file.sbumpc();
|
||||
@@ -397,7 +397,7 @@ static void setAddr(uint32_t addr) {
|
||||
isPcFloating = false;
|
||||
}
|
||||
|
||||
static void makeAddrFloating(void) {
|
||||
static void makeAddrFloating() {
|
||||
auto const &context = lexerStack.back();
|
||||
if (activeType == SECTTYPE_INVALID) {
|
||||
scriptError(context, "Cannot make the current address floating: no memory region is active");
|
||||
|
||||
@@ -266,7 +266,7 @@ static void doSanityChecks(Section *section)
|
||||
}
|
||||
}
|
||||
|
||||
void sect_DoSanityChecks(void)
|
||||
void sect_DoSanityChecks()
|
||||
{
|
||||
sect_ForEach(doSanityChecks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user