From 7b36fddf33c6ffae590ba29513f019fadf6343d6 Mon Sep 17 00:00:00 2001 From: Pablo Curiel Date: Tue, 8 Oct 2024 00:57:49 +0200 Subject: [PATCH] Upgrade C standard to C23. --- Makefile | 1 + include/core/nxdt_includes.h | 1 + source/core/nxdt_json.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4a43ecd..934216f 100644 --- a/Makefile +++ b/Makefile @@ -100,6 +100,7 @@ CFLAGS += -DBUILD_TIMESTAMP="\"${BUILD_TIMESTAMP}\"" -DBOREALIS_RESOURCES="\"${ CFLAGS += -fmacro-prefix-map=$(ROOTDIR)= CXXFLAGS := $(CFLAGS) -std=c++20 +CFLAGS += -std=c23 ASFLAGS := -g $(ARCH) LDFLAGS := -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) diff --git a/include/core/nxdt_includes.h b/include/core/nxdt_includes.h index b5b0b9c..8c87874 100644 --- a/include/core/nxdt_includes.h +++ b/include/core/nxdt_includes.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/source/core/nxdt_json.c b/source/core/nxdt_json.c index d523267..cc33182 100644 --- a/source/core/nxdt_json.c +++ b/source/core/nxdt_json.c @@ -46,7 +46,7 @@ struct json_object *jsonParseFromString(const char *str, size_t size) if (!str || !*str) { LOG_MSG_ERROR("Invalid parameters!"); - return false; + return NULL; } /* Calculate string size if it wasn't provided. */