INN commit: trunk (4 files)
INN Commit
rra at isc.org
Thu Jan 4 15:06:39 UTC 2018
Date: Thursday, January 4, 2018 @ 07:06:39
Author: iulius
Revision: 10212
Enable declaration-after-statement GCC warning
Modified:
trunk/configure.ac
trunk/frontends/inews.c
trunk/frontends/rnews.c
trunk/nnrpd/nnrpd.c
-------------------+
configure.ac | 8 ++++----
frontends/inews.c | 4 +++-
frontends/rnews.c | 3 +--
nnrpd/nnrpd.c | 6 ++++--
4 files changed, 12 insertions(+), 9 deletions(-)
Modified: configure.ac
===================================================================
--- configure.ac 2018-01-01 00:03:02 UTC (rev 10211)
+++ configure.ac 2018-01-04 15:06:39 UTC (rev 10212)
@@ -724,8 +724,7 @@
dnl on glibc functions on Linux, as well as more object size checking,
dnl which catches a few more issues.
dnl -Wswitch-enum, -Wfloat-equal,
-dnl "-Wconversion -Wno-sign-conversion",
-dnl -Wunreachable-code, -Wstack-protector, -Wdeclaration-after-statement
+dnl "-Wconversion -Wno-sign-conversion", -Wunreachable-code, -Wstack-protector
m4_foreach_w(
[flag],
[-g -O3 -DDEBUG=1 -Werror -Wall -Wextra -Wdouble-promotion -Wformat=2
@@ -733,13 +732,14 @@
-Wmissing-include-dirs -Wshift-overflow=2
-Wsync-nand -Wstringop-overflow=4 -Wmissing-format-attribute
-Walloc-zero -Walloca -Wduplicated-branches -Wduplicated-cond
- -Wtrampolines -Wshadow -Wpointer-arith -Wc99-c11-compat
+ -Wtrampolines -Wdeclaration-after-statement -Wshadow -Wpointer-arith
+ -Wc99-c11-compat
-Wbad-function-cast -Wcast-align -Wwrite-strings
-Wdangling-else -Wdate-time
-Wjump-misses-init -Wlogical-op -Wstrict-prototypes
-Wold-style-definition
-Wmissing-prototypes -Wmissing-declarations
- -Wnormalized=nfc -Wrestrict -Wredundant-decls -Wnested-externs -Winline
+ -Wnormalized=nfc -Wredundant-decls -Wrestrict -Wnested-externs -Winline
-Winvalid-pch -Wvla -Wno-unknown-warning-option
-Wno-unused-function],
[INN_PROG_CC_FLAG(flag, [CC_WARNINGS="${CC_WARNINGS} flag"], [])])
Modified: frontends/inews.c
===================================================================
--- frontends/inews.c 2018-01-01 00:03:02 UTC (rev 10211)
+++ frontends/inews.c 2018-01-04 15:06:39 UTC (rev 10212)
@@ -448,6 +448,9 @@
char *buff;
char *out;
char *p;
+#ifdef DO_MUNGE_GECOS
+ int left = SMBUF - 1;
+#endif
#if !defined(DONT_MUNGE_GETENV)
memset(outbuff, 0, SMBUF);
@@ -464,7 +467,6 @@
* buffer. Remember that on some Unix systems, the content of the GECOS
* field is under (untrusted) user control and we could be setgid. */
p = pwp->pw_gecos;
- int left = SMBUF - 1;
if (*p == '*')
p++;
for (out = outbuff; *p && !GECOSTERM(*p) && left; p++) {
Modified: frontends/rnews.c
===================================================================
--- frontends/rnews.c 2018-01-01 00:03:02 UTC (rev 10211)
+++ frontends/rnews.c 2018-01-04 15:06:39 UTC (rev 10212)
@@ -491,6 +491,7 @@
#if defined(DO_RNEWSPROGS)
char path[(SMBUF * 2) + 1];
char *p;
+ int len;
#endif /* defined(DO_RNEWSPROGS) */
char buff[SMBUF];
const char *cargv[4];
@@ -580,8 +581,6 @@
}
#if defined(DO_RNEWSPROGS)
- int len;
-
cargv[0] = UNPACK;
cargv[1] = NULL;
/* Ignore any possible leading pathnames, to avoid trouble. */
Modified: nnrpd/nnrpd.c
===================================================================
--- nnrpd/nnrpd.c 2018-01-01 00:03:02 UTC (rev 10211)
+++ nnrpd/nnrpd.c 2018-01-04 15:06:39 UTC (rev 10212)
@@ -370,6 +370,10 @@
void
CMDcapabilities(int ac, char *av[])
{
+#ifdef HAVE_SASL
+ const char *mechlist = NULL;
+#endif
+
if (ac == 2 && !IsValidKeyword(av[1])) {
Reply("%d Syntax error in keyword\r\n", NNTP_ERR_SYNTAX);
return;
@@ -382,8 +386,6 @@
Printf("IMPLEMENTATION %s\r\n", INN_VERSION_STRING);
#ifdef HAVE_SASL
- const char *mechlist = NULL;
-
/* Check for available SASL mechanisms.
* Start the string with a space for the strstr() calls afterwards. */
sasl_listmech(sasl_conn, NULL, " ", " ", "", &mechlist, NULL, NULL);
More information about the inn-committers
mailing list