summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-03-27 06:19:47 +0000
committerrillig <rillig@pkgsrc.org>2020-03-27 06:19:47 +0000
commita3e1fa306090c8da7e94bdc87f6241d1ee318f19 (patch)
tree160fbc1f4ac5bd53a3a962146769e2844c919cdb /www
parent44e65c1f5b2be3b436ed1fd32b872655ca6f93f3 (diff)
downloadpkgsrc-a3e1fa306090c8da7e94bdc87f6241d1ee318f19.tar.gz
www/w3m: fix -Wchar-subscripts
Diffstat (limited to 'www')
-rw-r--r--www/w3m/distinfo3
-rw-r--r--www/w3m/patches/patch-main.c29
2 files changed, 31 insertions, 1 deletions
diff --git a/www/w3m/distinfo b/www/w3m/distinfo
index 24235632fb0..e59f40936da 100644
--- a/www/w3m/distinfo
+++ b/www/w3m/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.32 2020/03/12 18:22:54 wiz Exp $
+$NetBSD: distinfo,v 1.33 2020/03/27 06:19:47 rillig Exp $
SHA1 (w3m-0.5.3+git20190105.tar.gz) = 47d315af8e4a34f0d726687295e5d448a809acdc
RMD160 (w3m-0.5.3+git20190105.tar.gz) = d71cd692d9ce166c8a1fd3e3c7203f0a37cd5158
SHA512 (w3m-0.5.3+git20190105.tar.gz) = b63b15d0bea82f50bcaa9fc0826c2d3c265a3ad73069b4a020812f28b552cdf08618ab877280c9f3a43bd64f51b80b7a526098e6395ea121c0981a3fcd2562b4
Size (w3m-0.5.3+git20190105.tar.gz) = 2183651 bytes
+SHA1 (patch-main.c) = ac422d68d399eec6339d8eb24a4f85991ef58208
diff --git a/www/w3m/patches/patch-main.c b/www/w3m/patches/patch-main.c
new file mode 100644
index 00000000000..0124bea1d66
--- /dev/null
+++ b/www/w3m/patches/patch-main.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-main.c,v 1.1 2020/03/27 06:19:47 rillig Exp $
+
+main.c:1225:29: error: array subscript has type 'char' [-Werror=char-subscripts]
+ (prec_num || (GlobalKeymap[c] == FUNCNAME_nulcmd))) {
+ ^
+
+The variable c is used for reading characters via getc(), without
+checking for EOF. And yes, the declaration of that variable is indeed
+more than 800 lines away from its first use, even though the use is
+constrained to a single tiny block of code.
+
+The code is safe though since line 1225 above is only reached for
+'0' to '9'.
+
+https://sourceforge.net/p/w3m/patches/76/
+
+--- main.c.orig 2019-01-05 08:41:27.000000000 +0000
++++ main.c
+@@ -395,8 +395,8 @@ int
+ main(int argc, char **argv, char **envp)
+ {
+ Buffer *newbuf = NULL;
+- char *p, c;
+- int i;
++ char *p;
++ int c, i;
+ InputStream redin;
+ char *line_str = NULL;
+ char **load_argv;