scripts: dtc: fix compile warnings
authorFelipe Balbi <balbi@ti.com>
Thu, 26 Jan 2012 11:20:07 +0000 (13:20 +0200)
committerMichal Marek <mmarek@suse.cz>
Sat, 24 Mar 2012 22:07:35 +0000 (23:07 +0100)
Fix following compile warnings:

scripts/dtc/flattree.c: In function ‘flat_read_mem_reserve’:
scripts/dtc/flattree.c:700:14: warning: variable ‘p’ set but not used
[-Wunused-but-set-variable]

scripts/dtc/dtc.c: In function ‘main’:
scripts/dtc/dtc.c:104:17: warning: variable ‘check’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/dtc/dtc.c
scripts/dtc/flattree.c

index 451c92d31b196634cfb9ed7b2b15c632efd89691..2ef5e2e3dd38f781ef92fdd1d702e30c96fd7b20 100644 (file)
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
        const char *outform = "dts";
        const char *outname = "-";
        const char *depname = NULL;
-       int force = 0, check = 0, sort = 0;
+       int force = 0, sort = 0;
        const char *arg;
        int opt;
        FILE *outf = NULL;
@@ -143,9 +143,6 @@ int main(int argc, char *argv[])
                case 'f':
                        force = 1;
                        break;
-               case 'c':
-                       check = 1;
-                       break;
                case 'q':
                        quiet++;
                        break;
index ead0332c87e1b1e613507c79bbcda2aa87998309..28d0b2381df6e526a09043da4b79247ce1998c41 100644 (file)
@@ -697,7 +697,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
 {
        struct reserve_info *reservelist = NULL;
        struct reserve_info *new;
-       const char *p;
        struct fdt_reserve_entry re;
 
        /*
@@ -706,7 +705,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
         *
         * First pass, count entries.
         */
-       p = inb->ptr;
        while (1) {
                flat_read_chunk(inb, &re, sizeof(re));
                re.address  = fdt64_to_cpu(re.address);