From c412298cde41abce436025272027f58db3961616 Mon Sep 17 00:00:00 2001 From: "ucag.li" Date: Fri, 23 Aug 2024 03:49:45 +0800 Subject: [PATCH] set NULL to ggml_context pointer to pass assert check in in case some compiler does not set uninitialized pointer to NULL for mnist example --- examples/mnist/mnist-common.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mnist/mnist-common.cpp b/examples/mnist/mnist-common.cpp index cbed894ce..87666c02b 100644 --- a/examples/mnist/mnist-common.cpp +++ b/examples/mnist/mnist-common.cpp @@ -74,8 +74,8 @@ mnist_eval_result mnist_graph_eval(const std::string & fname, const float * imag fprintf(stderr, "%s: trying to load a ggml graph from %s\n", __func__, fname.c_str()); mnist_eval_result result; - struct ggml_context * ctx_data; - struct ggml_context * ctx_eval; + struct ggml_context * ctx_data = NULL; + struct ggml_context * ctx_eval = NULL; struct ggml_cgraph * gf; {