pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/w3m



Module Name:    pkgsrc
Committed By:   rillig
Date:           Fri Mar 27 06:19:48 UTC 2020

Modified Files:
        pkgsrc/www/w3m: distinfo
Added Files:
        pkgsrc/www/w3m/patches: patch-main.c

Log Message:
www/w3m: fix -Wchar-subscripts


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 pkgsrc/www/w3m/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/w3m/patches/patch-main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/w3m/distinfo
diff -u pkgsrc/www/w3m/distinfo:1.32 pkgsrc/www/w3m/distinfo:1.33
--- pkgsrc/www/w3m/distinfo:1.32        Thu Mar 12 18:22:54 2020
+++ pkgsrc/www/w3m/distinfo     Fri Mar 27 06:19:47 2020
@@ -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

Added files:

Index: pkgsrc/www/w3m/patches/patch-main.c
diff -u /dev/null pkgsrc/www/w3m/patches/patch-main.c:1.1
--- /dev/null   Fri Mar 27 06:19:48 2020
+++ pkgsrc/www/w3m/patches/patch-main.c Fri Mar 27 06:19:47 2020
@@ -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;



Home | Main Index | Thread Index | Old Index