Skip to content

Commit db7f4e3

Browse files
Felipe Balbimichal42
authored andcommitted
scripts: dtc: fix compile warnings
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 <[email protected]> Signed-off-by: Michal Marek <[email protected]>
1 parent fb68d4b commit db7f4e3

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

scripts/dtc/dtc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
101101
const char *outform = "dts";
102102
const char *outname = "-";
103103
const char *depname = NULL;
104-
int force = 0, check = 0, sort = 0;
104+
int force = 0, sort = 0;
105105
const char *arg;
106106
int opt;
107107
FILE *outf = NULL;
@@ -143,9 +143,6 @@ int main(int argc, char *argv[])
143143
case 'f':
144144
force = 1;
145145
break;
146-
case 'c':
147-
check = 1;
148-
break;
149146
case 'q':
150147
quiet++;
151148
break;

scripts/dtc/flattree.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
697697
{
698698
struct reserve_info *reservelist = NULL;
699699
struct reserve_info *new;
700-
const char *p;
701700
struct fdt_reserve_entry re;
702701

703702
/*
@@ -706,7 +705,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
706705
*
707706
* First pass, count entries.
708707
*/
709-
p = inb->ptr;
710708
while (1) {
711709
flat_read_chunk(inb, &re, sizeof(re));
712710
re.address = fdt64_to_cpu(re.address);

0 commit comments

Comments
 (0)