[Lldb-commits] [PATCH] D12388: Silence some MSVC warnings.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 26 16:44:58 PDT 2015


Thanks for fixing these.  Feel free to commit trivial warning fixes without
review.

On Wed, Aug 26, 2015 at 4:43 PM Stephane Sezer <sas at cd80.net> wrote:

> sas created this revision.
> sas added a reviewer: zturner.
> sas added a subscriber: lldb-commits.
>
> Just `assert("string" && false)` instead of `assert("string" == NULL)`.
>
> This avoid errors like
>
>     [...]\Core\SourceManager.cpp(647): warning C4130: '==' : logical
> operation on address of string constant
>
> http://reviews.llvm.org/D12388
>
> Files:
>   source/Core/SourceManager.cpp
>
> Index: source/Core/SourceManager.cpp
> ===================================================================
> --- source/Core/SourceManager.cpp
> +++ source/Core/SourceManager.cpp
> @@ -644,14 +644,14 @@
>          else
>          {
>              // Some lines have been populated, start where we last left
> off
> -            assert("Not implemented yet" == NULL);
> +            assert("Not implemented yet" && false);
>          }
>
>      }
>      else
>      {
>          // Calculate all line offsets up to "line"
> -        assert("Not implemented yet" == NULL);
> +        assert("Not implemented yet" && false);
>      }
>      return false;
>  }
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150826/ebe83877/attachment.html>


More information about the lldb-commits mailing list