diff --git a/lib/elf.c b/lib/elf.c
index 7ce945fb2bd4822add82f34cda24bf21aea45700..56123fdcd82f14a208491881dcb89c58caee5af9 100644
--- a/lib/elf.c
+++ b/lib/elf.c
@@ -146,9 +146,6 @@ Elf_Shdr *elf_get_sec_shstrtab(const Elf_Ehdr *ehdr)
 void elf_hdr_endianess_swap(Elf_Ehdr *ehdr)
 {
 	uint32_t i;
-	uint32_t len;
-
-	uint32_t *p;
 
 	Elf_Shdr *shdr;
 	Elf_Phdr *phdr;
@@ -473,7 +470,6 @@ unsigned long elf_get_symbol_value(const Elf_Ehdr *ehdr,
 
 {
 	unsigned int i;
-	unsigned int idx;
 	size_t sym_cnt;
 
 	Elf_Shdr *symtab;
@@ -700,7 +696,6 @@ void elf_dump_symtab(const Elf_Ehdr *ehdr)
 	Elf_Sym *symbols;
 
 	size_t sym_cnt;
-	unsigned int idx;
 	unsigned int i;
 
 
diff --git a/lib/string.c b/lib/string.c
index 905e3b4df1d55deb5c538e537c4dd68c55fcb359..93d0e98e243e8213eaa9e5c6cc4c4dcf0594e7fe 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -203,7 +203,6 @@ int memcmp(const void *s1, const void *s2, size_t n)
 {
         const unsigned char *su1, *su2;
 
-        int res = 0;
 
 	su1 = (const unsigned char *) s1;
 	su2 = (const unsigned char *) s2;