Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bf55dfd authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge "system/osi: Remove UNUSED_ATTR" into main

parents a121c301 454db675
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#include "osi/include/allocator.h"
#include "osi/include/fixed_queue.h"
#include "osi/include/list.h"
#include "osi/include/osi.h"
#include "osi/include/thread.h"
#include "osi/include/wakelock.h"
#include "osi/semaphore.h"
@@ -593,7 +592,7 @@ static void alarm_ready_mloop(alarm_t* alarm) {
  alarm_ready_generic(alarm, lock);
}

static void alarm_queue_ready(fixed_queue_t* queue, UNUSED_ATTR void* context) {
static void alarm_queue_ready(fixed_queue_t* queue, void* /* context */) {
  log::assert_that(queue != NULL, "assert failed: queue != NULL");

  std::unique_lock<std::mutex> lock(alarms_mutex);
@@ -602,15 +601,13 @@ static void alarm_queue_ready(fixed_queue_t* queue, UNUSED_ATTR void* context) {
}

// Callback function for wake alarms and our posix timer
static void timer_callback(UNUSED_ATTR void* ptr) {
  semaphore_post(alarm_expired);
}
static void timer_callback(void* /* ptr */) { semaphore_post(alarm_expired); }

// Function running on |dispatcher_thread| that performs the following:
//   (1) Receives a signal using |alarm_exired| that the alarm has expired
//   (2) Dispatches the alarm callback for processing by the corresponding
// thread for that alarm.
static void callback_dispatch(UNUSED_ATTR void* context) {
static void callback_dispatch(void* /* context */) {
  while (true) {
    semaphore_wait(alarm_expired);
    if (!dispatcher_thread_active) break;
+1 −2
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
#include <bluetooth/log.h>

#include "osi/include/allocator.h"
#include "osi/include/osi.h"

using namespace bluetooth;

@@ -189,7 +188,7 @@ list_node_t* list_begin(const list_t* list) {
  return list->head;
}

list_node_t* list_end(UNUSED_ATTR const list_t* list) {
list_node_t* list_end(const list_t* list) {
  log::assert_that(list != NULL, "assert failed: list != NULL");
  return NULL;
}
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ error:
 * Used by AndroidSocketImpl
 */
int osi_socket_local_client_connect(int fd, const char* name, int namespaceId,
                                    int type UNUSED_ATTR) {
                                    int /* type */) {
  struct sockaddr_un addr;
  socklen_t alen;
  int err;
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ class AlarmTest : public ::testing::Test {
  }
};

static void cb(UNUSED_ATTR void* data) {
static void cb(void* /* data */) {
  ++cb_counter;
  semaphore_post(semaphore);
}
+1 −2
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@

#include "osi/include/allocator.h"
#include "osi/include/future.h"
#include "osi/include/osi.h"
#include "osi/include/thread.h"

static const size_t TEST_QUEUE_SIZE = 10;
@@ -36,7 +35,7 @@ static bool is_fd_readable(int fd) {
}

// Function for performing dequeue operations from the queue when is ready
static void fixed_queue_ready(fixed_queue_t* queue, UNUSED_ATTR void* context) {
static void fixed_queue_ready(fixed_queue_t* queue, void* /* context */) {
  void* msg = fixed_queue_try_dequeue(queue);
  EXPECT_TRUE(msg != NULL);
  future_ready(received_message_future, msg);