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

Commit 6b1036fd authored by Hannah.Hsu's avatar Hannah.Hsu Committed by Hannah Hsu
Browse files

Fix build error

Error message: frameworks/native/libs/binder/tests/binderRpcTest.cpp:1171:29:
error: comparison of integers of different signs: 'socklen_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]

Test Report:
Build pass with the following command
source build/envsetup.sh; lunch gambit-trunk_food-userdebug; m vts;

Bug: b/351059357

Change-Id: Ifdf72342f3683ea4b417507157c037e12cf4c937
parent f5883db7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1168,7 +1168,8 @@ bool testSupportVsockLoopback() {
    socklen_t len = sizeof(serverAddr);
    ret = getsockname(serverFd.get(), reinterpret_cast<sockaddr*>(&serverAddr), &len);
    LOG_ALWAYS_FATAL_IF(0 != ret, "Failed to getsockname: %s", strerror(errno));
    LOG_ALWAYS_FATAL_IF(len < sizeof(serverAddr), "getsockname didn't read the full addr struct");
    LOG_ALWAYS_FATAL_IF(len < static_cast<socklen_t>(sizeof(serverAddr)),
                        "getsockname didn't read the full addr struct");

    ret = TEMP_FAILURE_RETRY(listen(serverFd.get(), 1 /*backlog*/));
    LOG_ALWAYS_FATAL_IF(0 != ret, "Could not listen socket on port %u: %s", serverAddr.svm_port,