[Lldb-commits] [PATCH] Change type from auto to size_t to fix warning.

dan sinclair dsinclair at google.com
Fri Jan 9 11:11:05 PST 2015


The GetNumIVars() call returns a size_t, there is currently a warning being issue that it is being compared to int. It looks like the auto is getting type int. This CL makes it explicit that we're iterating over things of type size_t.

http://reviews.llvm.org/D6899

Files:
  source/DataFormatters/NSIndexPath.cpp

Index: source/DataFormatters/NSIndexPath.cpp
===================================================================
--- source/DataFormatters/NSIndexPath.cpp
+++ source/DataFormatters/NSIndexPath.cpp
@@ -86,7 +86,7 @@
             
             bool has_indexes(false),has_length(false);
             
-            for (auto x = 0;
+            for (size_t x = 0;
                  x < descriptor->GetNumIVars();
                  x++)
             {

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6899.17936.patch
Type: text/x-patch
Size: 448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150109/f0a3bcdb/attachment.bin>


More information about the lldb-commits mailing list