Bug 1259040 - fix compiler warning at nsMsgMaildirStore.cpp:66 related to const unsigned cast. r=BenC
authoraceman <acelists@atlas.sk>
Tue, 15 Jan 2019 15:00:00 +0100
changeset 33361 a77b11bc0dfc
parent 33360 e5d328de82da
child 33362 3ca205e21c25
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBenC
bugs1259040
Bug 1259040 - fix compiler warning at nsMsgMaildirStore.cpp:66 related to const unsigned cast. r=BenC
mailnews/local/src/nsMsgMaildirStore.cpp
--- a/mailnews/local/src/nsMsgMaildirStore.cpp
+++ b/mailnews/local/src/nsMsgMaildirStore.cpp
@@ -49,26 +49,26 @@ static mozilla::LazyLogModule MailDirLog
 // safely encoded as individual bytes.
 static void percentEncode(nsACString const& in, nsACString& out)
 {
   const char* end = in.EndReading();
   const char* cur;
   // We know the output will be at least as long as the input.
   out.SetLength(0);
   out.SetCapacity(in.Length());
-  for (cur = in.BeginReading(); cur != end; ++cur) {
+  for (cur = in.BeginReading(); cur < end; ++cur) {
     const char c = *cur;
     bool whitelisted = (c >= '0' && c <= '9') ||
       (c >= 'A' && c <= 'Z') ||
       (c >= 'a' && c <= 'z') ||
       c == '-' || c == '+' || c == '.' || c == '%' || c == '=' || c == '@' || c == '_';
     if (whitelisted) {
       out.Append(c);
     } else {
-      out.AppendPrintf("%%%02x", (const unsigned char)c);
+      out.AppendPrintf("%%%02x", (unsigned char)c);
     }
   }
 }
 
 nsMsgMaildirStore::nsMsgMaildirStore()
 {
 }