On 8/26/2014 6:05 PM, Andrew Fish wrote:
> LzmaCompress.c:46:49: error: explicitly assigning a variable of type 'void *' 
> to itself [-Werror,-Wself-assign]
> static void *SzAlloc(void *p, size_t size) {  p = p; return MyAlloc(size); }
>
> I’m not sure if any of our tools warn. It probably came from the original 
> LZMA code?
>
> It looks like I can turn on the -Wno-self-assign compiler flag and suppress 
> the warning.

I don't know what the correct solution is, though I guess there have 
been enough bugs related to self-assignment that people have tended to 
prefer void casts to suppress warnings about unused arguments?  It may 
be worth using the original patch (deleting the 'p = p' lines) instead 
of turning the warning off.

-- 
Bruce Cran


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to