1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-23 08:57:10 +02:00

b2/: use -Wshadow (and fix the place where this caused trouble)

This commit is contained in:
Werner Almesberger 2012-05-23 19:29:04 -03:00
parent 24abc2c49c
commit 8759410f80
3 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@
SHELL = /bin/bash 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 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 \ 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 \ subex.o subst.o util.o \

View File

@ -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) { if (!part->stock) {
part->stock = stock; part->stock = s;
return; return;
} }
yyerrorf("part %s %s already has stock", part->domain, part->name); yyerrorf("part %s %s already has stock", part->domain, part->name);

View File

@ -96,7 +96,7 @@ struct part *part_lookup(const char *domain, const char *name);
struct part *part_add(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_alias(struct part *a, struct part *b);
void part_finalize(struct part *part, const struct action *act); 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); void part_dump(FILE *file, const struct part *part);
const struct currency *currency_lookup(const char *name); const struct currency *currency_lookup(const char *name);