From: Jeroen Hofstee Date: Tue, 10 Jun 2014 21:37:23 +0000 (+0200) Subject: LzmaTools: don't self assign values X-Git-Tag: v2014.07-rc4~73 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=867abdac5effde660ac1ca9db8c43994edc01c09;p=u-boot LzmaTools: don't self assign values It seems the code tries to trick the compiler the argument is actually used. However compilers became too smart to fool them so easily an now warn. Gcc and clang don't seem to emit a warning when the argument is unused. If so it should be decorated with unused / (void). Signed-off-by: Jeroen Hofstee --- diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c index 90d31cdcf8..cfc7cb02f7 100644 --- a/lib/lzma/LzmaTools.c +++ b/lib/lzma/LzmaTools.c @@ -34,8 +34,8 @@ #include #include -static void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); } -static void SzFree(void *p, void *address) { p = p; free(address); } +static void *SzAlloc(void *p, size_t size) { return malloc(size); } +static void SzFree(void *p, void *address) { free(address); } int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize, unsigned char *inStream, SizeT length)