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

Commit 1384d7c9 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Clean up unused param warnings unit tests am: 8744728c

parents 5321e8ce 8744728c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ TEST(StringsTest, string_format_time_with_ms_test) {
}

class ExampleClass {};
std::ostream& operator<<(std::ostream& os, const ExampleClass& obj) {
std::ostream& operator<<(std::ostream& os, const ExampleClass& /* obj */) {
  os << "ExampleClass";
  return os;
}
+3 −3
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ LogCapture* LogCapture::Rewind() {
  return this;
}

bool LogCapture::Find(const std::string& to_find) {
bool LogCapture::Find(const std::string& /* to_find */) {
  // For |atest| assume all log captures succeed
  return true;
}
@@ -63,7 +63,7 @@ size_t LogCapture::Size() const {
  return size;
}

void LogCapture::WaitUntilLogContains(const std::string& text) {}
void LogCapture::WaitUntilLogContains(const std::string& /* text */) {}

std::pair<int, int> LogCapture::create_backing_store() const {
  int dup_fd = -1;
@@ -71,7 +71,7 @@ std::pair<int, int> LogCapture::create_backing_store() const {
  return std::make_pair(dup_fd, fd);
}

bool LogCapture::set_non_blocking(int fd) const {
bool LogCapture::set_non_blocking(int /* fd */) const {
  return true;
}

+2 −2
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ namespace testing {

class BarTestDataClass : public DumpsysTestDataClass {
 public:
  TableAddFunction GetTable(flatbuffers::FlatBufferBuilder& fb_builder) override {
    return [](DumpsysTestDataRootBuilder* builder) {};
  TableAddFunction GetTable(flatbuffers::FlatBufferBuilder& /* fb_builder */) override {
    return [](DumpsysTestDataRootBuilder* /* builder */) {};
  }
};

+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ class TestHciHal : public hal::HciHal {

  void Stop() {}

  void ListDependencies(ModuleList*) const {}
  void ListDependencies(ModuleList* /* list */) const {}

  std::string ToString() const override {
    return std::string("TestHciHal");
+16 −11
Original line number Diff line number Diff line
@@ -233,7 +233,9 @@ TEST_F(SnoopLoggerSocketModuleTest, test_Write_fd_fail_on_Send_EINTR) {
  char data[10];
  int intr_count = 5;

  ON_CALL(mock, Send).WillByDefault(Invoke([&](int fd, const void* buf, size_t n, int flags) {
  ON_CALL(mock, Send)
      .WillByDefault(
          Invoke([&](int /* fd */, const void* /* buf */, size_t /* n */, int /* flags */) {
            if (intr_count > 0) {
              intr_count--;
              errno = EINTR;
@@ -313,7 +315,10 @@ TEST_F(SnoopLoggerSocketModuleTest, test_AcceptIncomingConnection_fail_on_accept
  int intr_count = 5;

  ON_CALL(mock, Accept(Eq(fd), _, _, _))
      .WillByDefault(Invoke([&](int fd, struct sockaddr* addr, socklen_t* addr_len, int flags) {
      .WillByDefault(Invoke([&](int /* fd */,
                                struct sockaddr* /* addr */,
                                socklen_t* /* addr_len */,
                                int /* flags */) {
        if (intr_count > 0) {
          intr_count--;
          errno = EINTR;
@@ -356,7 +361,7 @@ TEST_F(SnoopLoggerSocketModuleTest, test_AcceptIncomingConnection_success) {
TEST_F(SnoopLoggerSocketModuleTest, test_InitializeCommunications_fail_on_Pipe2) {
  int ret = -9;

  ON_CALL(mock, Pipe2(_, _)).WillByDefault(Invoke([ret](int* fds, int) { return ret; }));
  ON_CALL(mock, Pipe2(_, _)).WillByDefault(Invoke([ret](int* /* fds */, int) { return ret; }));
  EXPECT_CALL(mock, FDZero);
  EXPECT_CALL(mock, Pipe2(_, _));

Loading