<div dir="ltr">Shouldn't' the size argument itself be size_t instead of uint64_t?<br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div>- Chuck<br><br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Oct 11, 2016 at 12:59 PM, Axel Davy <span dir="ltr"><<a href="mailto:axel.davy@ens.fr" target="_blank">axel.davy@ens.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Use uint64_t instead of int64_t in the calculation,<br>
as the result is uint64_t.<br>
<br>
Signed-off-by: Axel Davy <<a href="mailto:axel.davy@ens.fr">axel.davy@ens.fr</a>><br>
---<br>
This corrects the small mistake from<br>
218459771a1801d7ad20dd340ac35a<wbr>50f2b5b81a<br>
as reported by Emil.<br>
<br>
src/gallium/auxiliary/os/os_<wbr>misc.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/gallium/auxiliary/os/os_<wbr>misc.c b/src/gallium/auxiliary/os/os_<wbr>misc.c<br>
index a32a9e5..09d4400 100644<br>
--- a/src/gallium/auxiliary/os/os_<wbr>misc.c<br>
+++ b/src/gallium/auxiliary/os/os_<wbr>misc.c<br>
@@ -131,7 +131,7 @@ os_get_total_physical_memory(<wbr>uint64_t *size)<br>
if (phys_pages <= 0 || page_size <= 0)<br>
return false;<br>
<br>
- *size = (int64_t)phys_pages * (int64_t)page_size;<br>
+ *size = (uint64_t)phys_pages * (uint64_t)page_size;<br>
return true;<br>
#elif defined(PIPE_OS_APPLE) || defined(PIPE_OS_BSD)<br>
size_t len = sizeof(*size);<br>
@@ -159,7 +159,7 @@ os_get_total_physical_memory(<wbr>uint64_t *size)<br>
if (ret != B_OK || info.max_pages <= 0)<br>
return false;<br>
<br>
- *size = (int64_t)info.max_pages * (int64_t)B_PAGE_SIZE;<br>
+ *size = (uint64_t)info.max_pages * (uint64_t)B_PAGE_SIZE;<br>
return true;<br>
#elif defined(PIPE_OS_WINDOWS)<br>
MEMORYSTATUSEX status;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.10.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>