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

Skip to content
Commit a1336cf0 authored by Alex Vakulenko's avatar Alex Vakulenko
Browse files

libbufferhub: Fix compiler warning with printf format mismatch

std::vector<bool>::at() does not return bool& but a special reference
proxy class. Passing this class on the stack for "%d" printf specifier
is unsafe.

Compiler throws a warning to indicate this problem:

    format specifies type 'int' but the argument has type 'reference'
    (aka '__bit_reference<std::__1::vector<bool, std::__1::allocator<bool>>>')

Fixed by explicitly casting to int before pushing the value onto the stack.

Bug: None
Test: `m -j32` = no more warning
Change-Id: I7b3bc4908e4932c25be60fc350e0e0b439842b66
parent 4782814b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment