Sat Oct 8 20:35:00 2016 UTC ()
Explicitly cast Meta(c) to char as the intermediate value can be too
large for a signed character.


(joerg)
diff -r1.2 -r1.3 src/external/gpl2/texinfo/dist/info/infokey.c

cvs diff -r1.2 -r1.3 src/external/gpl2/texinfo/dist/info/infokey.c (expand / switch to unified diff)

--- src/external/gpl2/texinfo/dist/info/infokey.c 2016/01/14 00:34:52 1.2
+++ src/external/gpl2/texinfo/dist/info/infokey.c 2016/10/08 20:34:59 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: infokey.c,v 1.2 2016/01/14 00:34:52 christos Exp $ */ 1/* $NetBSD: infokey.c,v 1.3 2016/10/08 20:34:59 joerg Exp $ */
2 2
3/* infokey.c -- compile ~/.infokey to ~/.info. 3/* infokey.c -- compile ~/.infokey to ~/.info.
4 Id: infokey.c,v 1.9 2004/12/14 00:15:36 karl Exp  4 Id: infokey.c,v 1.9 2004/12/14 00:15:36 karl Exp
5 5
6 Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 6 Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option) 10 the Free Software Foundation; either version 2, or (at your option)
11 any later version. 11 any later version.
12 12
13 This program is distributed in the hope that it will be useful, 13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -436,27 +436,27 @@ compile (FILE *fp, const char *filename, @@ -436,27 +436,27 @@ compile (FILE *fp, const char *filename,
436 unsigned int clen = 0; 436 unsigned int clen = 0;
437 char seq[20]; 437 char seq[20];
438 unsigned int slen = 0; 438 unsigned int slen = 0;
439 char act[80]; 439 char act[80];
440 unsigned int alen = 0; 440 unsigned int alen = 0;
441 char varn[80]; 441 char varn[80];
442 unsigned int varlen = 0; 442 unsigned int varlen = 0;
443 char val[80]; 443 char val[80];
444 unsigned int vallen = 0; 444 unsigned int vallen = 0;
445 445
446#define To_seq(c) \ 446#define To_seq(c) \
447 do { \ 447 do { \
448 if (slen < sizeof seq) \ 448 if (slen < sizeof seq) \
449 seq[slen++] = meta ? Meta(c) : (c); \ 449 seq[slen++] = meta ? (char)Meta(c) : (c); \
450 else \ 450 else \
451 { \ 451 { \
452 syntax_error(filename, lnum, _("key sequence too long"), \ 452 syntax_error(filename, lnum, _("key sequence too long"), \
453 NULL, NULL, NULL, NULL); \ 453 NULL, NULL, NULL, NULL); \
454 error = 1; \ 454 error = 1; \
455 } \ 455 } \
456 meta = 0; \ 456 meta = 0; \
457 } while (0) 457 } while (0)
458 458
459 sections[info].cur = 1; 459 sections[info].cur = 1;
460 sections[info].data[0] = 0; 460 sections[info].data[0] = 0;
461 sections[ea].cur = 1; 461 sections[ea].cur = 1;
462 sections[ea].data[0] = 0; 462 sections[ea].data[0] = 0;