From 3d7ffdcde017c8fc3a2ea539e4b11c8baf3e1b52 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 1 Sep 2025 13:11:30 +0200 Subject: [PATCH] EDID Parser: Fix a warning and move the whole thing to utils/. --- src/CMakeLists.txt | 1 - src/utils/CMakeLists.txt | 1 + src/{ => utils}/edid_parse.cpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/{ => utils}/edid_parse.cpp (99%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 89a97f683..724e1fda6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -48,7 +48,6 @@ add_executable(86Box nvr_at.c nvr_ps2.c machine_status.c - edid_parse.cpp ) if(CMAKE_SYSTEM_NAME MATCHES "Linux") diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index bcbc7aafd..e4dea5d61 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -19,6 +19,7 @@ add_library(utils OBJECT cJSON.c crc.c crc32.c + edid_parse.cpp fifo.c fifo8.c ini.c diff --git a/src/edid_parse.cpp b/src/utils/edid_parse.cpp similarity index 99% rename from src/edid_parse.cpp rename to src/utils/edid_parse.cpp index 3d74245ff..5aff4e3e6 100644 --- a/src/edid_parse.cpp +++ b/src/utils/edid_parse.cpp @@ -29,7 +29,7 @@ extern "C" bool parse_edid_decode_file(const char* path, uint8_t* out, ssize_t* size_out) { std::regex regexLib("^([a-f0-9]{32}|[a-f0-9 ]{47})$", std::regex_constants::egrep); - FILE* file; + FILE* file = NULL; try { bool bom = ini_detect_bom(path); {