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
Loading
Please register or sign in to comment