diff --git a/emulator/vhci.c b/emulator/vhci.c
index 52876ba..8fddef7 100644
--- a/emulator/vhci.c
+++ b/emulator/vhci.c
#include "btdev.h"
#include "vhci.h"
+#define uninitialized_var(x) x = x
+
struct vhci {
enum vhci_type type;
int fd;
struct vhci *vhci_open(enum vhci_type type)
{
struct vhci *vhci;
+ enum btdev_type uninitialized_var(btdev_type);
switch (type) {
+ case VHCI_TYPE_BREDRLE:
+ btdev_type = BTDEV_TYPE_BREDRLE;
+ break;
case VHCI_TYPE_BREDR:
+ btdev_type = BTDEV_TYPE_BREDR;
+ break;
+ case VHCI_TYPE_LE:
+ btdev_type = BTDEV_TYPE_LE;
break;
case VHCI_TYPE_AMP:
return NULL;
return NULL;
}
- vhci->btdev = btdev_create(BTDEV_TYPE_BREDR, 0x23);
+ vhci->btdev = btdev_create(btdev_type, 0x23);
if (!vhci->btdev) {
close(vhci->fd);
free(vhci);
diff --git a/emulator/vhci.h b/emulator/vhci.h
index a9d8069..b9ae63f 100644
--- a/emulator/vhci.h
+++ b/emulator/vhci.h
#include <stdint.h>
enum vhci_type {
+ VHCI_TYPE_BREDRLE,
VHCI_TYPE_BREDR,
+ VHCI_TYPE_LE,
VHCI_TYPE_AMP,
};