[libdvdnav-devel] src/nav_print.c: Fix several printf format strings

Andrew Clayton git at videolan.org
Fri Oct 24 16:29:25 CEST 2014


libdvdread | branch: master | Andrew Clayton <andrew at digital-domain.net> | Fri Oct 24 15:21:35 2014 +0100| [4d5cb54738bc79cbfd3ada4345eddd4b40d1ddb0] | committer: Jean-Baptiste Kempf

src/nav_print.c: Fix several printf format strings

There were several printf()'s in navPrint_HL_GI() & navPrint_BTNIT()
that were printing unsigned int's but were using %d for the format
specifier.

Signed-off-by: Andrew Clayton <andrew at digital-domain.net>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=4d5cb54738bc79cbfd3ada4345eddd4b40d1ddb0
---

 src/nav_print.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/nav_print.c b/src/nav_print.c
index 28e4abd..5a6a34d 100644
--- a/src/nav_print.c
+++ b/src/nav_print.c
@@ -82,7 +82,7 @@ static void navPrint_HL_GI(hl_gi_t *hl_gi, int *btngr_ns, int *btn_ns) {
   printf("btn_se_e_ptm  0x%08x\n", hl_gi->btn_se_e_ptm);
 
   *btngr_ns = hl_gi->btngr_ns;
-  printf("btngr_ns      %d\n",  hl_gi->btngr_ns);
+  printf("btngr_ns      %u\n",  hl_gi->btngr_ns);
   printf("btngr%d_dsp_ty    0x%02x\n", 1, hl_gi->btngr1_dsp_ty);
   printf("btngr%d_dsp_ty    0x%02x\n", 2, hl_gi->btngr2_dsp_ty);
   printf("btngr%d_dsp_ty    0x%02x\n", 3, hl_gi->btngr3_dsp_ty);
@@ -128,15 +128,15 @@ static void navPrint_BTNIT(btni_t *btni_table, int btngr_ns, int btn_ns) {
         btni_t *btni = &btni_table[(36 / btngr_ns) * i + j];
 
         printf("group %d btni %d:  ", i+1, j+1);
-        printf("btn_coln %d, auto_action_mode %d\n",
+        printf("btn_coln %u, auto_action_mode %u\n",
                btni->btn_coln, btni->auto_action_mode);
-        printf("coords   (%d, %d) .. (%d, %d)\n",
+        printf("coords   (%u, %u) .. (%u, %u)\n",
                btni->x_start, btni->y_start, btni->x_end, btni->y_end);
 
-        printf("up %d, ", btni->up);
-        printf("down %d, ", btni->down);
-        printf("left %d, ", btni->left);
-        printf("right %d\n", btni->right);
+        printf("up %u, ", btni->up);
+        printf("down %u, ", btni->down);
+        printf("left %u, ", btni->left);
+        printf("right %u\n", btni->right);
 
         /* ifoPrint_COMMAND(&btni->cmd); */
         printf("\n");



More information about the libdvdnav-devel mailing list