Comply with -Wstrict-prototypes

This commit is contained in:
Carles Fernandez 2022-07-16 09:39:16 +02:00
parent 027956b55e
commit 7c694aa2c8
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ char gGlobalBuffer[64 * 1024];
BumpAllocator gBumpAllocator = {.ptr = gGlobalBuffer,
.size = sizeof(gGlobalBuffer)};
static void internal_error()
static void internal_error(void)
{
fputs("internal error\n", stderr);
exit(EXIT_FAILURE);
@ -51,12 +51,12 @@ static void internal_error()
#define ALIGN 8
static void assertAligned()
static void assertAligned(void)
{
if ((uintptr_t)(gBumpAllocator.ptr) % ALIGN) internal_error();
}
static void BA_Align()
static void BA_Align(void)
{
while (gBumpAllocator.size && (uintptr_t)(gBumpAllocator.ptr) % ALIGN)
{
@ -128,10 +128,10 @@ static Node* CreateConstantString(const char* value)
}
// Adds a map node.
static Node* CreateMap() { return BA_CreateNode(NT_MAP); }
static Node* CreateMap(void) { return BA_CreateNode(NT_MAP); }
// Adds an array node.
static Node* CreateArray() { return BA_CreateNode(NT_ARRAY); }
static Node* CreateArray(void) { return BA_CreateNode(NT_ARRAY); }
// Adds a formatted string node.
static Node* CreatePrintfString(const char* format, ...)
@ -385,7 +385,7 @@ static void AddCacheInfo(Node* root, const CacheInfo* cache_info)
AddMapEntry(root, "cache_info", array);
}
static Node* CreateTree()
static Node* CreateTree(void)
{
Node* root = CreateMap();
#if defined(CPU_FEATURES_ARCH_X86)