Fix warnings trivial warnings.
Fix warnings about: . Unused variables . format mismatch in printf/scanf format string and arguments . Missing parenthesis around assignment as truth values . Clang warnings anout unknown GCC pragma
This commit is contained in:
@@ -37,7 +37,9 @@
|
||||
#include <net/gen/inet.h>
|
||||
#include "telnetd.h"
|
||||
|
||||
#if 0
|
||||
static char *Version = "@(#) telnetd 1.00 (07/26/92)";
|
||||
#endif
|
||||
|
||||
int opt_d = 0; /* debugging output flag */
|
||||
|
||||
@@ -105,7 +107,7 @@ char *hostname;
|
||||
lineno = 0;
|
||||
for (;;) {
|
||||
if ((ttyp = getttyent()) == NULL) {
|
||||
sprintf(buff, "Can't find %s in the tty table\r\n");
|
||||
sprintf(buff, "Can't find the tty entry in the tty table\r\n");
|
||||
(void) write(1, buff, strlen(buff));
|
||||
}
|
||||
if (strcmp(ttyp->ty_name, tty_name+5) == 0) break;
|
||||
|
||||
@@ -96,7 +96,7 @@ int len;
|
||||
(void) write(fdout, buf, len);
|
||||
}
|
||||
|
||||
int set_winsize(int fd, unsigned int cols, unsigned int rows)
|
||||
void set_winsize(int fd, unsigned int cols, unsigned int rows)
|
||||
{
|
||||
struct winsize w;
|
||||
memset(&w, 0, sizeof(w));
|
||||
@@ -105,7 +105,7 @@ int set_winsize(int fd, unsigned int cols, unsigned int rows)
|
||||
ioctl(fd, TIOCSWINSZ, (char *) &w);
|
||||
}
|
||||
|
||||
int tel_in(fdout, telout, buffer, len)
|
||||
void tel_in(fdout, telout, buffer, len)
|
||||
int fdout;
|
||||
int telout;
|
||||
char *buffer;
|
||||
@@ -227,7 +227,7 @@ int c;
|
||||
write(fdout, buffer, size);
|
||||
}
|
||||
|
||||
int tel_out(fdout, buf, size)
|
||||
void tel_out(fdout, buf, size)
|
||||
int fdout;
|
||||
char *buf;
|
||||
int size;
|
||||
|
||||
@@ -16,5 +16,5 @@ void term_init(void);
|
||||
void term_inout(int pty_fd);
|
||||
void tel_init(void);
|
||||
void telopt(int fdout, int what, int option);
|
||||
int tel_in(int fdout, int telout, char *buffer, int len);
|
||||
int tel_out(int fdout, char *buf, int size);
|
||||
void tel_in(int fdout, int telout, char *buffer, int len);
|
||||
void tel_out(int fdout, char *buf, int size);
|
||||
|
||||
@@ -107,6 +107,6 @@ char *label;
|
||||
{
|
||||
char message[128];
|
||||
|
||||
sprintf(message, "telnetd: %s: %s\r\n", strerror(errno));
|
||||
sprintf(message, "telnetd: %i: %s\r\n", errno, strerror(errno));
|
||||
(void) write(1, message, strlen(message));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user