[Lldb-commits] [lldb] r247164 - Fix some compiler warnings.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 9 10:25:43 PDT 2015


Author: zturner
Date: Wed Sep  9 12:25:43 2015
New Revision: 247164

URL: http://llvm.org/viewvc/llvm-project?rev=247164&view=rev
Log:
Fix some compiler warnings.

Modified:
    lldb/trunk/source/Core/DataExtractor.cpp
    lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=247164&r1=247163&r2=247164&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Wed Sep  9 12:25:43 2015
@@ -653,7 +653,7 @@ DataExtractor::GetMaxU32 (offset_t *offs
     case 2: return GetU16(offset_ptr); break;
     case 4: return GetU32(offset_ptr); break;
     default:
-        assert("GetMaxU32 unhandled case!" == NULL);
+        assert(false && "GetMaxU32 unhandled case!");
         break;
     }
     return 0;
@@ -679,7 +679,7 @@ DataExtractor::GetMaxU64 (offset_t *offs
     case 4: return GetU32(offset_ptr); break;
     case 8: return GetU64(offset_ptr); break;
     default:
-        assert("GetMax64 unhandled case!" == NULL);
+        assert(false && "GetMax64 unhandled case!");
         break;
     }
     return 0;
@@ -695,7 +695,7 @@ DataExtractor::GetMaxU64_unchecked (offs
         case 4: return GetU32_unchecked (offset_ptr); break;
         case 8: return GetU64_unchecked (offset_ptr); break;
         default:
-            assert("GetMax64 unhandled case!" == NULL);
+            assert(false && "GetMax64 unhandled case!");
             break;
     }
     return 0;
@@ -711,7 +711,7 @@ DataExtractor::GetMaxS64 (offset_t *offs
     case 4: return (int32_t)GetU32(offset_ptr); break;
     case 8: return (int64_t)GetU64(offset_ptr); break;
     default:
-        assert("GetMax64 unhandled case!" == NULL);
+        assert(false && "GetMax64 unhandled case!");
         break;
     }
     return 0;

Modified: lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp?rev=247164&r1=247163&r2=247164&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp Wed Sep  9 12:25:43 2015
@@ -457,6 +457,7 @@ DumpValueObjectOptions::PointerDepth::Ca
                 return m_count > 0;
             return false;
     }
+    return false;
 }
 
 bool
@@ -471,6 +472,7 @@ DumpValueObjectOptions::PointerDepth::Ca
         case Mode::Never:
             return false;
     }
+    return false;
 }
 
 bool

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=247164&r1=247163&r2=247164&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Sep  9 12:25:43 2015
@@ -3196,6 +3196,7 @@ ClangASTContext::IsPossibleDynamicType (
                     case clang::BuiltinType::OCLImage2dArray:
                     case clang::BuiltinType::OCLImage3d:
                     case clang::BuiltinType::OCLSampler:
+                    case clang::BuiltinType::OMPArraySection:
                         break;
                 }
                     break;
@@ -4525,6 +4526,7 @@ ClangASTContext::GetFormat (void* type)
             case clang::BuiltinType::OCLImage2dArray:
             case clang::BuiltinType::OCLImage3d:
             case clang::BuiltinType::OCLSampler:
+            case clang::BuiltinType::OMPArraySection:
                 return lldb::eFormatHex;
         }
             break;
@@ -4822,6 +4824,7 @@ ClangASTContext::GetBasicTypeEnumeration
                 case clang::BuiltinType::OCLImage2dArray:
                 case clang::BuiltinType::OCLImage3d:
                 case clang::BuiltinType::OCLSampler:
+                case clang::BuiltinType::OMPArraySection:
                     return eBasicTypeOther;
             }
         }
@@ -5426,6 +5429,7 @@ ClangASTContext::GetNumPointeeChildren (
             case clang::BuiltinType::ARCUnbridgedCast:
             case clang::BuiltinType::PseudoObject:
             case clang::BuiltinType::BuiltinFn:
+            case clang::BuiltinType::OMPArraySection:
                 return 1;
         }
             break;




More information about the lldb-commits mailing list