summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-12-09 10:12:49 +0200
committerTor Lillqvist <tml@collabora.com>2013-12-09 10:12:49 +0200
commit74ca95edd1bd3c00cf314690fe22171ec93d6885 (patch)
treeb8e679ee7636713629ddc71808ba54bc9b703cf8
parent22aed8e030b5803cbfe5ac964bc6d8cdabf50875 (diff)
WaE: C4310: cast truncates constant value
Change-Id: I187382713aa85fa43e674f96e0a8cfb1f7ac0d03
-rw-r--r--filter/source/xmlfilterdetect/filterdetect.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index 27f173afaa80..0b36b3d78776 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -79,10 +79,10 @@ bool isXMLStream(const OString& aHeaderStrm)
size_t i = 0;
// Skip UTF-8 BOM
- const char sBOM[] = {(char)0xEF, (char)0xBB, (char)0xBF};
+ const unsigned char sBOM[] = {0xEF, 0xBB, 0xBF};
for (i = 0; i < n; ++i, ++p)
{
- if (i < 3 && *p == sBOM[i])
+ if (i < 3 && (unsigned char)(*p) == sBOM[i])
continue;
else if (i == 3 || i == 0)
break;