]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/treesit.c (treesit_load_language): Fix uninitialized uses.
authorPo Lu <luangruo@yahoo.com>
Mon, 21 Nov 2022 05:24:15 +0000 (13:24 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 21 Nov 2022 06:10:21 +0000 (14:10 +0800)
src/treesit.c

index 291698e4e4368eda05aeb94d42fed486cc6df31e..599a9b883ef8decd209d948b65578f147e4108d5 100644 (file)
@@ -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;