sigaction
diff --git a/profiles/audioOverBle/btvoice.c b/profiles/audioOverBle/btvoice.c
index a64b66f..bbae128 100644
--- a/profiles/audioOverBle/btvoice.c
+++ b/profiles/audioOverBle/btvoice.c
@@ -25,7 +25,8 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-
+#include <pthread.h>
+#include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdbool.h>
@@ -118,12 +119,12 @@
 
 static void audio_value_cb(const uint8_t *pdu, uint16_t len,
                            gpointer user_data) {
-  struct audiostream *audiostream = user_data;
-  struct btvoice_device *btvoicedev = audiostream->btvoicedev;
+  // struct audiostream *audiostream = user_data;
+  // struct btvoice_device *btvoicedev = audiostream->btvoicedev;
   static int PrevSeqNum = 0;
   static int nbFrameLost, nbFrameReceived;
 
-  static uint8_t SeqNum, i;
+  static uint8_t SeqNum;
   SeqNum = (pdu[3] >> 3) & 0x1F;
   uint8_t frameType = pdu[3] & 0x07;
 
@@ -175,6 +176,13 @@
     //(22) 0x%x ", len, frameType, pdu[0], pdu[1], pdu[2], pdu[3], pdu[4],
     //pdu[5], pdu[6], pdu[7], pdu[8], pdu[9], pdu[10], pdu[11], pdu[12],
     //pdu[len-4], pdu[len-3], pdu[len-2], pdu[len-1]);
+    const struct sigaction ignore = {
+      .sa_handler = SIG_IGN,
+    };
+    int result = sigaction(SIGPIPE, &ignore, NULL);
+    if (result != 0) {
+      perror("sigaction:");
+    }
 
     pthread_mutex_lock(&audio_mutex);
     {
@@ -204,7 +212,7 @@
 static void audio_ccc_written_cb(guint8 status, const guint8 *pdu, guint16 plen,
                                  gpointer user_data) {
   struct audiostream *audiostream = user_data;
-  struct btvoice_device *btvoicedev = audiostream->btvoicedev;
+  // struct btvoice_device *btvoicedev = audiostream->btvoicedev;
 
   if (status != 0) {
     error("Write audio characteristic descriptor failed: %s",
@@ -252,13 +260,13 @@
 static void discover_descriptor_cb(uint8_t status, GSList *descs,
                                    void *user_data) {
   struct audiostream *report;
-  struct btvoice_device *btvoicedev;
-  struct att_data_list *list = NULL;
+  // struct btvoice_device *btvoicedev;
+  // struct att_data_list *list = NULL;
   GAttrib *attrib = NULL;
-  uint8_t format;
-  uint16_t handle = 0xffff;
-  uint16_t uuid16;
-  int i;
+  // uint8_t format;
+  // uint16_t handle = 0xffff;
+  // uint16_t uuid16;
+  // int i;
 
   if (status != 0) {
     error("Discover all characteristic descriptors failed: %s",
@@ -300,7 +308,7 @@
 
 static void char_discovered_cb(guint8 status, GSList *chars, void *user_data) {
   struct btvoice_device *btvoicedev = user_data;
-  struct gatt_primary *prim = btvoicedev->audioOverBle;
+  // struct gatt_primary *prim = btvoicedev->audioOverBle;
   bt_uuid_t audstart_uuid, audconfig_uuid, audstream_uuid;
   struct audiostream *audiostream;
   GSList *l;
@@ -430,7 +438,7 @@
 
 static void attio_disconnected_cb(gpointer user_data) {
   struct btvoice_device *btvoicedev = user_data;
-  const char *path = device_get_path(btvoicedev->device);
+  // const char *path = device_get_path(btvoicedev->device);
   GSList *l;
 
   for (l = btvoicedev->reports; l; l = l->next) {
@@ -445,9 +453,9 @@
 
 static struct btvoice_device *register_btvoicedevice(
     struct btd_device *device) {
-  const char *path = device_get_path(device);
+  // const char *path = device_get_path(device);
   struct btvoice_device *btvoicedev;
-  char *level;
+  // char *level;
   DBG("in");
 
   btvoicedev = find_btvoicedev(device);
@@ -517,7 +525,7 @@
 
 static void cleanup_btdevice(struct btvoice_device *btvoicedev) {
   struct btd_device *device = btvoicedev->device;
-  const char *path = device_get_path(device);
+  // const char *path = device_get_path(device);
 
   if (btvoicedev->audioOverBle != NULL) return;