This is an automated email from Gerrit.

Christopher Head (ch...@zaber.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/4606

-- gerrit

commit d292ebfe28d50162d1ab0a55db884e27f326e950
Author: Christopher Head <ch...@zaber.com>
Date:   Tue Jul 17 13:59:38 2018 -0700

    target/cortex_m: make a variable local
    
    The vec_ids variable is not referenced anywhere other than the vector
    catch command handler. Make it local to that function.
    
    Change-Id: Ie5865e8f78698c19a09f0b9d58269ced1c9db440
    Signed-off-by: Christopher Head <ch...@zaber.com>

diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index d1afbd5..09bebf7 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -2274,20 +2274,6 @@ static int cortex_m_verify_pointer(struct 
command_context *cmd_ctx,
  * cortexm3_target structure, which is only used with CM3 targets.
  */
 
-static const struct {
-       char name[10];
-       unsigned mask;
-} vec_ids[] = {
-       { "hard_err",   VC_HARDERR, },
-       { "int_err",    VC_INTERR, },
-       { "bus_err",    VC_BUSERR, },
-       { "state_err",  VC_STATERR, },
-       { "chk_err",    VC_CHKERR, },
-       { "nocp_err",   VC_NOCPERR, },
-       { "mm_err",     VC_MMERR, },
-       { "reset",      VC_CORERESET, },
-};
-
 COMMAND_HANDLER(handle_cortex_m_vector_catch_command)
 {
        struct target *target = get_current_target(CMD_CTX);
@@ -2296,6 +2282,20 @@ COMMAND_HANDLER(handle_cortex_m_vector_catch_command)
        uint32_t demcr = 0;
        int retval;
 
+       static const struct {
+               char name[10];
+               unsigned mask;
+       } vec_ids[] = {
+               { "hard_err",   VC_HARDERR, },
+               { "int_err",    VC_INTERR, },
+               { "bus_err",    VC_BUSERR, },
+               { "state_err",  VC_STATERR, },
+               { "chk_err",    VC_CHKERR, },
+               { "nocp_err",   VC_NOCPERR, },
+               { "mm_err",     VC_MMERR, },
+               { "reset",      VC_CORERESET, },
+       };
+
        retval = cortex_m_verify_pointer(CMD_CTX, cortex_m);
        if (retval != ERROR_OK)
                return retval;

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to