<div dir="ltr"><div>Interesting.  I added the cast because this page:<br><br>  <a href="https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-interlockedexchangeadd">https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-interlockedexchangeadd</a><br><br></div>suggested it takes unsigned.  Can you check if just removing the cast works?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 6, 2018 at 11:28 PM, John Emmas <span dir="ltr"><<a href="mailto:john@creativepost.co.uk" target="_blank">john@creativepost.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Apologies if this comes through twice (yesterday, I accidentally posted while being unsubscribed). Here's a link on MSDN which might be helpful...<br>
<br>
<a href="https://msdn.microsoft.com/en-us/library/191ca0sk.aspx" rel="noreferrer" target="_blank">https://msdn.microsoft.com/en-<wbr>us/library/191ca0sk.aspx</a><br>
<br>
On 06/09/2018 15:19, John Emmas wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I updated from git today and I've hit a problem when building with MSVC...<br>
<br>
Trying to compile almost any source file produces the following compiler error at lines 255 and 256 of 'hb-atomic.hh':-<br>
<br>
   error C2664: 'InterlockedExchangeAdd' : cannot convert parameter 1 from 'unsigned int *' to 'volatile LONG *'<br>
<br>
Here are the relevant lines:-<br>
<br>
   inline int inc (void) { return hb_atomic_int_impl_add (&v, 1); }<br>
   inline int dec (void) { return hb_atomic_int_impl_add (&v, -1); }<br>
<br>
and here's how 'hb_atomic_int_impl_add()' looks (at line 109):-<br>
<br>
   #define hb_atomic_int_impl_add(AI, V)    InterlockedExchangeAdd ((unsigned *) (AI), (V)<br>
<br>
If I change the above line to this, the compiler error goes away:-<br>
<br>
   #define hb_atomic_int_impl_add(AI, V)    InterlockedExchangeAdd ((volatile LONG *) (AI), (V)<br>
<br>
I'm building with MSVC-8 so could someone check on some other versions please with a view to making the change permanent? Thanks.<br>
<br>
John<br>
<br>
<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org" target="_blank">HarfBuzz@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/harfbuzz</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">behdad<br><a href="http://behdad.org/" target="_blank">http://behdad.org/</a></div>
</div>