Commit d5e11f21 authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Fix warnings from doxygen

Most of these are simple.  The only nontrivial part is that our
pattern for using ENUM_BF was confusing doxygen by making declarations
that didn't look like declarations.
parent c3dd2e3d
Loading
Loading
Loading
Loading

changes/doxygen_fixes

0 → 100644
+6 −0
Original line number Diff line number Diff line
  o Documentation:
    - Resolve warnings from Doxygen.

  o Code simplification and refactoring:
    - Change our use of the ENUM_BF macro to avoid declarations that
      confuse Doxygen.
+3 −3
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ tor_addr_make_unspec(tor_addr_t *a)
  a->family = AF_UNSPEC;
}

/** Set address <a>a</b> to the null address in address family <b>family</b>.
/** Set address <b>a</b> to the null address in address family <b>family</b>.
 * The null address for AF_INET is 0.0.0.0.  The null address for AF_INET6 is
 * [::].  AF_UNSPEC is all null. */
void
@@ -1463,8 +1463,8 @@ is_internal_IP(uint32_t ip, int for_listening)
 * allocated string holding the address portion and *<b>port_out</b>
 * to the port.
 *
 * Don't do DNS lookups and don't allow domain names in the <ip> field.
 * Don't accept <b>addrport</b> of the form "<ip>" or "<ip>:0".
 * Don't do DNS lookups and don't allow domain names in the "ip" field.
 * Don't accept <b>addrport</b> of the form "ip" or "ip:0".
 *
 * Return 0 on success, -1 on failure. */
int
+1 −1
Original line number Diff line number Diff line
@@ -1594,7 +1594,7 @@ struct crypto_digest_t {
    SHA256_CTX sha2; /**< state for SHA256 */
  } d; /**< State for the digest we're using.  Only one member of the
        * union is usable, depending on the value of <b>algorithm</b>. */
  ENUM_BF(digest_algorithm_t) algorithm : 8; /**< Which algorithm is in use? */
  digest_algorithm_bitfield_t algorithm : 8; /**< Which algorithm is in use? */
};

/** Allocate and return a new digest object to compute SHA1 digests.
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ typedef enum {
  DIGEST_SHA256 = 1,
} digest_algorithm_t;
#define  N_DIGEST_ALGORITHMS (DIGEST_SHA256+1)
#define digest_algorithm_bitfield_t ENUM_BF(digest_algorithm_t)

/** A set of all the digests we know how to compute, taken on a single
 * string.  Any digests that are shorter than 256 bits are right-padded
+2 −1
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ typedef enum {
    TOR_TLS_ST_SENTCLOSE, TOR_TLS_ST_CLOSED, TOR_TLS_ST_RENEGOTIATE,
    TOR_TLS_ST_BUFFEREVENT
} tor_tls_state_t;
#define tor_tls_state_bitfield_t ENUM_BF(tor_tls_state_t)

/** Holds a SSL object and its associated data.  Members are only
 * accessed from within tortls.c.
@@ -159,7 +160,7 @@ struct tor_tls_t {
  SSL *ssl; /**< An OpenSSL SSL object. */
  int socket; /**< The underlying file descriptor for this TLS connection. */
  char *address; /**< An address to log when describing this connection. */
  ENUM_BF(tor_tls_state_t) state : 3; /**< The current SSL state,
  tor_tls_state_bitfield_t state : 3; /**< The current SSL state,
                                       * depending on which operations
                                       * have completed successfully. */
  unsigned int isServer:1; /**< True iff this is a server-side connection */
Loading