Bluetooth: AT: Fix building with newlib

Since the type of int, uint32_t, etc change with newlib we get the
following error:

subsys/bluetooth/host/at.c: In function ‘cme_handle’:
subsys/bluetooth/host/at.c:272:25: error: passing argument 2 of ‘at_get_number’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  if (!at_get_number(at, &val) && val <= CME_ERROR_NETWORK_NOT_ALLOWED) {
                         ^
subsys/bluetooth/host/at.c:46:5: note: expected ‘uint32_t * {aka long unsigned int *}’ but argument is of type ‘int *’
 int at_get_number(struct at_client *at, uint32_t *val)
     ^~~~~~~~~~~~~

We we can easily address by making val a uint32_t.

Change-Id: Ie6988368bd862afd4075baede7cb0a66c1628c18
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-04-14 14:35:58 -05:00 committed by Johan Hedberg
commit f52a0341ba

View file

@ -267,7 +267,7 @@ static int at_state_process_result(struct at_client *at, struct net_buf *buf)
int cme_handle(struct at_client *at) int cme_handle(struct at_client *at)
{ {
enum at_cme cme_err; enum at_cme cme_err;
int val; uint32_t val;
if (!at_get_number(at, &val) && val <= CME_ERROR_NETWORK_NOT_ALLOWED) { if (!at_get_number(at, &val) && val <= CME_ERROR_NETWORK_NOT_ALLOWED) {
cme_err = val; cme_err = val;