pkgsrc/sysutils/hcidump/patches/patch-aj
salo 5d435ece85 Initial import of hcidump-1.5.1: Bluetooth traffic dumper, similar to tcpdump
hcidump reads raw HCI data coming from and going to a Bluetooth device
and prints to screen commands, events and data in a human-readable form.
Optionally, the dump can be written to a file rather than parsed, and
the dump file can be parsed in a subsequent moment.

NetBSD support added and packaged by Iain D. Hibbert, via pkgsrc-wip.
2006-07-25 16:28:47 +00:00

68 lines
1.7 KiB
Text

$NetBSD: patch-aj,v 1.1.1.1 2006/07/25 16:28:48 salo Exp $
kill all the compiler warnings
--- parser/parser.c.orig 2003-09-13 00:38:11.000000000 +0100
+++ parser/parser.c
@@ -25,6 +25,7 @@
*/
#include <sys/types.h>
+#include <sys/time.h>
#include <netinet/in.h>
#include <ctype.h>
#include <stdio.h>
@@ -79,7 +80,7 @@ void p_indent(int level, struct frame *f
uint8_t get_u8(struct frame *frm)
{
- uint8_t *u8_ptr = frm->ptr;
+ uint8_t *u8_ptr = (void *)frm->ptr;
frm->ptr += 1;
frm->len -= 1;
return *u8_ptr;
@@ -87,7 +88,7 @@ uint8_t get_u8(struct frame *frm)
uint16_t get_u16(struct frame *frm)
{
- uint16_t *u16_ptr = frm->ptr;
+ uint16_t *u16_ptr = (void *)frm->ptr;
frm->ptr += 2;
frm->len -= 2;
return ntohs(get_unaligned(u16_ptr));
@@ -95,7 +96,7 @@ uint16_t get_u16(struct frame *frm)
uint32_t get_u32(struct frame *frm)
{
- uint32_t *u32_ptr = frm->ptr;
+ uint32_t *u32_ptr = (void *)frm->ptr;
frm->ptr += 4;
frm->len -= 4;
return ntohl(get_unaligned(u32_ptr));
@@ -103,7 +104,7 @@ uint32_t get_u32(struct frame *frm)
uint64_t get_u64(struct frame *frm)
{
- uint64_t *u64_ptr = frm->ptr;
+ uint64_t *u64_ptr = (void *)frm->ptr;
uint64_t u64 = get_unaligned(u64_ptr), tmp;
frm->ptr += 8;
frm->len -= 8;
@@ -120,7 +121,7 @@ void get_u128(struct frame *frm, uint64_
static void hex_dump(int level, struct frame *frm, int num)
{
- unsigned char *buf = frm->ptr;
+ unsigned char *buf = (void *)frm->ptr;
register int i,n;
if ((num < 0) || (num > frm->len))
@@ -141,7 +142,7 @@ static void hex_dump(int level, struct f
static void ascii_dump(int level, struct frame *frm, int num)
{
- unsigned char *buf = frm->ptr;
+ unsigned char *buf = (void *)frm->ptr;
register int i,n;
if ((num < 0) || (num > frm->len))