From 5dc0a5747a5fa96ae187ad4452d0524b06d9880b Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 16 Jun 2015 21:45:59 -0400 Subject: [PATCH] majority opinion on cppregex.cpp declaration --- src/version.c | 6 ++---- sys/share/cppregex.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/version.c b/src/version.c index 5105114d0..2098427c3 100644 --- a/src/version.c +++ b/src/version.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 version.c $NHDT-Date: 1434505027 2015/06/17 01:37:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.34 $ */ +/* NetHack 3.6 version.c $NHDT-Date: 1434505545 2015/06/17 01:45:45 $ $NHDT-Branch: master $:$NHDT-Revision: 1.35 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -150,15 +150,13 @@ char *buf; const char *finalphrase; { char rtbuf[BUFSZ]; - int l, i, k; + int l, i; const char *s1 = 0, *s2 = 0, *s3 = 0, *s4 = 0; if ((int)strlen(buf) >= (BUFSZ - 1)) return; strcpy(rtbuf, buf); - k = SIZE(rt_opts) + 1; - for (i = 0; i < (SIZE(rt_opts) + 1); i += 2) { if (i < SIZE(rt_opts)) { s1 = ", "; diff --git a/sys/share/cppregex.cpp b/sys/share/cppregex.cpp index 840d7f939..9d3e88eff 100644 --- a/sys/share/cppregex.cpp +++ b/sys/share/cppregex.cpp @@ -10,7 +10,7 @@ extern "C" { #include - char regex_id[] = "cppregex"; + extern const char regex_id[] = "cppregex"; struct nhregex { std::unique_ptr re;