From 85ae25cdf5f7ed89aef400d7f7132e564b7f400a Mon Sep 17 00:00:00 2001 From: zodiac Date: Mon, 16 Mar 2009 15:08:11 +0000 Subject: [PATCH] Fixed some compiler warnings that newer versions of GCC issue. git-svn-id: https://shellinabox.googlecode.com/svn/trunk@75 0da03de8-d603-11dd-86c2-0f8696b7b6f9 --- ChangeLog | 4 ++++ config.h | 12 ++++++------ shellinabox/launcher.c | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b491dd8..d989d56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-03-16 Markus Gutschke + + * Fixed some compiler warnings, that newer versions of GCC issue. + 2009-02-27 Markus Gutschke * Added fallback on old-style pty's, if /dev/pts is not mounted. diff --git a/config.h b/config.h index 4820e85..0875fd0 100644 --- a/config.h +++ b/config.h @@ -20,13 +20,13 @@ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_BIO_H 1 +/* #undef HAVE_OPENSSL_BIO_H */ /* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_ERR_H 1 +/* #undef HAVE_OPENSSL_ERR_H */ /* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_SSL_H 1 +/* #undef HAVE_OPENSSL_SSL_H */ /* Define to 1 if you have the header file. */ #define HAVE_PTHREAD_H 1 @@ -35,13 +35,13 @@ #define HAVE_PTSNAME_R 1 /* Define to 1 if you have the header file. */ -#define HAVE_SECURITY_PAM_APPL_H 1 +/* #undef HAVE_SECURITY_PAM_APPL_H */ /* Define to 1 if you have the header file. */ -#define HAVE_SECURITY_PAM_CLIENT_H 1 +/* #undef HAVE_SECURITY_PAM_CLIENT_H */ /* Define to 1 if you have the header file. */ -#define HAVE_SECURITY_PAM_MISC_H 1 +/* #undef HAVE_SECURITY_PAM_MISC_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c index a722b53..de13ab8 100644 --- a/shellinabox/launcher.c +++ b/shellinabox/launcher.c @@ -366,7 +366,7 @@ int launchChild(int service, struct Session *session) { .width = session->width, .height = session->height }; strncat(request.peerName, httpGetPeerName(session->http), - sizeof(request.peerName)); + sizeof(request.peerName) - 1); if (NOINTR(write(launcher, &request, sizeof(request))) != sizeof(request)) { return -1; } @@ -1243,7 +1243,7 @@ static void launcherDaemon(int fd) { } else { int fds[2]; if (!pipe(fds)) { - write(fds[1], "forkpty() failed\r\n", 18); + NOINTR(write(fds[1], "forkpty() failed\r\n", 18)); NOINTR(close(fds[1])); pty = fds[0]; pid = 0;