]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
LzmaTools: don't self assign values
authorJeroen Hofstee <jeroen@myspectrum.nl>
Tue, 10 Jun 2014 21:37:23 +0000 (23:37 +0200)
committerTom Rini <trini@ti.com>
Wed, 11 Jun 2014 20:27:06 +0000 (16:27 -0400)
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 <jeroen@myspectrum.nl>
lib/lzma/LzmaTools.c

index 90d31cdcf8eb75fed990c84d334dd580c7f1c48f..cfc7cb02f78d1b28bc35b94040873ce155004387 100644 (file)
@@ -34,8 +34,8 @@
 #include <linux/string.h>
 #include <malloc.h>
 
-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)