Fix -Wsign-compare issues.

(Use %u not %d for unsigned ints.)
This commit is contained in:
lukem 2009-04-15 00:32:23 +00:00
parent 7affd6558f
commit 4d8dfd66df
7 changed files with 20 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: btattach.c,v 1.2 2008/07/21 13:36:57 lukem Exp $ */
/* $NetBSD: btattach.c,v 1.3 2009/04/15 00:32:23 lukem Exp $ */
/*-
* Copyright (c) 2008 Iain Hibbert
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008 Iain Hibbert. All rights reserved.");
__RCSID("$NetBSD: btattach.c,v 1.2 2008/07/21 13:36:57 lukem Exp $");
__RCSID("$NetBSD: btattach.c,v 1.3 2009/04/15 00:32:23 lukem Exp $");
#include <sys/ioctl.h>
#include <sys/param.h>
@ -265,7 +265,7 @@ main(int argc, char *argv[])
static void
usage(void)
{
int i;
size_t i;
fprintf(stderr,
"Usage: %s [-dfop] [-i speed] [type] tty speed\n"

View File

@ -1,4 +1,4 @@
/* $NetBSD: btattach.h,v 1.1 2008/04/15 11:17:48 plunky Exp $ */
/* $NetBSD: btattach.h,v 1.2 2009/04/15 00:32:23 lukem Exp $ */
/*-
* Copyright (c) 2008 Iain Hibbert
@ -36,7 +36,7 @@ struct devtype {
const char * descr; /* long description */
devinit_t * init; /* init function */
tcflag_t cflag; /* default cflags */
int speed; /* default baudrate */
unsigned int speed; /* default baudrate */
};
devinit_t init_bcm2035;

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_bcm2035.c,v 1.1 2008/04/15 11:17:48 plunky Exp $ */
/* $NetBSD: init_bcm2035.c,v 1.2 2009/04/15 00:32:23 lukem Exp $ */
/*-
* Copyright (c) 2008 Iain Hibbert
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: init_bcm2035.c,v 1.1 2008/04/15 11:17:48 plunky Exp $");
__RCSID("$NetBSD: init_bcm2035.c,v 1.2 2009/04/15 00:32:23 lukem Exp $");
#include <bluetooth.h>
#include <err.h>
@ -66,7 +66,7 @@ init_bcm2035(int fd, unsigned int speed)
case B460800: rate = 0xfd22; break;
case B921600: rate = 0xff55; break;
default:
errx(EXIT_FAILURE, "invalid speed for bcm2035: %d\n", speed);
errx(EXIT_FAILURE, "invalid speed for bcm2035: %u\n", speed);
};
rate = htole16(rate);

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_digi.c,v 1.1 2008/04/15 11:17:48 plunky Exp $ */
/* $NetBSD: init_digi.c,v 1.2 2009/04/15 00:32:23 lukem Exp $ */
/*-
* Copyright (c) 2008 Iain Hibbert
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: init_digi.c,v 1.1 2008/04/15 11:17:48 plunky Exp $");
__RCSID("$NetBSD: init_digi.c,v 1.2 2009/04/15 00:32:23 lukem Exp $");
#include <bluetooth.h>
#include <err.h>
@ -53,7 +53,7 @@ init_digi(int fd, unsigned int speed)
case B57600: rate = 0x08; break;
case B115200: rate = 0x09; break;
default:
errx(EXIT_FAILURE, "invalid speed for digi: %d\n", speed);
errx(EXIT_FAILURE, "invalid speed for digi: %u\n", speed);
}
uart_send_cmd(fd, HCI_CMD_DIGIANSWER_SET_UART_BAUD_RATE, &rate, sizeof(rate));

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_ericsson.c,v 1.1 2008/04/15 11:17:48 plunky Exp $ */
/* $NetBSD: init_ericsson.c,v 1.2 2009/04/15 00:32:23 lukem Exp $ */
/*-
* Copyright (c) 2008 Iain Hibbert
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: init_ericsson.c,v 1.1 2008/04/15 11:17:48 plunky Exp $");
__RCSID("$NetBSD: init_ericsson.c,v 1.2 2009/04/15 00:32:23 lukem Exp $");
#include <bluetooth.h>
#include <err.h>
@ -78,7 +78,7 @@ init_ericsson(int fd, unsigned int speed)
case 300000: rate = 0x27; break;
case 400000: rate = 0x2b; break;
default:
errx(EXIT_FAILURE, "invalid speed for ericsson: %d\n", speed);
errx(EXIT_FAILURE, "invalid speed for ericsson: %u\n", speed);
}
uart_send_cmd(fd, HCI_CMD_ERICSSON_SET_UART_BAUD_RATE, &rate, sizeof(rate));

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_st.c,v 1.1 2008/04/15 11:17:48 plunky Exp $ */
/* $NetBSD: init_st.c,v 1.2 2009/04/15 00:32:23 lukem Exp $ */
/*-
* Copyright (c) 2008 Iain Hibbert
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: init_st.c,v 1.1 2008/04/15 11:17:48 plunky Exp $");
__RCSID("$NetBSD: init_st.c,v 1.2 2009/04/15 00:32:23 lukem Exp $");
#include <bluetooth.h>
#include <err.h>
@ -59,7 +59,7 @@ init_st(int fd, unsigned int speed)
case B460800: rate = 0x13; break;
case B921600: rate = 0x14; break;
default:
errx(EXIT_FAILURE, "invalid speed for st: %d\n", speed);
errx(EXIT_FAILURE, "invalid speed for st: %u\n", speed);
}
uart_send_cmd(fd, HCI_CMD_ST_SET_UART_BAUD_RATE, &rate, sizeof(rate));

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_swave.c,v 1.1 2008/04/15 11:17:48 plunky Exp $ */
/* $NetBSD: init_swave.c,v 1.2 2009/04/15 00:32:23 lukem Exp $ */
/*-
* Copyright (c) 2008 Iain Hibbert
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: init_swave.c,v 1.1 2008/04/15 11:17:48 plunky Exp $");
__RCSID("$NetBSD: init_swave.c,v 1.2 2009/04/15 00:32:23 lukem Exp $");
#include <bluetooth.h>
#include <err.h>
@ -78,7 +78,7 @@ init_swave(int fd, unsigned int speed)
case B57600: cp.transport_rate = 0x01; break;
case B115200: cp.transport_rate = 0x00; break;
default:
errx(EXIT_FAILURE, "invalid speed for swave: %d\n", speed);
errx(EXIT_FAILURE, "invalid speed for swave: %u\n", speed);
}
uart_send_cmd(fd, HCI_CMD_SWAVE_PARAM_ACCESS_SET, &cp, sizeof(cp));