[Lldb-commits] [PATCH] Remove "%zu" format specifier for MSVC.

Chaoren Lin chaorenl at google.com
Sun May 31 23:47:17 PDT 2015


I wonder if it'll be worth the effort to convert everything to use C++
streams instead.
On May 31, 2015 21:32, "Chaoren Lin" <chaorenl at google.com> wrote:

> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D10153
>
> Files:
>   lldb/trunk/source/Symbol/ClangASTType.cpp
>
> Index: lldb/trunk/source/Symbol/ClangASTType.cpp
> ===================================================================
> --- lldb/trunk/source/Symbol/ClangASTType.cpp
> +++ lldb/trunk/source/Symbol/ClangASTType.cpp
> @@ -3712,7 +3712,7 @@
>                      if (element_type.GetCompleteType())
>                      {
>                          char element_name[64];
> -                        ::snprintf (element_name, sizeof (element_name),
> "[%zu]", idx);
> +                        ::snprintf(element_name, sizeof(element_name),
> "[%" PRIu64 "]", static_cast<uint64_t>(idx));
>                          child_name.assign(element_name);
>                          child_byte_size =
> element_type.GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope()
> : NULL);
>                          child_byte_offset = (int32_t)idx *
> (int32_t)child_byte_size;
> @@ -3733,7 +3733,7 @@
>                      if (element_type.GetCompleteType())
>                      {
>                          char element_name[64];
> -                        ::snprintf (element_name, sizeof (element_name),
> "[%zu]", idx);
> +                        ::snprintf(element_name, sizeof(element_name),
> "[%" PRIu64 "]", static_cast<uint64_t>(idx));
>                          child_name.assign(element_name);
>                          child_byte_size =
> element_type.GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope()
> : NULL);
>                          child_byte_offset = (int32_t)idx *
> (int32_t)child_byte_size;
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150531/554eacb0/attachment.html>


More information about the lldb-commits mailing list