Silence sign-conversion warning
In this case, we're loading an int into a char. Given that we're
building a hex string, this is intended, and can never overflow, but
this conversion causes a warning about implicit conversions.
Make the conversion explicit by wrapping in a static_cast.
Change-Id: I4c103afcaad2943f339413e1ecdd934677805dad
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/src/message/native_types.cpp b/src/message/native_types.cpp
index 08ccd02..bdb9354 100644
--- a/src/message/native_types.cpp
+++ b/src/message/native_types.cpp
@@ -88,7 +88,7 @@
{
return "";
}
- out.append(1, (ch << 4) | cl);
+ out.append(1, static_cast<char>((ch << 4) | cl));
i += 2;
}
return out;