<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Todd,<div class=""><br class=""></div><div class="">The example I put in my last email is one of a few (maybe one more) instances where the existing code casts to 64-bit and uses PRIu64. When I’m dabbling in existing code I try to copy the conventions that are already in place, so that’s why I went this way. I’m happy to change it to %zu. I was just checking about that.</div><div class=""><br class=""></div><div class="">- Will</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 28, 2015, at 10:24 AM, Todd Fiala <<a href="mailto:todd.fiala@gmail.com" class="">todd.fiala@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi William,<div class=""><br class=""></div><div class="">It looks like just the PRIx64/PRIu64 bits are needed from a visual inspection. The source variables that are printed from already are 64-bit always, aren't they? If they're not but they should be, that seems like the real underlying problem rather than needing to cast.</div><div class=""><br class=""></div><div class="">What kind of warning are you seeing if you just replace the % format specifier?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">-Todd</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Dec 27, 2015 at 12:32 PM, William Dillon via lldb-dev <span dir="ltr" class=""><<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Message: 1<br class="">
> Date: Sat, 26 Dec 2015 21:15:53 +0100<br class="">
> From: Joerg Sonnenberger via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>><br class="">
> To: <a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">
> Subject: Re: [lldb-dev] Patch for addressing format warnings on 32-bit<br class="">
> Message-ID: <<a href="mailto:20151226201553.GB14119@britannica.bec.de" class="">20151226201553.GB14119@britannica.bec.de</a>><br class="">
> Content-Type: text/plain; charset=utf-8<br class="">
<span class="">><br class="">
> On Fri, Dec 25, 2015 at 06:34:09PM -0800, William Dillon via lldb-dev wrote:<br class="">
>> There are a handful of -Wformat warnings on 32-bit platforms.<br class="">
>> I addressed all those that I’ve seen while working on Swift.<br class="">
>> Let me know if the git diff format is inappropriate for this.<br class="">
><br class="">
> Don't cast size_t to uint64_t, format it with %zu directly.<br class="">
><br class="">
> Joerg<br class="">
><br class="">
<br class="">
</span>I can go ahead and do that, but I wonder whether there should be two different ways of handling this, even on the same line. For example:<br class="">
<br class="">
- error.SetErrorStringWithFormat ("SoftwareBreakpointr::%s addr=0x%" PRIx64 ": tried to read %lu bytes but only read %" PRIu64, __FUNCTION__, m_addr, m_opcode_size, (uint64_t)bytes_read);<br class="">
+ error.SetErrorStringWithFormat ("SoftwareBreakpointr::%s addr=0x%" PRIx64 ": tried to read %" PRIu64 " bytes but only read %" PRIu64, __FUNCTION__, m_addr, (uint64_t)m_opcode_size, (uint64_t)bytes_read);<br class="">
<br class="">
- Will<br class="">
<div class="HOEnZb"><div class="h5">_______________________________________________<br class="">
lldb-dev mailing list<br class="">
<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="">
</div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class="">-Todd</div></div>
</div>
</div></blockquote></div><br class=""></div></body></html>