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