From 723650bb38bdf5d441e06dbd67cedc49a03babae Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Thu, 25 Aug 2011 20:27:37 +0200 Subject: [PATCH] Compilation fixups --- antlib.c | 9 +++------ fr60.c | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/antlib.c b/antlib.c index 6db4e9d..564f5f9 100644 --- a/antlib.c +++ b/antlib.c @@ -488,7 +488,7 @@ ANT_SetNetworkKeya(uchar net, uchar *key) uchar buf[9]; int i; - if (strlen(key) != 16) { + if (strlen((char*)key) != 16) { fprintf(stderr, "Bad key length %s\n", key); return 0; } @@ -502,7 +502,6 @@ uchar ANT_SetNetworkKey(uchar net, uchar *key) { uchar buf[9]; - int i; buf[0] = net; memcpy(buf+1, key, 8); @@ -571,7 +570,7 @@ ANT_SendAcknowledgedDataA(uchar chan, uchar *data) // ascii version uchar buf[9]; int i; - if (strlen(data) != 16) { + if (strlen((char*)data) != 16) { fprintf(stderr, "Bad data length %s\n", data); return 0; } @@ -585,7 +584,6 @@ uchar ANT_SendAcknowledgedData(uchar chan, uchar *data) { uchar buf[9]; - int i; buf[0] = chan; memcpy(buf+1, data, 8); @@ -601,7 +599,7 @@ ANT_SendBurstTransferA(uchar chan, uchar *data, ushort numpkts) int seq = 0; if (dbg) fprintf(stderr, "numpkts %d data %s\n", numpkts, data); - if (strlen(data) != 16*numpkts) { + if (strlen((char*)data) != 16*numpkts) { fprintf(stderr, "Bad data length %s numpkts %d\n", data, numpkts); return 0; } @@ -620,7 +618,6 @@ ushort ANT_SendBurstTransfer(uchar chan, uchar *data, ushort numpkts) { uchar buf[9]; - int i; int j; int seq = 0; diff --git a/fr60.c b/fr60.c index c924b97..eceebb5 100644 --- a/fr60.c +++ b/fr60.c @@ -34,7 +34,7 @@ static int donebind = 0; static int sentgetv; static char *fname = "garmin"; -static char ANTSPT_KEY[] = "A8A423B9F55E63C1"; // ANT+Sport key +static uchar ANTSPT_KEY[] = "A8A423B9F55E63C1"; // ANT+Sport key static uchar ebuf[MESG_DATA_SIZE]; // response event data gets stored here static uchar cbuf[MESG_DATA_SIZE]; // channel event data gets stored here -- 2.39.5