From 7b513968ccd5eb6acbf1519f039c97e90c64678c Mon Sep 17 00:00:00 2001 From: icanhasmath Date: Mon, 23 Mar 2026 17:44:40 -0500 Subject: [PATCH] Fix C4703: initialize 'input' pointer to NULL Initialize FILE *input to NULL in run-parser-test-suite.c and run-emitter-test-suite.c to fix MSVC warning C4703 (potentially uninitialized local pointer variable used). Fixes yaml/libyaml#325 --- tests/run-emitter-test-suite.c | 2 +- tests/run-parser-test-suite.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/run-emitter-test-suite.c b/tests/run-emitter-test-suite.c index 950ad546..a87ce3b1 100644 --- a/tests/run-emitter-test-suite.c +++ b/tests/run-emitter-test-suite.c @@ -13,7 +13,7 @@ int usage(int ret); int main(int argc, char *argv[]) { - FILE *input; + FILE *input = NULL; yaml_emitter_t emitter; yaml_event_t event; yaml_version_directive_t *version_directive = NULL; diff --git a/tests/run-parser-test-suite.c b/tests/run-parser-test-suite.c index 5e29caff..a3540e3e 100644 --- a/tests/run-parser-test-suite.c +++ b/tests/run-parser-test-suite.c @@ -8,7 +8,7 @@ int usage(int ret); int main(int argc, char *argv[]) { - FILE *input; + FILE *input = NULL; yaml_parser_t parser; yaml_event_t event; int flow = -1; /** default no flow style collections */