| commit 85c5c356b9409cd92220519aab3ba88b5edd16e6 |
| Author: Hans Wennborg <hans@chromium.org> |
| Date: Mon Oct 23 08:54:35 2017 -0700 |
| |
| Fix Win/Clang -Wsign-compare warning |
| |
| enums are backed by signed integers by default on Windows, and Clang |
| (after r316268) would warn about comparing 'code', which is signed, with |
| sizeof(..) which is unsigned. |
| |
| Bug: 777363 |
| |
| diff --git a/third_party/expat/files/lib/xmlparse.c b/third_party/expat/files/lib/xmlparse.c |
| index 6d8dc1e33591..6ff81029ce29 100644 |
| --- a/third_party/expat/files/lib/xmlparse.c |
| +++ b/third_party/expat/files/lib/xmlparse.c |
| @@ -2426,7 +2426,7 @@ XML_ErrorString(enum XML_Error code) |
| XML_L("reserved prefix (xmlns) must not be declared or undeclared"), |
| XML_L("prefix must not be bound to one of the reserved namespace names") |
| }; |
| - if (code > 0 && code < sizeof(message)/sizeof(message[0])) |
| + if (code > 0 && (size_t)code < sizeof(message)/sizeof(message[0])) |
| return message[code]; |
| return NULL; |
| } |