From 623528042506bf847008f8f6401ca3007169b065 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Sat, 11 May 2013 09:02:01 +0200 Subject: [PATCH] libgnu.so: Fix GCC4.8 narrowing conversion warnings Signed-off-by: Jerome Duval --- src/libs/gnu/xattr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/gnu/xattr.cpp b/src/libs/gnu/xattr.cpp index fadb573112..9873018ac6 100644 --- a/src/libs/gnu/xattr.cpp +++ b/src/libs/gnu/xattr.cpp @@ -43,7 +43,9 @@ struct AttributeName { // printable, just use them as the type string, otherwise convert // to hex char typeString[9]; - uint8 typeBytes[4] = { type >> 24, type >> 16, type >> 8, type }; + uint8 typeBytes[4] = { (uint8)((type >> 24) & 0xff), + (uint8)((type >> 16) & 0xff), (uint8)((type >> 8) & 0xff), + (uint8)(type & 0xff) }; if (isprint(typeBytes[0]) && isprint(typeBytes[1]) && isprint(typeBytes[2]) && isprint(typeBytes[3])) { typeString[0] = typeBytes[0];