This is an automated email from Gerrit.

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

-- gerrit

commit 2ecc97004c7e7c0adbcd8070eba5fdd7d430958f
Author: Andreas Fritiofson <[email protected]>
Date:   Sat Sep 28 23:33:59 2013 +0200

    ftdi: Remove unnecessary cast
    
    Also make sure future growth of the tap_get_tms_path() return value will
    get noticed.
    
    Change-Id: Id859b463e5fdc819a4bc3b4845bf4363fbe713af
    Signed-off-by: Andreas Fritiofson <[email protected]>

diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
index 4566ed3..a6070b1 100644
--- a/src/jtag/drivers/ftdi.c
+++ b/src/jtag/drivers/ftdi.c
@@ -205,8 +205,9 @@ static void move_to_state(tap_state_t goal_state)
        */
 
        /* do the 2 lookups */
-       int tms_bits  = tap_get_tms_path(start_state, goal_state);
+       uint8_t tms_bits  = tap_get_tms_path(start_state, goal_state);
        int tms_count = tap_get_tms_path_len(start_state, goal_state);
+       assert(tms_count <= 8);
 
        DEBUG_JTAG_IO("start=%s goal=%s", tap_state_name(start_state), 
tap_state_name(goal_state));
 
@@ -215,7 +216,7 @@ static void move_to_state(tap_state_t goal_state)
                tap_set_state(tap_state_transition(tap_get_state(), (tms_bits 
>> i) & 1));
 
        mpsse_clock_tms_cs_out(mpsse_ctx,
-               (uint8_t *)&tms_bits,
+               &tms_bits,
                0,
                tms_count,
                false,

-- 

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to