From 7e5b33c30ece6f265593cc442ff5a8579faef8ad Mon Sep 17 00:00:00 2001 From: David Crosby Date: Wed, 15 Jul 2015 08:55:08 -0600 Subject: Remove dead assignments flagged by Clang static analysis --- main.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 7c5780c..002c7f7 100644 --- a/main.c +++ b/main.c @@ -3071,7 +3071,6 @@ handleMailto(char *url) /* follow HREF link */ DEFUN(followA, GOTO_LINK, "Go to current link") { - Line *l; Anchor *a; ParsedURL u; #ifdef USE_IMAGE @@ -3081,7 +3080,6 @@ DEFUN(followA, GOTO_LINK, "Go to current link") if (Currentbuf->firstLine == NULL) return; - l = Currentbuf->currentLine; #ifdef USE_IMAGE a = retrieveCurrentImg(Currentbuf); @@ -3163,13 +3161,11 @@ bufferA(void) /* view inline image */ DEFUN(followI, VIEW_IMAGE, "View image") { - Line *l; Anchor *a; Buffer *buf; if (Currentbuf->firstLine == NULL) return; - l = Currentbuf->currentLine; a = retrieveCurrentImg(Currentbuf); if (a == NULL) @@ -3419,7 +3415,6 @@ followForm(void) static void _followForm(int submit) { - Line *l; Anchor *a, *a2; char *p; FormItemList *fi, *f2; @@ -3428,7 +3423,6 @@ _followForm(int submit) if (Currentbuf->firstLine == NULL) return; - l = Currentbuf->currentLine; a = retrieveCurrentForm(Currentbuf); if (a == NULL) @@ -3533,7 +3527,6 @@ _followForm(int submit) case FORM_INPUT_BUTTON: do_submit: tmp = Strnew(); - tmp2 = Strnew(); multipart = (fi->parent->method == FORM_METHOD_POST && fi->parent->enctype == FORM_ENCTYPE_MULTIPART); query_from_followform(&tmp, fi, multipart); -- cgit v1.2.3 From a00c90930b3bbcc7f1681bd189cb74dbf6890255 Mon Sep 17 00:00:00 2001 From: David Crosby Date: Tue, 21 Jul 2015 22:24:00 -0600 Subject: use int for c --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 002c7f7..f4399ac 100644 --- a/main.c +++ b/main.c @@ -1266,7 +1266,7 @@ static void dump_source(Buffer *buf) { FILE *f; - char c; + int c; if (buf->sourcefile == NULL) return; f = fopen(buf->sourcefile, "r"); -- cgit v1.2.3 From fc5b50353ec97ddd51c159b0d415c69e4a0e02f8 Mon Sep 17 00:00:00 2001 From: David Crosby Date: Sat, 25 Jul 2015 21:12:06 -0600 Subject: Adjust while loop --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index f4399ac..6609b49 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,7 @@ /* $Id: main.c,v 1.270 2010/08/24 10:11:51 htrb Exp $ */ #define MAINPROGRAM #include "fm.h" +#include #include #include #include @@ -1272,7 +1273,7 @@ dump_source(Buffer *buf) f = fopen(buf->sourcefile, "r"); if (f == NULL) return; - while (c = fgetc(f), !feof(f)) { + while ((c = fgetc(f)) != EOF) { putchar(c); } fclose(f); -- cgit v1.2.3