1. 08 Jan, 2021 3 commits
    • Dridi Boukelmoune's avatar
      vtc: Flip the feature check in v4 · 32ea9c59
      Dridi Boukelmoune authored
      In order to run the test we want to NOT be using gcov, so we should test
      that the environment variable is empty. In theory that should mean that
      GCOV runs should currently fail since the feature check is currently
      backwards so I may revert this change if that suddenly happens.
      
      I find `test -z ...` more readable than `[ -z ... ]` in this context, so
      if it comes to a revert, I will keep the test(1) syntax.
      32ea9c59
    • Nils Goroll's avatar
      Add VSA_getsockname() · 2b63ee2d
      Nils Goroll authored
      Flexelint on Linux exhibits exactly the problem described by phk in
      his rant at the top of vsa.c, quote:
      
      	Do I need to tell you that static code analysis tools have a
      	really hard time coping with (struct suckaddr_storage), and
      	that they give a lot of false negatives which confuse people ?
      
      One instance of this issue:
      
      --- Module:   cache/cache_acceptor.c (C)
                                                     _
       #... _assert(!!((getsockname(sp->fd, (void*)&ss, &sl)) == 0)) /*lint -restore *
       #... getsockname(sp->fd, (void*)&ss, &sl)) == 0); } while (0)
      	AZ(getsockname(sp->fd, (void*)&ss, &sl));
      cache/cache_acceptor.c  330  Error 64: Type mismatch (arg. no. 2) (union
          __SOCKADDR_ARG = void *)
                                       _
       #... SA_Build(sa, &ss, sl)) != 0); } while (0)
      	AN(VSA_Build(sa, &ss, sl));
      cache/cache_acceptor.c  332  Warning 603: Symbol 'ss' (line 318) not
          initialized
      cache/cache_acceptor.c  318  Info 830: Location cited in prior message
                                                                        _
      			i = accept(ls->sock, (void*)&wa.acceptaddr,
      cache/cache_acceptor.c  458  Error 64: Type mismatch (arg. no. 2) (union
          __SOCKADDR_ARG = void *)
      
      There is one more in cache/cache_backend_probe.c
      
      As the purpose of VSA is to avoid exactly this kind of trouble, we
      provide a VSA-wrapper for getsockname.
      2b63ee2d
    • Nils Goroll's avatar
      remove accidental leftover · 2e663f90
      Nils Goroll authored
      2e663f90
  2. 07 Jan, 2021 33 commits
  3. 06 Jan, 2021 4 commits