[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/tree-sitter 3069849bd4 4/4: * src/treesit.c (treesit_load_langua
From: |
Po Lu |
Subject: |
feature/tree-sitter 3069849bd4 4/4: * src/treesit.c (treesit_load_language): Fix uninitialized uses. |
Date: |
Mon, 21 Nov 2022 01:10:37 -0500 (EST) |
branch: feature/tree-sitter
commit 3069849bd4c1048a8f8c0467d26560fad939e791
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
* src/treesit.c (treesit_load_language): Fix uninitialized uses.
---
src/treesit.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/treesit.c b/src/treesit.c
index 291698e4e4..599a9b883e 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -554,9 +554,11 @@ treesit_load_language (Lisp_Object language_symbol,
when succeed, record the error message and try the next one when
fail. */
dynlib_handle_ptr handle;
- char const *error;
+ const char *error;
tail = path_candidates;
+ error = NULL;
+ handle = NULL;
FOR_EACH_TAIL (tail)
{
@@ -568,6 +570,9 @@ treesit_load_language (Lisp_Object language_symbol,
break;
}
+ /* ??? */
+ eassume (handle != NULL);
+
if (error != NULL)
{
*signal_symbol = Qtreesit_load_language_error;