mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-30 07:11:52 +02:00
sch2fig/Makefile, lib.c: make -Wshadow-clean
This commit is contained in:
parent
8ad734ff39
commit
e3a0229946
@ -13,7 +13,7 @@
|
||||
NAME = sch2fig
|
||||
OBJS = main.o sch.o lib.o fig.o text.o misc.o
|
||||
|
||||
CFLAGS = -g -Wall -Wextra -Wno-unused-parameter
|
||||
CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow
|
||||
LIBS = -lm
|
||||
|
||||
include ../common/Makefile.c-common
|
||||
|
@ -101,7 +101,7 @@ struct comp {
|
||||
|
||||
|
||||
static struct comp *comps = NULL;
|
||||
static struct comp *comp; /* current component */
|
||||
static struct comp *curr_comp; /* current component */
|
||||
static struct comp **next_comp = &comps;
|
||||
static struct obj **next_obj;
|
||||
|
||||
@ -301,22 +301,22 @@ static bool parse_def(const char *line)
|
||||
&s, &name_offset, &draw_num, &draw_name) != 4)
|
||||
return 0;
|
||||
|
||||
comp = alloc_type(struct comp);
|
||||
curr_comp = alloc_type(struct comp);
|
||||
if (*s == '~')
|
||||
s++;
|
||||
comp->name = s;
|
||||
curr_comp->name = s;
|
||||
|
||||
comp->visible = 0;
|
||||
comp->show_pin_name = draw_name == 'Y';
|
||||
comp->show_pin_num = draw_num == 'Y';
|
||||
comp->name_offset = name_offset;
|
||||
curr_comp->visible = 0;
|
||||
curr_comp->show_pin_name = draw_name == 'Y';
|
||||
curr_comp->show_pin_num = draw_num == 'Y';
|
||||
curr_comp->name_offset = name_offset;
|
||||
|
||||
comp->objs = NULL;
|
||||
next_obj = &comp->objs;
|
||||
curr_comp->objs = NULL;
|
||||
next_obj = &curr_comp->objs;
|
||||
|
||||
comp->next = NULL;
|
||||
*next_comp = comp;
|
||||
next_comp = &comp->next;
|
||||
curr_comp->next = NULL;
|
||||
*next_comp = curr_comp;
|
||||
next_comp = &curr_comp->next;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -352,7 +352,7 @@ bool lib_parse(struct lib_ctx *ctx, const char *line)
|
||||
|| sscanf(line, "F%d \"%*[^\"]\" %*d %*d %*d %*c %c",
|
||||
&n, &vis) == 2) {
|
||||
if (vis == 'V')
|
||||
comp->visible |= 1 << n;
|
||||
curr_comp->visible |= 1 << n;
|
||||
return 1;
|
||||
}
|
||||
/* @@@ explicitly ignore FPLIST */
|
||||
|
Loading…
Reference in New Issue
Block a user