[Lldb-commits] [lldb] r235131 - Surround assignments w/ parenthesis to avoid mistakes.

Davide Italiano davide at freebsd.org
Thu Apr 16 11:44:36 PDT 2015


Author: davide
Date: Thu Apr 16 13:44:35 2015
New Revision: 235131

URL: http://llvm.org/viewvc/llvm-project?rev=235131&view=rev
Log:
Surround assignments w/ parenthesis to avoid mistakes.

This also silences a warning.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=235131&r1=235130&r2=235131&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Apr 16 13:44:35 2015
@@ -3682,18 +3682,18 @@ parseRegisters (xmlDocPtr doc, GDBServer
         GdbServerRegisterInfo reg;
         reg.clear( );
 
-        if ( attr = xmlExFindAttribute( regs[i], "name" ) ) {
+        if ( ( attr = xmlExFindAttribute( regs[i], "name" ) ) ) {
             reg.m_name = xmlExGetTextContent( attr ).c_str();
             reg.m_flags.m_has_name = true;
         }
 
-        if ( attr = xmlExFindAttribute( regs[i], "bitsize" ) ) {
+        if ( ( attr = xmlExFindAttribute( regs[i], "bitsize" ) ) ) {
             const std::string v = xmlExGetTextContent( attr );
             reg.m_bitSize = atoi( v.c_str( ) );
             reg.m_flags.m_has_bitSize = true;
         }
 
-        if ( attr = xmlExFindAttribute( regs[i], "type" ) ) {
+        if ( ( attr = xmlExFindAttribute( regs[i], "type" ) ) ) {
             const std::string v = xmlExGetTextContent( attr );
             reg.m_type = GdbServerRegisterInfo::eUnknown;
 
@@ -3708,12 +3708,12 @@ parseRegisters (xmlDocPtr doc, GDBServer
             reg.m_flags.m_has_type = (reg.m_type != GdbServerRegisterInfo::eUnknown);
         }
 
-        if ( attr = xmlExFindAttribute( regs[i], "group" ) ) {
+        if ( ( attr = xmlExFindAttribute( regs[i], "group" ) ) ) {
             reg.m_group = xmlExGetTextContent( attr );
             reg.m_flags.m_has_group = true;
         }
 
-        if ( attr = xmlExFindAttribute( regs[i], "regnum" ) ) {
+        if ( ( attr = xmlExFindAttribute( regs[i], "regnum" ) ) ) {
             const std::string v = xmlExGetTextContent( attr );
             reg.m_regNum = atoi( v.c_str( ) );
             reg.m_flags.m_has_regNum = true;





More information about the lldb-commits mailing list