summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-07-05 21:15:41 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-07-05 21:15:41 +0000
commit1f422e5f2b343d35a8c77ce4be16f74b2819b2bf (patch)
treee24bdebe86afcff3ce29cc0f47f05caec7ab7bc0 /test
parent952e7cc56afa29f77a828aa256985ba38a06fa80 (diff)
Fix some GCC 4.0 warnings
Diffstat (limited to 'test')
-rw-r--r--test/attest.c2
-rw-r--r--test/hstest.c3
-rw-r--r--test/l2test.c4
-rw-r--r--test/scotest.c7
4 files changed, 9 insertions, 7 deletions
diff --git a/test/attest.c b/test/attest.c
index cd0e93ca..6e7d3808 100644
--- a/test/attest.c
+++ b/test/attest.c
@@ -47,7 +47,7 @@ static int at_command(int fd, char *cmd, int to)
{
fd_set rfds;
struct timeval timeout;
- unsigned char buf[1024];
+ char buf[1024];
int sel, len, i, n;
write(fd, cmd, strlen(cmd));
diff --git a/test/hstest.c b/test/hstest.c
index f269621c..8949be4b 100644
--- a/test/hstest.c
+++ b/test/hstest.c
@@ -89,7 +89,8 @@ static int sco_connect(bdaddr_t *src, bdaddr_t *dst, uint16_t *handle, uint16_t
struct sockaddr_sco addr;
struct sco_conninfo conn;
struct sco_options opts;
- int s, size;
+ socklen_t size;
+ int s;
if ((s = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO)) < 0) {
return -1;
diff --git a/test/l2test.c b/test/l2test.c
index 8d337a9d..f475aa4b 100644
--- a/test/l2test.c
+++ b/test/l2test.c
@@ -131,7 +131,7 @@ static char *ctoh(char c, char* s)
return s;
}
-static void hexdump(char *s, unsigned long l)
+static void hexdump(unsigned char *s, unsigned long l)
{
char bfr[80];
char *pb;
@@ -477,7 +477,7 @@ static void dump_mode(int sk)
}
syslog(LOG_INFO, "Recevied %d bytes", len);
- hexdump(buf,len);
+ hexdump(buf, len);
}
}
diff --git a/test/scotest.c b/test/scotest.c
index 6447eab4..22a95fed 100644
--- a/test/scotest.c
+++ b/test/scotest.c
@@ -251,8 +251,9 @@ static void recv_mode(int sk)
static void send_mode(char *svr)
{
struct sco_options so;
+ socklen_t len;
uint32_t seq;
- int sk, i, opt;
+ int i, sk;
if ((sk = do_connect(svr)) < 0) {
syslog(LOG_ERR, "Can't connect to the server: %s (%d)",
@@ -260,8 +261,8 @@ static void send_mode(char *svr)
exit(1);
}
- opt = sizeof(so);
- if (getsockopt(sk, SOL_SCO, SCO_OPTIONS, &so, &opt) < 0) {
+ len = sizeof(so);
+ if (getsockopt(sk, SOL_SCO, SCO_OPTIONS, &so, &len) < 0) {
syslog(LOG_ERR, "Can't get SCO options: %s (%d)",
strerror(errno), errno);
exit(1);