This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8053

-- gerrit

commit 8ce85065a9e0cc4d8ac6d7b13ef99f7177d116a9
Author: Antonio Borneo <antonio.bor...@foss.st.com>
Date:   Sun Aug 6 10:40:03 2023 +0200

    helper/command: drop unused variables
    
    In both functions script_debug() and script_command_args_alloc()
    the variable len is never used, and Jim_GetString() does not
    mandate it.
    
    Drop the variable and pass NULL to Jim_GetString().
    
    Change-Id: I754b27a59c6087cde729496be42609d2a7145b0c
    Signed-off-by: Antonio Borneo <antonio.bor...@foss.st.com>

diff --git a/src/helper/command.c b/src/helper/command.c
index ef50ab5bd0..96023336c9 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -145,8 +145,7 @@ static void script_debug(Jim_Interp *interp, unsigned int 
argc, Jim_Obj * const
 
        char *dbg = alloc_printf("command -");
        for (unsigned i = 0; i < argc; i++) {
-               int len;
-               const char *w = Jim_GetString(argv[i], &len);
+               const char *w = Jim_GetString(argv[i], NULL);
                char *t = alloc_printf("%s %s", dbg, w);
                free(dbg);
                dbg = t;
@@ -171,8 +170,7 @@ static char **script_command_args_alloc(
 
        unsigned i;
        for (i = 0; i < argc; i++) {
-               int len;
-               const char *w = Jim_GetString(argv[i], &len);
+               const char *w = Jim_GetString(argv[i], NULL);
                words[i] = strdup(w);
                if (!words[i]) {
                        script_command_args_free(words, i);

-- 

Reply via email to