mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-27 06:04:32 +08:00
hcidump: Fix some GCC 4.0 warnings
This commit is contained in:
parent
59fa335e0e
commit
bb5d8eed4c
@ -532,7 +532,8 @@ static int wait_connection(in_addr_t addr, in_port_t port)
|
||||
{
|
||||
struct sockaddr_in sa;
|
||||
struct hostent *host;
|
||||
int sk, nsk, opt, len;
|
||||
socklen_t len;
|
||||
int sk, nsk, opt;
|
||||
|
||||
sk = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
if (sk < 0) {
|
||||
@ -564,7 +565,8 @@ static int wait_connection(in_addr_t addr, in_port_t port)
|
||||
}
|
||||
|
||||
len = sizeof(sa);
|
||||
if ((nsk = accept(sk, (struct sockaddr *) &sa, &len)) < 0) {
|
||||
nsk = accept(sk, (struct sockaddr *) &sa, &len);
|
||||
if (nsk < 0) {
|
||||
perror("Can't accept new inet socket");
|
||||
close(sk);
|
||||
exit(1);
|
||||
|
@ -143,9 +143,8 @@ static char *codec2str(uint8_t type, uint8_t codec)
|
||||
return "Reserved";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
static char *cat2str(uint8_t cat)
|
||||
|
@ -764,7 +764,7 @@ static void cmd_manufacturer(int level, uint8_t subcmd, struct frame *frm)
|
||||
frm->ptr += 4;
|
||||
frm->len -= 4;
|
||||
|
||||
if (!strncmp(id, "AVM!", 4)) {
|
||||
if (!strncmp((char *) id, "AVM!", 4)) {
|
||||
class = CAPI_U32(frm);
|
||||
func = CAPI_U32(frm);
|
||||
len = CAPI_U8(frm);
|
||||
|
@ -360,7 +360,7 @@ static inline void print_des(uint8_t de_type, int level, int n, struct frame *fr
|
||||
|
||||
static inline void print_de(int level, struct frame *frm, int *split, uint16_t *psm, uint8_t *channel)
|
||||
{
|
||||
int n;
|
||||
int n = 0;
|
||||
uint8_t de_type = parse_de_hdr(frm, &n);
|
||||
|
||||
switch (de_type) {
|
||||
@ -471,7 +471,7 @@ static inline void print_attr_list(int level, struct frame *frm)
|
||||
{
|
||||
uint16_t attr_id, psm;
|
||||
uint8_t channel;
|
||||
int len, n1, n2, split;
|
||||
int len, split, n1 = 0, n2 = 0;
|
||||
|
||||
if (parse_de_hdr(frm, &n1) == SDP_DE_SEQ) {
|
||||
len = frm->len;
|
||||
|
Loading…
Reference in New Issue
Block a user