Source: nn Version: 6.7.3-14 Severity: normal Tags: patch Dear Maintainer,
>From 303ca6f90afa8d27274f8bfeef0fd46bb634358a Mon Sep 17 00:00:00 2001 >From: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> >Date: Sat, 6 Mar 2021 17:59:17 +0000 >Subject: [PATCH] more.c: fix warnings issued by the compiler Add header file "more.h". Comment out declaration of "STANDOUT", is declared in "nn_term.h". Fix type of parameter "attrp" in "next_header_field()". Fix the type of "hdrattr", it is "fct_type_int", not just "fct_type". Add several /* FALLTHROUGH */ to avoid warnings from the compiler. Signed-off-by: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> --- more.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/more.c b/more.c index 99280e0..1da0317 100644 --- a/more.c +++ b/more.c @@ -22,6 +22,7 @@ #include "macro.h" #include "match.h" #include "menu.h" +#include "more.h" #include "news.h" #include "regexp.h" #include "save.h" @@ -69,7 +70,7 @@ extern char *folder_save_file, *default_save_file; extern int show_art_next_invalid; extern int mouse_y; extern int mouse_state; -extern int STANDOUT; +/* extern int STANDOUT; */ /* declared in "nn_term.h" */ extern int alt_cmd_key, in_menu_mode, any_message; extern long n_selected; @@ -207,7 +208,7 @@ scan_header_fields(char *fields, article_header * ah) } int -next_header_field(char **namep, char **valp, fct_type * attrp) +next_header_field(char **namep, char **valp, fct_type_int * attrp) { fct_type attr; @@ -391,7 +392,7 @@ more(article_header * ah, int mode, int screen_offset) int match_expr, shade_overlap, shade_line; int *key_map; key_type cur_key; - fct_type hdrattr; + fct_type_int hdrattr; char *match_start, *match_end = NULL; int open_modes, o_mode; @@ -1116,6 +1117,7 @@ alt_key: STATE(K_CONTINUE); } } + /* FALLTHROUGH */ /* fall through??? */ case K_NEXT_PAGE: @@ -1204,6 +1206,7 @@ alt_key: c = alt_cmd_key; goto alt_key; } + /* FALLTHROUGH */ /* XXX: fall-thru? */ case K_QUIT: ah->attr = A_LEAVE_NEXT; @@ -1485,6 +1488,7 @@ alt_key: regular_expr = regcomp(fname); match_lines = 0; } + /* FALLTHROUGH *( /* XXX: fall here? */ case K_NEXT_MATCH: if (regular_expr == NULL) { @@ -1597,6 +1601,7 @@ alt_key: if (mode & MM_PREVIEW) more_return(MC_PREVIEW_OTHER); + /* FALLTHROUGH */ /* fall thru to "default" */ default: -- 2.30.1 -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.9-1 (SMP w/2 CPU threads) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) -- debconf information excluded -- Bjarni I. Gislason