This is an automated email from Gerrit.

?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/143

-- gerrit

commit 87ad830a0b9f6e2d8104f93f3e074b92aba4ef5f
Author: Øyvind Harboe <oyvind.har...@zylin.com>
Date:   Mon Oct 31 21:26:28 2011 +0100

    warning fix: add self-consitency check to remove warning
    
    verify promise of code that more code can be pasted with an
    assert at the end condition of the code passage that builds
    string.
    
    Change-Id: I76a4e5f91b9142fff932e1493cb43c29eb6a0f80
    Signed-off-by: Øyvind Harboe <oyvind.har...@zylin.com>

diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index 8a59fd3..f3732f1 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -198,6 +198,8 @@ int gdb_thread_packet(struct connection *connection, char 
*packet, int packet_si
                                tmp_str_ptr += sprintf( tmp_str_ptr, " : %s", 
detail->extra_info_str );
                        }
 
+                       assert(strlen(tmp_str) == (size_t) (tmp_str_ptr - 
tmp_str));
+
                        char * hex_str = (char*) malloc( strlen(tmp_str)*2 +1 );
                        str_to_hex( hex_str, tmp_str );
 

-- 
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to