From: Yuan Fu <casouri@gmail.com>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: feature/tree-sitter 3069849bd4 4/4: * src/treesit.c (treesit_load_language): Fix uninitialized uses.
Date: Mon, 21 Nov 2022 01:37:13 -0800 [thread overview]
Message-ID: <A9F22D1E-776A-4082-80F4-BF77481DE330@gmail.com> (raw)
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;
Thanks for working on this. What does ??? mean? Why do we assume handle is not NULL?
next reply other threads:[~2022-11-21 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 9:37 Yuan Fu [this message]
2022-11-21 11:59 ` feature/tree-sitter 3069849bd4 4/4: * src/treesit.c (treesit_load_language): Fix uninitialized uses Po Lu
2022-11-23 1:52 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A9F22D1E-776A-4082-80F4-BF77481DE330@gmail.com \
--to=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.