From 3f8401f972c57736696daa5c0e080dd73d0c320b Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 8 Nov 2005 18:06:21 +0000 Subject: [PATCH] janitor - back out previous change - the warn_unused_result warnings from gcc-4 seem to be over-zealous as they warn even if the result is used as a function argument. --- lib/common/psusershape.c | 3 +-- lib/common/svggen.c | 3 +-- lib/graph/lexer.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/common/psusershape.c b/lib/common/psusershape.c index aa35a807f..b85303ccf 100644 --- a/lib/common/psusershape.c +++ b/lib/common/psusershape.c @@ -50,7 +50,6 @@ static ps_image_t *user_init(char *str) int saw_bb, must_inline; int lx, ly, ux, uy; ps_image_t *val; - size_t cnt; if (!EPSF_contents) EPSF_contents = dtopen(&ImageDictDisc, Dtoset); @@ -86,7 +85,7 @@ static ps_image_t *user_init(char *str) fstat(fileno(fp), &statbuf); contents = val->contents = N_GNEW(statbuf.st_size + 1, char); fseek(fp, 0, SEEK_SET); - cnt = fread(contents, statbuf.st_size, 1, fp); + fread(contents, statbuf.st_size, 1, fp); contents[statbuf.st_size] = '\0'; fclose(fp); dtinsert(EPSF_contents, val); diff --git a/lib/common/svggen.c b/lib/common/svggen.c index b0e6a9f7b..a0de59200 100644 --- a/lib/common/svggen.c +++ b/lib/common/svggen.c @@ -142,7 +142,6 @@ static gzFile Zfile; static void svg_fputs(char *s) { int len; - size_t cnt; len = strlen(s); switch (Output_lang) { @@ -155,7 +154,7 @@ static void svg_fputs(char *s) exit(1); #endif case SVG: - cnt = fwrite(s, sizeof(char), (unsigned) len, Output_file); + fwrite(s, sizeof(char), (unsigned) len, Output_file); break; } } diff --git a/lib/graph/lexer.c b/lib/graph/lexer.c index b60cd9e58..2f7518ede 100644 --- a/lib/graph/lexer.c +++ b/lib/graph/lexer.c @@ -446,7 +446,6 @@ char *aglasterr() long endpos; long len; char *buf; - size_t cnt; if (!agerrout) return 0; @@ -455,7 +454,7 @@ char *aglasterr() len = endpos - aglast; buf = malloc(len + 1); fseek(agerrout, aglast, SEEK_SET); - cnt = fread(buf, sizeof(char), len, agerrout); + fread(buf, sizeof(char), len, agerrout); buf[len] = '\0'; fseek(agerrout, endpos, SEEK_SET); -- 2.40.0