Hi,

  I'm running Debian, with GCC 4.3.3 and am current getting a
compilation error while compiling Chromium:

cc1plus: warnings being treated as errors
chromium/src/net/base/net_util.cc: In function
'bool<unnamed>::IsIDNComponentSafe(const char16*, int, const
std::wstring&)':
chromium/src/net/base/net_util.cc:641: error: suggest parentheses
around assignment used as truth value
scons: *** [chromium/src/sconsbuild/Release/obj/net/base/net_util.o]
Error 1

   The code in question was introduced at revision 21963. The obvious
patch (below) fixes the issue for me.
However, without understanding the code, I can't be sure the typo as
actually to change "=" to "==".
Since we return 'safe', I assumed that the assignment was what was
intended.

   Cheers,

                     Livio

Index: net/base/net_util.cc
===================================================================
--- net/base/net_util.cc        (revision 22072)
+++ net/base/net_util.cc        (working copy)
@@ -638,7 +638,7 @@
   std::string languages_list(WideToASCII(languages));
   StringTokenizer t(languages_list, ",");
   while (t.GetNext()) {
-    if (safe = IsComponentCoveredByLang(component_characters, t.token
()))
+    if ((safe = IsComponentCoveredByLang(component_characters, t.token
())))
       break;
   }
   return safe;

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to