This is an automated email from Gerrit.

Antonio Borneo ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5902

-- gerrit

commit 3565aa304af07d14c75d0127892fde2c6390762f
Author: Antonio Borneo <[email protected]>
Date:   Thu Oct 29 14:51:33 2020 +0100

    openocd: convert function setup_command_handler() to static
    
    The function setup_command_handler() was used in the eCos build of
    OpenOCD, thus it was exported and a comment was added to remark it
    should remain not-static. Unfortunately the comment was missing
    the relevant information of the special build that requires so.
    Also unusual is that there is no include file that declares the
    prototype of the function.
    
    The comment above the function was added in two steps, in commit
    ea3e49f4e22d ("fix embedded builds") and commit fb96b8607a0c
    ("openocd: setup_command_handler() must not be static"), again
    without info about the special build.
    Also the mailing list archive does not report any further detail.
    The only hint is in the first commit above that also adds a test
    on BUILD_ECOSBOARD in a #if.
    
    Commit 39650e2273bc ("ecosboard: delete bit-rotted eCos code")
    removes all the eCos code, that effectively includes the both the
    prototype and the call to the function setup_command_handler(),
        http://openocd.zylin.com/#/c/503/2/src/ecosboard.c@a1092
    but did not reverted the function to static.
    
    With all the 'external' uses of this function being dropped, set
    the function setup_command_handler() to static and remove the
    obsoleted and misleading comment.
    
    Change-Id: I4d6b83dec2a838119821189fc67949bfca070035
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/openocd.c b/src/openocd.c
index 8862284..604b36d 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -230,10 +230,7 @@ static int openocd_register_commands(struct 
command_context *cmd_ctx)
 
 struct command_context *global_cmd_ctx;
 
-/* NB! this fn can be invoked outside this file for non PC hosted builds
- * NB! do not change to 'static'!!!!
- */
-struct command_context *setup_command_handler(Jim_Interp *interp)
+static struct command_context *setup_command_handler(Jim_Interp *interp)
 {
        log_init();
        LOG_DEBUG("log_init: complete");

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to