Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
scripts: dtc: fix compile warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi authored and michal42 committed Mar 24, 2012
1 parent fb68d4b commit db7f4e3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions scripts/dtc/dtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -143,9 +143,6 @@ int main(int argc, char *argv[])
case 'f':
force = 1;
break;
case 'c':
check = 1;
break;
case 'q':
quiet++;
break;
Expand Down
2 changes: 0 additions & 2 deletions scripts/dtc/flattree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand All @@ -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);
Expand Down

0 comments on commit db7f4e3

Please sign in to comment.