[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-169-g7faf4
From: |
Mats Erik Andersson |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-169-g7faf49c |
Date: |
Thu, 13 Sep 2012 22:37:41 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 7faf49c035c277daa3f8e01d1581223ab2a4a8e4 (commit)
from 9aa72c7a975724fa70f4025b47ce3ee4723b75bd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=7faf49c035c277daa3f8e01d1581223ab2a4a8e4
commit 7faf49c035c277daa3f8e01d1581223ab2a4a8e4
Author: Mats Erik Andersson <address@hidden>
Date: Fri Sep 14 00:21:17 2012 +0200
telnetd: Compiler warnings.
diff --git a/ChangeLog b/ChangeLog
index adbf56a..3c4fecf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2012-09-14 Mats Erik Andersson <address@hidden>
+
+ telnetd: Compiler warnings.
+
+ * telnetd/pty.c (startslave) [!AUTHENTICATION]:
+ Trivially use autoname.
+ (start_login): Trivially use host, autologin, name.
+ * telnetd/telnetd.c: Include <unused-parameter.h>
+ (argp_options): Add missing fields. Collect options
+ for authentication into a separate group. New macro GRID.
+ (parse_opt): Add _GL_UNUSED_PARAMETER.
+ (argp): Add missing fields.
+ * telnetd/term.c (tty_setlinemode) [!TIOCEXT && !EXTPROC]:
+ Trivially use `on'.
+ * telnetd/utility.c (pty_output_datalen): Cast integer
+ difference as size_t.
+ (pty_get_char): Likewise.
+ (stilloob): Add missing field in TIMEOUT.
+ (getterminaltype) [!AUTHENTICATION]: Trivially use user_name.
+ (printsub) [AUTHENTICATION && ENCRYPTION]: Declare BUF as
+ array of unsigned char.
+ <case TELQUAL_NAME>: Cast array reference as `char *'
+ inside call to debug_output_datalen.
+ (_var_long_name): Trivially use start and length.
+
2012-09-13 Mats Erik Andersson <address@hidden>
Use libdl only when needed, i.e., with libpam.
diff --git a/telnetd/pty.c b/telnetd/pty.c
index d333a88..83fd373 100644
--- a/telnetd/pty.c
+++ b/telnetd/pty.c
@@ -51,7 +51,10 @@ startslave (char *host, int autologin, char *autoname)
fatal (net, "Authorization failed");
exit (EXIT_FAILURE);
}
+#else /* !AUTHENTICATION */
+ (void) autoname; /* Silence warnings. */
#endif
+
pid = forkpty (&master, line, NULL, NULL);
if (pid < 0)
{
@@ -112,6 +115,10 @@ start_login (char *host, int autologin, char *name)
int argc;
char **argv;
+ (void) host; /* Silence warnings. Diagnostic use? */
+ (void) autologin;
+ (void) name;
+
scrub_env ();
/* Set the environment variable "LINEMODE" to indicate our linemode */
diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c
index 064d6cd..c376197 100644
--- a/telnetd/telnetd.c
+++ b/telnetd/telnetd.c
@@ -26,6 +26,7 @@
#include <argp.h>
#include <progname.h>
#include <error.h>
+#include <unused-parameter.h>
#include <libinetutils.h>
#if defined AUTHENTICATION || defined ENCRYPTION
@@ -99,37 +100,39 @@ struct telnetd_clocks clocks;
static struct argp_option argp_options[] = {
-#ifdef AUTHENTICATION
- { "authmode", 'a', "MODE", 0,
- "specify what mode to use for authentication" },
-#endif
+#define GRID 10
{ "debug", 'D', "LEVEL", OPTION_ARG_OPTIONAL,
- "set debugging level" },
+ "set debugging level", GRID },
{ "exec-login", 'E', "STRING", 0,
- "set program to be executed instead of " PATH_LOGIN },
+ "set program to be executed instead of " PATH_LOGIN, GRID },
{ "no-hostinfo", 'h', NULL, 0,
- "do not print host information before login has been completed" },
+ "do not print host information before login has been completed", GRID },
{ "linemode", 'l', "MODE", OPTION_ARG_OPTIONAL,
- "set line mode" },
+ "set line mode", GRID },
{ "no-keepalive", 'n', NULL, 0,
- "disable TCP keep-alives" },
-#if defined AUTHENTICATION || defined ENCRYPTION
- { "server-principal", 'S', "NAME", 0,
- "set Kerberos principal name for this server instance, "
- "with or without explicit realm" },
-#endif
+ "disable TCP keep-alives", GRID },
{ "reverse-lookup", 'U', NULL, 0,
"refuse connections from addresses that "
- "cannot be mapped back into a symbolic name" },
-#ifdef AUTHENTICATION
+ "cannot be mapped back into a symbolic name", GRID },
+#undef GRID
+
+#ifdef AUTHENTICATION
+# define GRID 20
+ { NULL, 0, NULL, 0, "Authentication control:", GRID },
+ { "authmode", 'a', "MODE", 0,
+ "specify what mode to use for authentication", GRID },
+ { "server-principal", 'S', "NAME", 0,
+ "set Kerberos principal name for this server instance, "
+ "with or without explicit realm", GRID },
{ "disable-auth-type", 'X', "TYPE", 0,
- "disable the use of given authentication option" },
-#endif
- { NULL }
+ "disable the use of given authentication option", GRID },
+# undef GRID
+#endif /* AUTHENTICATION */
+ { NULL, 0, NULL, 0, NULL, 0 }
};
static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER)
{
switch (key)
{
@@ -187,7 +190,8 @@ static struct argp argp =
argp_options,
parse_opt,
NULL,
- "DARPA telnet protocol server"
+ "DARPA telnet protocol server",
+ NULL, NULL, NULL
};
diff --git a/telnetd/term.c b/telnetd/term.c
index 6ee845e..2b74610 100644
--- a/telnetd/term.c
+++ b/telnetd/term.c
@@ -305,6 +305,8 @@ tty_setlinemode (int on)
termbuf.c_lflag |= EXTPROC;
else
termbuf.c_lflag &= ~EXTPROC;
+# else /* !EXTPROC */
+ (void) on; /* Silence warnings. */
# endif
# endif /* TIOCEXT */
}
diff --git a/telnetd/utility.c b/telnetd/utility.c
index b02601a..0ca1f99 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -302,7 +302,7 @@ pty_output_byte (int c)
void
pty_output_datalen (const void *data, size_t len)
{
- if ((&ptyobuf[BUFSIZ] - pfrontp) > len)
+ if ((size_t) (&ptyobuf[BUFSIZ] - pfrontp) > len)
ptyflush ();
memcpy (pfrontp, data, len);
pfrontp += len;
@@ -362,7 +362,7 @@ pty_get_char (int peek)
int
pty_input_putback (const char *str, size_t len)
{
- if (len > &ptyibuf[BUFSIZ] - ptyip)
+ if (len > (size_t) (&ptyibuf[BUFSIZ] - ptyip))
len = &ptyibuf[BUFSIZ] - ptyip;
strncpy (ptyip, str, len);
pcc += len;
@@ -445,7 +445,7 @@ io_drain (void)
int
stilloob (int s)
{
- static struct timeval timeout = { 0 };
+ static struct timeval timeout = { 0, 0 };
fd_set excepts;
int value;
@@ -720,7 +720,9 @@ getterminaltype (char *user_name)
if (his_state_is_will (TELOPT_AUTHENTICATION))
retval = auth_wait (user_name);
}
-#endif /* AUTHENTICATION */
+#else /* !AUTHENTICATION */
+ (void) user_name; /* Silence warning. */
+#endif
#ifdef ENCRYPTION
send_will (TELOPT_ENCRYPT, 1);
@@ -929,7 +931,7 @@ printsub (int direction, unsigned char *pointer, int length)
register int i;
#if defined AUTHENTICATION && defined ENCRYPTION
- char buf[512];
+ unsigned char buf[512];
#endif
if (direction)
@@ -1447,7 +1449,7 @@ printsub (int direction, unsigned char *pointer, int
length)
case TELQUAL_NAME:
i = 2;
debug_output_data (" NAME \"");
- debug_output_datalen (&pointer[i], length);
+ debug_output_datalen ((char *) &pointer[i], length);
i += length;
debug_output_data ("\"");
break;
@@ -1686,6 +1688,8 @@ _var_short_name (struct line_expander *exp)
char *
_var_long_name (struct line_expander *exp, char *start, int length)
{
+ (void) start; /* Silence warnings until implemented. */
+ (void) length;
exp->state = EXP_STATE_ERROR;
return NULL;
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 25 +++++++++++++++++++++++++
telnetd/pty.c | 7 +++++++
telnetd/telnetd.c | 46 +++++++++++++++++++++++++---------------------
telnetd/term.c | 2 ++
telnetd/utility.c | 16 ++++++++++------
5 files changed, 69 insertions(+), 27 deletions(-)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-169-g7faf49c,
Mats Erik Andersson <=