• Nick Mathewson's avatar
    Enable -Wnull-dereference (GCC >=6.1), and fix the easy cases · 4f8086fb
    Nick Mathewson authored
    This warning, IIUC, means that the compiler doesn't like it when it
    sees a NULL check _after_ we've already dereferenced the
    variable. In such cases, it considers itself free to eliminate the
    NULL check.
    
    There are a couple of tricky cases:
    
    One was the case related to the fact that tor_addr_to_in6() can
    return NULL if it gets a non-AF_INET6 address.  The fix was to
    create a variant which asserts on the address type, and never
    returns NULL.
    4f8086fb