Unverified Commit 8ece8177 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

cleanup: remove FIXME and TODO comments

They serve very little purpose and mostly just add noise. Most of them
have been around for a very long time. I read them all before removing
or rephrasing them.

Ref: #3876
Closes #3883
parent f506ce09
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -518,9 +518,6 @@ int main(int argc _Unused, char **argv _Unused)
  fprintf(MSG_OUT, "Entering wait loop\n");
  fflush(MSG_OUT);
  while(!g_should_exit_) {
    /* TODO(josh): use epoll_pwait to avoid a race on the signal. Mask the
     * signal before the while loop, and then re-enable the signal during
     * epoll wait. Mask at the end of the loop. */
    err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct epoll_event),
                     10000);
    if(err == -1) {
+1 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2019, 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
@@ -56,7 +56,6 @@ int main(void)
    curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
    /* Ask for filetime */
    curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
    /* No header output: TODO 14.1 http-style HEAD output for ftp */
    curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, throw_away);
    curl_easy_setopt(curl, CURLOPT_HEADER, 0L);
    /* Switch on full protocol/debug output */
+2 −8
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ __extension__ ({ \
})

/* wraps curl_easy_getinfo() with typechecking */
/* FIXME: don't allow const pointers */
#define curl_easy_getinfo(handle, info, arg)                                  \
__extension__ ({                                                              \
  __typeof__(info) _curl_info = info;                                         \
@@ -146,9 +145,8 @@ __extension__ ({ \
  curl_easy_getinfo(handle, _curl_info, arg);                                 \
})

/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(),
 * for now just make sure that the functions are called with three
 * arguments
/*
 * For now, just make sure that the functions are called with three arguments
 */
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
@@ -506,10 +504,6 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_off_t,
   _curl_is_arr((expr), char) ||                                              \
   _curl_is_arr((expr), unsigned char))

/* FIXME: the whole callback checking is messy...
 * The idea is to tolerate char vs. void and const vs. not const
 * pointers in arguments at least
 */
/* helper: __builtin_types_compatible_p distinguishes between functions and
 * function pointers, hide it */
#define _curl_callback_compatible(func, type)                                 \
+4 −6
Original line number Diff line number Diff line
@@ -253,7 +253,6 @@ struct altsvcinfo *Curl_altsvc_init(void)
    | CURLALTSVC_H2
#endif
#ifdef USE_HTTP3
    /* TODO: adjust when known */
    | CURLALTSVC_H3
#endif
    ;
@@ -349,7 +348,7 @@ static CURLcode getalnum(const char **ptr, char *alpnbuf, size_t buflen)
  len = p - protop;

  if(!len || (len >= buflen))
    return CURLE_BAD_FUNCTION_ARGUMENT; /* TODO: improve error code */
    return CURLE_BAD_FUNCTION_ARGUMENT;
  memcpy(alpnbuf, protop, len);
  alpnbuf[len] = 0;
  *ptr = p;
@@ -425,7 +424,6 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,

  /* "clear" is a magic keyword */
  if(strcasecompare(alpnbuf, "clear")) {
    /* TODO: clear whatever it is it should clear */
    return CURLE_OK;
  }

@@ -478,7 +476,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
            p++;
          len = p - hostp;
          if(!len || (len >= MAX_ALTSVC_HOSTLEN))
            return CURLE_BAD_FUNCTION_ARGUMENT; /* TODO: improve error code */
            return CURLE_BAD_FUNCTION_ARGUMENT;
          memcpy(namebuf, hostp, len);
          namebuf[len] = 0;
          dsthost = namebuf;
@@ -504,8 +502,8 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
                             srcalpnid, dstalpnid,
                             srcport, dstport);
        if(as) {
          /* TODO: the expires time also needs to take the Age: value (if any)
             into account. [See RFC 7838 section 3.1] */
          /* The expires time also needs to take the Age: value (if any) into
             account. [See RFC 7838 section 3.1] */
          as->expires = maxage + time(NULL);
          as->persist = persist;
          Curl_llist_insert_next(&asi->list, asi->list.tail, as, &as->node);
+1 −3
Original line number Diff line number Diff line
@@ -490,9 +490,7 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,

  if(result)
    /* close the connection, since we can't return failure here without
       cleaning up this connection properly.
       TODO: remove this action from here, it is not a name resolver decision.
    */
       cleaning up this connection properly. */
    connclose(conn, "c-ares resolve failed");

  return result;
Loading