Introduction
Introduction Statistics Contact Development Disclaimer Help
fix compilation error and warnings under Linux - ploot - simple plotting tools
git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65…
Log
Files
Refs
Tags
README
LICENSE
---
commit 50aea1263cf0d68aa2403894b92eb9584958af36
parent ba18a4ef00490d0f3c5f5838772ed0ba69cc071f
Author: Josuah Demangeon <[email protected]>
Date: Wed, 7 Sep 2022 11:29:25 +0200
fix compilation error and warnings under Linux
Diffstat:
M Makefile | 7 ++++---
M drawille.c | 8 ++++----
M tsv.c | 3 +--
3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -1,11 +1,12 @@
NAME = ploot
VERSION = v0.1
-D = -D_POSIX_C_SOURCE=200811L -D_BSD_SOURCE
+D = -D_POSIX_C_SOURCE=200811L -D_DEFAULT_SOURCE
CFLAGS = -Wall -Wextra -std=c99 -pedantic $W $D -fPIC
-LFLAGS = -static -lm
+LDFLAGS = -static
PREFIX = /usr/local
MANOREFIX = $(PREFIX)/share/man
+LIBS = -lm
SRC = tsv.c drawille.c font.c font13.c font8.c util.c
INC = tsv.h drawille.h font.h util.h
@@ -19,7 +20,7 @@ all: ${BIN}
${OBJ} ${BIN:=.o}: ${INC} Makefile
${BIN}: ${OBJ} ${BIN:=.o}
- ${CC} ${LFLAGS} -o $@ [email protected] ${OBJ}
+ ${CC} ${LDFLAGS} -o $@ [email protected] ${OBJ} ${LIBS}
install: ${BIN}
mkdir -p ${PREFIX}/bin ${MANDIR}/man1 ${MANDIR}/man5
diff --git a/drawille.c b/drawille.c
@@ -109,17 +109,17 @@ drawille_line_init(struct line *l, int x0, int y0, int x1…
static int
drawille_line_next(struct line *l)
{
- int e;
+ int err;
if (l->x0 == l->x1 && l->y0 == l->y1)
return 0;
- e = l->err;
- if (e > -l->dx) {
+ err = l->err;
+ if (err > -l->dx) {
l->x0 += l->sx;
l->err -= l->dy;
}
- if (e < l->dy) {
+ if (err < l->dy) {
l->y0 += l->sy;
l->err += l->dx;
}
diff --git a/tsv.c b/tsv.c
@@ -103,10 +103,9 @@ tsv_labels(FILE *fp, struct tsv **vlp, size_t *ncol)
char *field, *line, *cp;
struct tsv *vl, *col;
size_t sz;
- ssize_t r;
sz = 0, line = NULL;
- r = getline(&line, &sz, fp);
+ getline(&line, &sz, fp);
if (ferror(fp))
err(111, "error while reading from file");
if (feof(fp))
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.