From 95a4e75423e2b2b6295f68f5fcc53eb9eac573da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= <joakim.nohlgard@eistec.se>
Date: Thu, 16 Feb 2017 17:10:06 +0100
Subject: [PATCH] msba2/tools: Fix cppcheck issues

---
 boards/msba2-common/tools/src/download.c | 2 +-
 boards/msba2-common/tools/src/ihex.c     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/boards/msba2-common/tools/src/download.c b/boards/msba2-common/tools/src/download.c
index 6a6229cdb7..3fa338d4e9 100644
--- a/boards/msba2-common/tools/src/download.c
+++ b/boards/msba2-common/tools/src/download.c
@@ -854,7 +854,7 @@ static void download_main(int event)
                         // bootloader again.  Intead, we need to download a tiny ARM
                         // program that reconfigures the hardware and then jumps to zero.
                         //snprintf(buf, sizeof(buf), "G %d A\r\n", 0);
-                        snprintf(buf, sizeof(buf), "W %u %d\r\n", chip->ram_addr, chip->bootprog[0] * 4);
+                        snprintf(buf, sizeof(buf), "W %u %u\r\n", chip->ram_addr, chip->bootprog[0] * 4);
                         xmit_cmd(buf, 4);
                         return;
 
diff --git a/boards/msba2-common/tools/src/ihex.c b/boards/msba2-common/tools/src/ihex.c
index 5db4cb7511..8d4965b9d5 100644
--- a/boards/msba2-common/tools/src/ihex.c
+++ b/boards/msba2-common/tools/src/ihex.c
@@ -120,8 +120,8 @@ int read_intel_hex(const char *filename)
 int
 parse_hex_line(char *line)
 {
-    int addr, code, num;
-    int sum, len, cksum, i;
+    unsigned int addr, code, num;
+    unsigned int sum, len, cksum, i;
     char *ptr;
 
     num = 0;
-- 
GitLab