mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
fixed compiler warnings
This commit is contained in:
parent
58b96facc3
commit
a2f6ebeff2
3 changed files with 17 additions and 7 deletions
|
|
@ -481,10 +481,11 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar
|
|||
|
||||
if ( args_info->proxy_arg == NULL ) {
|
||||
if ( ((tmp = getenv("http_proxy")) != NULL) || ((tmp = getenv("HTTP_PROXY")) != NULL) ) {
|
||||
int r;
|
||||
//int r;
|
||||
char * temp;
|
||||
temp = malloc( 56+1 );
|
||||
r = sscanf( tmp, "http://%56[^/]/", temp );
|
||||
sscanf( tmp, "http://%56[^/]/", temp );
|
||||
//r = sscanf( tmp, "http://%56[^/]/", temp );
|
||||
// message( "r = '%d'\ntemp = '%s'\n", r, temp);
|
||||
|
||||
args_info->proxy_given = 1;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ int stream_copy(PTSTREAM *pts_from, PTSTREAM *pts_to) {
|
|||
/* Initiate an SSL handshake on this stream and encrypt all subsequent data */
|
||||
int stream_enable_ssl(PTSTREAM *pts) {
|
||||
#ifdef USE_SSL
|
||||
SSL_METHOD *meth;
|
||||
const SSL_METHOD *meth;
|
||||
SSL *ssl;
|
||||
SSL_CTX *ctx;
|
||||
|
||||
|
|
|
|||
|
|
@ -135,8 +135,13 @@ restart:
|
|||
oterm.c_lflag |= ECHO;
|
||||
}
|
||||
|
||||
if (!(flags & RPP_STDIN))
|
||||
(void)write(output, prompt, strlen(prompt));
|
||||
if (!(flags & RPP_STDIN)) {
|
||||
ssize_t bytes_written = write(output, prompt, strlen(prompt));
|
||||
if (bytes_written != strlen(prompt)) {
|
||||
message("Error on writing bytes to prompt\n");
|
||||
}
|
||||
}
|
||||
|
||||
end = buf + bufsiz - 1;
|
||||
for (p = buf; (nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r';) {
|
||||
if (p < end) {
|
||||
|
|
@ -153,8 +158,12 @@ restart:
|
|||
}
|
||||
*p = '\0';
|
||||
save_errno = errno;
|
||||
if (!(term.c_lflag & ECHO))
|
||||
(void)write(output, "\n", 1);
|
||||
if (!(term.c_lflag & ECHO)) {
|
||||
ssize_t bytes_written = write(output, "\n", 1);
|
||||
if (bytes_written != 1) {
|
||||
message("Error writing one byte to prompt\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Restore old terminal settings and signals. */
|
||||
if (memcmp(&term, &oterm, sizeof(term)) != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue