INN commit: trunk (8 files)
INN Commit
rra at isc.org
Tue Jun 5 14:18:38 UTC 2018
Date: Tuesday, June 5, 2018 @ 07:18:37
Author: iulius
Revision: 10291
Fix gcc warnings with GCC 8.1
Also add new stringop-truncation and cast-align=strict
warnings.
Silent cast-function-type warnings from SASL integration
in innfeed/imap_connection.c.
Modified:
trunk/backends/nntpget.c
trunk/backends/shlock.c
trunk/configure.ac
trunk/innfeed/host.c
trunk/innfeed/imap_connection.c
trunk/innfeed/misc.c
trunk/nnrpd/misc.c
trunk/nnrpd/post.c
---------------------------+
backends/nntpget.c | 2 +-
backends/shlock.c | 2 +-
configure.ac | 7 ++++---
innfeed/host.c | 2 +-
innfeed/imap_connection.c | 10 +++++++++-
innfeed/misc.c | 2 +-
nnrpd/misc.c | 2 +-
nnrpd/post.c | 6 +++---
8 files changed, 21 insertions(+), 12 deletions(-)
Modified: backends/nntpget.c
===================================================================
--- backends/nntpget.c 2018-06-03 18:33:00 UTC (rev 10290)
+++ backends/nntpget.c 2018-06-05 14:18:37 UTC (rev 10291)
@@ -197,7 +197,7 @@
main(int ac, char *av[])
{
char buff[NNTP_MAXLEN_COMMAND];
- char mesgid[NNTP_MAXLEN_COMMAND];
+ char mesgid[NNTP_MAXLEN_MSGID+10];
char tbuff[SMBUF];
char *msgidfile = NULL;
int msgidfd;
Modified: backends/shlock.c
===================================================================
--- backends/shlock.c 2018-06-03 18:33:00 UTC (rev 10290)
+++ backends/shlock.c 2018-06-05 14:18:37 UTC (rev 10291)
@@ -131,7 +131,7 @@
char *p;
int fd;
char tmp[BUFSIZ];
- char tmp2[BUFSIZ];
+ char tmp2[BUFSIZ+1];
char buff[BUFSIZ];
char *name;
pid_t pid;
Modified: configure.ac
===================================================================
--- configure.ac 2018-06-03 18:33:00 UTC (rev 10290)
+++ configure.ac 2018-06-05 14:18:37 UTC (rev 10291)
@@ -720,7 +720,7 @@
dnl warn on system headers. The warnings below are in the same order as
dnl they're listed in the gcc manual.
dnl
-dnl Last checked against gcc 7.2.0 (2017-11-25).
+dnl Last checked against gcc 8.1.0 (2018-06-05).
dnl
dnl Add -g because when building with warnings, one generally also wants the
dnl debugging information, and add -O3 because gcc won't find some warnings
@@ -741,11 +741,12 @@
[-g -O3 -DDEBUG=1 -Werror -Wall -Wextra -Wdouble-promotion -Wformat=2
-Wformat-overflow=2 -Wformat-truncation=1 -Wnull-dereference -Winit-self
-Wmissing-include-dirs -Wshift-overflow=2
- -Wsync-nand -Wstringop-overflow=4 -Wmissing-format-attribute
+ -Wsync-nand -Wstringop-overflow=4 -Wstringop-truncation
+ -Wmissing-format-attribute
-Walloc-zero -Walloca -Wduplicated-branches -Wduplicated-cond
-Wtrampolines -Wdeclaration-after-statement -Wshadow -Wpointer-arith
-Wc99-c11-compat
- -Wbad-function-cast -Wcast-align -Wwrite-strings
+ -Wbad-function-cast -Wcast-align=strict -Wwrite-strings
-Wdangling-else -Wdate-time
-Wjump-misses-init -Wlogical-op -Wstrict-prototypes
-Wold-style-definition
Modified: innfeed/host.c
===================================================================
--- innfeed/host.c 2018-06-03 18:33:00 UTC (rev 10290)
+++ innfeed/host.c 2018-06-05 14:18:37 UTC (rev 10291)
@@ -3473,7 +3473,7 @@
double cnt = (host->blCount) ? (host->blCount) : 1.0;
double size;
char *tsize;
- char buf[]="1.234e+5 TB"; /* usual length is shorter, like "12.34 MB" */
+ char buf[]="1.234e+05 TB"; /* usual length is shorter, like "12.34 MB" */
ASSERT (host != NULL) ;
ASSERT (fp != NULL) ;
Modified: innfeed/imap_connection.c
===================================================================
--- innfeed/imap_connection.c 2018-06-03 18:33:00 UTC (rev 10290)
+++ innfeed/imap_connection.c 2018-06-05 14:18:37 UTC (rev 10291)
@@ -1289,6 +1289,9 @@
return SASL_OK;
}
+#if __GNUC__ > 7
+# pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
/* callbacks we support */
static sasl_callback_t saslcallbacks[] = {
@@ -1305,6 +1308,10 @@
}
};
+#if __GNUC__ > 7
+# pragma GCC diagnostic warning "-Wcast-function-type"
+#endif
+
static sasl_security_properties_t *make_secprops(int min,int max)
{
sasl_security_properties_t *ret=
@@ -1353,7 +1360,8 @@
{
sasl_security_properties_t *secprops=NULL;
socklen_t addrsize = sizeof(struct sockaddr_in);
- char localip[60], remoteip[60];
+ char localip[NI_MAXHOST+NI_MAXSERV+1];
+ char remoteip[NI_MAXHOST+NI_MAXSERV+1];
struct sockaddr_in saddr_l;
struct sockaddr_in saddr_r;
Modified: innfeed/misc.c
===================================================================
--- innfeed/misc.c 2018-06-03 18:33:00 UTC (rev 10290)
+++ innfeed/misc.c 2018-06-05 14:18:37 UTC (rev 10291)
@@ -381,7 +381,7 @@
bool lockFile (const char *fileName)
{
char buff [20] ;
- char tmpName [PATH_MAX], realName [PATH_MAX] ;
+ char tmpName [PATH_MAX+sizeof(long)+10], realName [PATH_MAX] ;
char *p ;
int fd, i ;
pid_t pid = getpid () ;
Modified: nnrpd/misc.c
===================================================================
--- nnrpd/misc.c 2018-06-03 18:33:00 UTC (rev 10290)
+++ nnrpd/misc.c 2018-06-05 14:18:37 UTC (rev 10291)
@@ -217,7 +217,7 @@
PostRecFilename(char *ip, char *user)
{
static char buff[SPOOLNAMEBUFF];
- char dirbuff[SPOOLNAMEBUFF];
+ char dirbuff[SMBUF+2+3*3];
struct in_addr inaddr;
unsigned long int addr;
unsigned char quads[4];
Modified: nnrpd/post.c
===================================================================
--- nnrpd/post.c 2018-06-03 18:33:00 UTC (rev 10290)
+++ nnrpd/post.c 2018-06-05 14:18:37 UTC (rev 10291)
@@ -341,10 +341,10 @@
static char orgbuff[SMBUF];
static char pathidentitybuff[SMBUF];
static char complaintsbuff[SMBUF];
- static char postingaccountbuff[SMBUF];
- static char postinghostbuff[SMBUF*2]; /* Allocate enough room. */
+ static char postingaccountbuff[SMBUF*2]; /* Allocate enough room. */
+ static char postinghostbuff[SMBUF*2];
static char sendbuff[SMBUF*2];
- static char injectioninfobuff[SMBUF];
+ static char injectioninfobuff[SMBUF*7];
static char *newpath = NULL;
HEADER *hp;
char *p;
More information about the inn-committers
mailing list