Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/bluetooth5 1a344896d -> 4cab05214


nimble/controller: Fix controller unit test

This fix following build error due to uint32_t being defined as 'unsigned int'
instead of 'unsigned long int'
Error: repos/apache-mynewt-core/net/nimble/controller/src/ble_ll.c: In function 
'ble_ll_log_dump_index':
repos/apache-mynewt-core/net/nimble/controller/src/ble_ll.c:1391:30: error: 
format '%u' expects argument
    of type 'unsigned int', but argument 2 has type 'uint32_t {aka long 
unsigned int}' [-Werror=format=]
     console_printf("cputime=%u id=%u a8=%u a16=%u a32=%u\n",
                              ^
repos/apache-mynewt-core/net/nimble/controller/src/ble_ll.c:1391:56: error: 
format '%u' expects argument
    of type 'unsigned int', but argument 6 has type 'uint32_t {aka long 
unsigned int}' [-Werror=format=]
     console_printf("cputime=%u id=%u a8=%u a16=%u a32=%u\n",
cc1: all warnings being treated as errors

This is just a quick workaround for now.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/34670d72
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/34670d72
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/34670d72

Branch: refs/heads/bluetooth5
Commit: 34670d729cec2d99b1408a74cb69d60364d8a867
Parents: 1a34489
Author: Szymon Janc <[email protected]>
Authored: Mon May 8 14:09:38 2017 +0200
Committer: Szymon Janc <[email protected]>
Committed: Mon May 8 14:10:54 2017 +0200

----------------------------------------------------------------------
 net/nimble/controller/src/ble_ll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/34670d72/net/nimble/controller/src/ble_ll.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll.c 
b/net/nimble/controller/src/ble_ll.c
index eb1534b..930b44e 100644
--- a/net/nimble/controller/src/ble_ll.c
+++ b/net/nimble/controller/src/ble_ll.c
@@ -1388,9 +1388,10 @@ ble_ll_log_dump_index(int i)
 
     log = &g_ble_ll_log[i];
 
+    /* TODO cast is a workaround until this is fixed properly */
     console_printf("cputime=%lu id=%u a8=%u a16=%u a32=%lu\n",
-                   log->cputime, log->log_id, log->log_a8,
-                   log->log_a16, log->log_a32);
+                   (unsigned long)log->cputime, log->log_id, log->log_a8,
+                   log->log_a16, (unsigned long)log->log_a32);
 }
 
 void

Reply via email to