1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-23 21:27:20 +02:00

sch2fig/Makefile (CFLAGS), sch.c: add -O; suppress asprintf warning

This commit is contained in:
Werner Almesberger 2016-07-29 22:17:06 -03:00
parent b8ec957471
commit 4427d092ef
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
NAME = sch2fig
OBJS = main.o sch.o lib.o fig.o dwg.o text.o misc.o
CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow
CFLAGS = -g -O -Wall -Wextra -Wno-unused-parameter -Wshadow
LIBS = -lm
include ../common/Makefile.c-common

View File

@ -362,7 +362,7 @@ static void do_hsheet_text(struct sch_ctx *ctx)
.hor = text_min,
.vert = text_min,
};
asprintf(&s, "Sheet: %s", ctx->sheet);
if (asprintf(&s, "Sheet: %s", ctx->sheet)) {}
sheet_txt.s = s; /* work around "const" mismatch */
struct text file_txt = {
@ -373,7 +373,7 @@ static void do_hsheet_text(struct sch_ctx *ctx)
.hor = text_min,
.vert = text_max,
};
asprintf(&s, "File: %s", ctx->file);
if (asprintf(&s, "File: %s", ctx->file)) {}
file_txt.s = s; /* work around "const" mismatch */
if (ctx->rotated) {