From ec1b7578c9d0c94aee99423da1a3a78b971fad83 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Fri, 20 Jul 2018 22:37:28 +0100 Subject: [PATCH] drop pointless comments --- curs_lib.c | 2 +- enriched.c | 2 +- init.c | 8 -------- mutt/date.c | 3 +-- mutt_curses.h | 4 ++-- ncrypt/pgp.c | 4 ++-- pattern.c | 2 -- 7 files changed, 7 insertions(+), 18 deletions(-) diff --git a/curs_lib.c b/curs_lib.c index eab1f598d..c0f404b92 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -213,7 +213,7 @@ int mutt_get_field_full(const char *field, char *buf, size_t buflen, } mutt_window_clearline(MuttMessageWindow, 0); SETCOLOR(MT_COLOR_PROMPT); - addstr((char *) field); /* cast to get around bad prototypes */ + addstr(field); NORMAL_COLOR; mutt_refresh(); mutt_window_getxy(MuttMessageWindow, &x, NULL); diff --git a/enriched.c b/enriched.c index 51a354407..c7719f732 100644 --- a/enriched.c +++ b/enriched.c @@ -575,7 +575,7 @@ int text_enriched_handler(struct Body *a, struct State *s) state = DONE; break; - case DONE: /* not reached, but gcc complains if this is absent */ + case DONE: /* not reached */ break; } } diff --git a/init.c b/init.c index a24d6ac00..f6cfe26b3 100644 --- a/init.c +++ b/init.c @@ -2116,8 +2116,6 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data, free_mbtable((struct MbTable **) MuttVars[idx].var); else { - /* MuttVars[idx].var is already 'char**' (or some 'void**') or... - * so cast to 'void*' is okay */ FREE((void *) MuttVars[idx].var); } } @@ -2197,8 +2195,6 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data, } else { - /* MuttVars[idx].var is already 'char**' (or some 'void**') or... - * so cast to 'void*' is okay */ FREE((void *) MuttVars[idx].var); *((char **) MuttVars[idx].var) = mutt_str_strdup(scratch); } @@ -4220,8 +4216,6 @@ int mutt_option_set(const struct Option *val, struct Buffer *err) char scratch[LONG_STRING]; mutt_str_strfcpy(scratch, NONULL((const char *) val->var), sizeof(scratch)); mutt_expand_path(scratch, sizeof(scratch)); - /* MuttVars[idx].var is already 'char**' (or some 'void**') or... - * so cast to 'void*' is okay */ FREE((void *) MuttVars[idx].var); *((char **) MuttVars[idx].var) = mutt_str_strdup(scratch); break; @@ -4229,8 +4223,6 @@ int mutt_option_set(const struct Option *val, struct Buffer *err) case DT_STRING: case DT_COMMAND: { - /* MuttVars[idx].var is already 'char**' (or some 'void**') or... - * so cast to 'void*' is okay */ FREE((void *) MuttVars[idx].var); *((char **) MuttVars[idx].var) = mutt_str_strdup((char *) val->var); } diff --git a/mutt/date.c b/mutt/date.c index 1562bc3e2..b32fd71b6 100644 --- a/mutt/date.c +++ b/mutt/date.c @@ -242,8 +242,7 @@ time_t mutt_date_make_time(struct tm *t, int local) 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, }; - /* Prevent an integer overflow. - * The time_t cast is an attempt to silence a clang range warning. */ + /* Prevent an integer overflow. */ if ((time_t) t->tm_year > (TM_YEAR_MAX - 1900)) return TIME_T_MAX; if ((time_t) t->tm_year < (TM_YEAR_MIN - 1900)) diff --git a/mutt_curses.h b/mutt_curses.h index f5df34fd0..c04144613 100644 --- a/mutt_curses.h +++ b/mutt_curses.h @@ -29,9 +29,9 @@ #ifdef USE_SLANG_CURSES -#ifndef unix /* this symbol is not defined by the hp-ux compiler (sigh) */ +#ifndef unix /* this symbol is not defined by the hp-ux compiler */ #define unix -#endif /* unix */ +#endif #include /* in addition to slcurses.h, we need slang.h for the version number to test for 2.x having UTF-8 support in main.c */ diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index 6a20342e2..22c151989 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -466,7 +466,7 @@ int pgp_class_application_handler(struct Body *m, struct State *s) bool pgp_keyblock = false; bool clearsign = false; int rv, rc; - int c = 1; /* silence GCC warning */ + int c = 1; long bytes; LOFF_T last_pos, offset; char buf[HUGE_STRING]; @@ -482,7 +482,7 @@ int pgp_class_application_handler(struct Body *m, struct State *s) char body_charset[STRING]; mutt_body_get_charset(m, body_charset, sizeof(body_charset)); - rc = 0; /* silence false compiler warning if (s->flags & MUTT_DISPLAY) */ + rc = 0; fseeko(s->fpin, m->offset, SEEK_SET); last_pos = m->offset; diff --git a/pattern.c b/pattern.c index 91f50a2e5..2498bb2e8 100644 --- a/pattern.c +++ b/pattern.c @@ -756,8 +756,6 @@ static int scan_range_num(struct Buffer *s, regmatch_t pmatch[], int group, int int num; unsigned char c; - /* this cast looks dangerous, but is already all over this code - * (explicit or not) */ num = (int) strtol(&s->dptr[pmatch[group].rm_so], NULL, 0); c = (unsigned char) (s->dptr[pmatch[group].rm_eo - 1]); if (toupper(c) == 'K') -- 2.40.0