mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-23 07:47:42 +02:00
b2/: use -Wshadow (and fix the place where this caused trouble)
This commit is contained in:
parent
24abc2c49c
commit
8759410f80
@ -11,7 +11,7 @@
|
||||
|
||||
SHELL = /bin/bash
|
||||
|
||||
CFLAGS = -g -Wall -Wextra $(shell pkg-config --cflags glib-2.0)
|
||||
CFLAGS = -g -Wall -Wextra -Wshadow $(shell pkg-config --cflags glib-2.0)
|
||||
SLOPPY = -Wno-unused -Wno-implicit-function-declaration
|
||||
OBJS = bom.o boom.o chr.o comp.o db.o dump.o eval.o param.o relop.o \
|
||||
subex.o subst.o util.o \
|
||||
|
4
b2/db.c
4
b2/db.c
@ -158,10 +158,10 @@ void part_finalize(struct part *part, const struct action *act)
|
||||
}
|
||||
|
||||
|
||||
void part_add_stock(struct part *part, struct stock *stock)
|
||||
void part_add_stock(struct part *part, struct stock *s)
|
||||
{
|
||||
if (!part->stock) {
|
||||
part->stock = stock;
|
||||
part->stock = s;
|
||||
return;
|
||||
}
|
||||
yyerrorf("part %s %s already has stock", part->domain, part->name);
|
||||
|
2
b2/db.h
2
b2/db.h
@ -96,7 +96,7 @@ struct part *part_lookup(const char *domain, const char *name);
|
||||
struct part *part_add(const char *domain, const char *name);
|
||||
void part_alias(struct part *a, struct part *b);
|
||||
void part_finalize(struct part *part, const struct action *act);
|
||||
void part_add_stock(struct part *part, struct stock *stock);
|
||||
void part_add_stock(struct part *part, struct stock *s);
|
||||
void part_dump(FILE *file, const struct part *part);
|
||||
|
||||
const struct currency *currency_lookup(const char *name);
|
||||
|
Loading…
Reference in New Issue
Block a user