Bug 617267 - xpcom/io/nsWildCard.cpp(212) : warning C4244: '=' : conversion from 'const PRUnichar' to 'char', possible loss of data
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 28 Mar 2011 17:26:31 -0400
changeset 64114 87c1707e48720ceadbf4936cd5246d3fdda97855
parent 64113 f80a7ebc68c129d6130c780edf3a09d57abcbbfc
child 64115 a52e34d1bb4e9b6cdd28383b1d3c53c904158a1d
push idunknown
push userunknown
push dateunknown
bugs617267
milestone2.2a1pre
Bug 617267 - xpcom/io/nsWildCard.cpp(212) : warning C4244: '=' : conversion from 'const PRUnichar' to 'char', possible loss of data
xpcom/io/nsWildCard.cpp
--- a/xpcom/io/nsWildCard.cpp
+++ b/xpcom/io/nsWildCard.cpp
@@ -202,17 +202,17 @@ static int
  * Return index in input string of first stop found, or ABORTED if not found.
  * If "dest" is non-NULL, copy counted characters to it and NUL terminate.
  */
 template<class T>
 static int
 _scan_and_copy(const T *expr, T stop1, T stop2, T *dest)
 {
     register int sx;     /* source index */
-    register char cc;
+    register T cc;
 
     for (sx = 0; (cc = expr[sx]) && cc != stop1 && cc != stop2; sx++) {
         if (cc == '\\') {
             if (!expr[++sx])
                 return ABORTED; /* should be impossible */
         }
         else if (cc == '[') {
             while ((cc = expr[++sx]) && cc != ']') {