Made code (mostly) follow C99

This commit is contained in:
AnnaSnoeijs 2025-08-15 19:20:04 +02:00
parent 4b76bd6265
commit b0240c4911
3 changed files with 8 additions and 3 deletions

View file

@ -30,7 +30,7 @@
#include "types.h"
#include "ui.h"
#define VERSION 0.3.0
#define VERSION 0.3.1
#ifndef GITHASH
#define FULLVERSION VERSION
@ -48,7 +48,11 @@ extern char _binary_LICENSE_start[];
extern char _binary_LICENSE_end[];
#endif /* ! NO_OPTIONS */
int main( [[maybe_unused]] int argc, [[maybe_unused]] char *argv[] ){
int main(
#ifndef NO_OPTIONS // [[maybe_unused]] is unsupported in C99, so this will do
int argc, char *argv[]
#endif /* ! NO_OPTIONS */
){
// Initialise variables
board_t playboard = {
.player = 0,

View file

@ -7,7 +7,7 @@ ARCH = native
O = s
# Flags for the compiler
FLAGS = -std=c23
FLAGS = -std=gnu99
FLAGS += -O$(O)
FLAGS += -march=$(ARCH)
# Only override gcc default tuning if specified in make command line

View file

@ -2,6 +2,7 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>
#include "config.h"