Commit 6ea91af2 authored by Yang Tse's avatar Yang Tse
Browse files

fix compiler warning

parent b7674403
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -1836,15 +1836,12 @@ static CURLcode https_connecting(struct connectdata *conn, bool *done)

  /* perform SSL initialization for this socket */
  result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done);
  if(result) {
  if(result)
    conn->bits.close = TRUE; /* a failed connection is marked for closure
                                to prevent (bad) re-use or similar */
  return result;
}

  return CURLE_OK;
}

#ifdef USE_SSLEAY
/* This function is OpenSSL-specific. It should be made to query the generic
   SSL layer instead. */
+3 −3
Original line number Diff line number Diff line
@@ -85,9 +85,9 @@
 We avoid the use of isxdigit to accommodate non-ASCII hosts. */
static bool Curl_isxdigit(char digit)
{
  return (digit >= 0x30 && digit <= 0x39)    /* 0-9 */
  return (bool)( (digit >= 0x30 && digit <= 0x39)    /* 0-9 */
              || (digit >= 0x41 && digit <= 0x46)    /* A-F */
      || (digit >= 0x61 && digit <= 0x66);   /* a-f */
              || (digit >= 0x61 && digit <= 0x66) ); /* a-f */
}

void Curl_httpchunk_init(struct connectdata *conn)
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -113,7 +113,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
  fputs(prompt, stderr);

  for(i=0; i<buflen; i++) {
    buffer[i] = getch();
    buffer[i] = (char)getch();
    if ( buffer[i] == '\r' || buffer[i] == '\n' ) {
      buffer[i] = 0;
      break;
+6 −6
Original line number Diff line number Diff line
@@ -1852,7 +1852,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
        config->disable_epsv = toggle;
        break;
      case 'E': /* --epsv */
        config->disable_epsv = !toggle;
        config->disable_epsv = (bool)(!toggle);
        break;
#ifdef USE_ENVIRONMENT
      case 'f':
@@ -2021,7 +2021,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
        config->disable_eprt = toggle;
        break;
      case 'Z': /* --eprt */
        config->disable_eprt = !toggle;
        config->disable_eprt = (bool)(!toggle);
        break;

      default: /* the URL! */
@@ -2148,7 +2148,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
        config->ftp_ssl_reqd = toggle;
        break;
      case 'w': /* --no-sessionid */
        config->disable_sessionid = !toggle;
        config->disable_sessionid = (bool)(!toggle);
        break;
      case 'x': /* --ftp-ssl-control */
        config->ftp_ssl_control = toggle;
@@ -2172,7 +2172,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
        config->post301 = toggle;
        break;
      case '1': /* --no-keepalive */
        config->nokeepalive = !toggle;
        config->nokeepalive = (bool)(!toggle);
        break;
      case '3': /* --keepalive-time */
        if(str2num(&config->alivetime, nextarg))
@@ -2602,7 +2602,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
      break;
    case 'N':
      /* disable the output I/O buffering */
      config->nobuffer = !toggle;
      config->nobuffer = (bool)(!toggle);
      break;
    case 'O': /* --remote-name */
      if(subletter == 'a') { /* --remote-name-all */
@@ -2727,7 +2727,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
        config->mute = config->noprogress = TRUE;
      else
        config->mute = config->noprogress = FALSE;
      config->showerror = !toggle; /* toggle off */
      config->showerror = (bool)(!toggle); /* toggle off */
      break;
    case 'S':
      /* show errors */