From d04f5b1e2b474f732b5a9207481ad9b2adfe16c0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 22 Jan 2009 21:04:13 +0000 Subject: [PATCH] fix printf format string (size_t uses %zu, not %i) git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1422 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 2 ++ jtag/src/bsdl/bsdl_sem.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 7fc001fe..ee667aa2 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -2,6 +2,8 @@ * src/cmd/include.c: Include ctype.h for isalpha(). + * src/bsdl/bsdl_sem.c (create_register): Use %zu for size_t with printf(). + 2009-01-19 Kolja Waschk * doc/UrJTAG.txt, diff --git a/jtag/src/bsdl/bsdl_sem.c b/jtag/src/bsdl/bsdl_sem.c index c888c900..70a2d8a0 100644 --- a/jtag/src/bsdl/bsdl_sem.c +++ b/jtag/src/bsdl/bsdl_sem.c @@ -206,7 +206,7 @@ static int create_register( jtag_ctrl_t *jc, char *reg_name, size_t len) return 1; /* convert length information to string */ - snprintf( len_str, str_len, "%i", len ); + snprintf( len_str, str_len, "%zu", len ); if (jc->proc_mode & BSDL_MODE_INSTR_EXEC) cmd_run( jc->chain, cmd );