1. 10 Nov, 2021 4 commits
    • Nils Goroll's avatar
      Flexelint vmin/vmax/vlimit · 9fd79a7c
      Nils Goroll authored
      avoid warning 666 ("Expression with side effects passed to repeated
      parameter"): The non-type macros still trigger an warning due to the
      expression passed a second time in typeof(). Use the typed macros for
      these cases.
      
      avoid error 1058 ("Initializing a non-const reference"): Our type
      check (void)(&_va == &_vb) trips for dereferences.
      9fd79a7c
    • Nils Goroll's avatar
      vmin/vmax vs. flexelint · 49341548
      Nils Goroll authored
      49341548
    • Nils Goroll's avatar
      vmin/vmax: Avoid typeof() where we can · 7e5213f9
      Nils Goroll authored
      Reviewing flexelint output for the recently added vmin/vmax macros
      made apparent that vmin_t/vmax_t basically used typeof((cast)var),
      which makes for an unnecessary de-tour via typeof.
      
      We change the min/max macros to explicitly pass the type for the
      temporary variables such that typeof() is only needed for vmin/vmax.
      
      Being at it, we also reduce the min/max case to just one take macro
      ("take the min/max of ...") as they only differed in a single
      character, the operator.
      7e5213f9
    • Poul-Henning Kamp's avatar
      Polish to track original in FreeBSD · 6865fc37
      Poul-Henning Kamp authored
      6865fc37
  2. 09 Nov, 2021 1 commit
  3. 08 Nov, 2021 9 commits
  4. 04 Nov, 2021 1 commit
  5. 03 Nov, 2021 2 commits
    • Nils Goroll's avatar
      Fix (struct vpi_ii).p type · 9a20cdfd
      Nils Goroll authored
      It needs to be a generic pointer pointer, because it is initialized as
      a pointer to a pointer to an arbitrary struct, yet (void **) is can not
      be dereferenced.
      
      Right now, the instance info is not used, but this might change.
      9a20cdfd
    • Poul-Henning Kamp's avatar
      FlexeLinting. · 415ed78f
      Poul-Henning Kamp authored
      415ed78f
  6. 01 Nov, 2021 2 commits
  7. 29 Oct, 2021 3 commits
  8. 27 Oct, 2021 5 commits
  9. 26 Oct, 2021 9 commits
    • Poul-Henning Kamp's avatar
    • Poul-Henning Kamp's avatar
    • Poul-Henning Kamp's avatar
      Change the VJSN API to work on OSX · c1ad57b1
      Poul-Henning Kamp authored
      When VJSN is both in libvarnish and libvarnishapi, as in varnishtest,
      you would think one of them took precedence, but not so on OSX.
      
      In the shlib (libvarnishapi) text (code) symbols come from the version
      in the main binary (varnishtest) which got it from libvarnish, whereas
      the data symbols come from the version in libvarnishapi, so we now
      hide the data symbols behind code.
      c1ad57b1
    • Nils Goroll's avatar
      gc stray declaration · 85c04cb9
      Nils Goroll authored
      Ref 611baec6
      85c04cb9
    • Nils Goroll's avatar
      Assert that if a connection is closed before being used, it is so for a reason · 0577bac0
      Nils Goroll authored
      ... but we can not make any assumption as to why
      
      Fixes #3664
      0577bac0
    • Nils Goroll's avatar
      Add std.strftime() · f970f175
      Nils Goroll authored
      add a vmod function for strftime() formatting in UTC.
      f970f175
    • Nils Goroll's avatar
      vcc: minor VSB polish · 12be3d38
      Nils Goroll authored
      12be3d38
    • Nils Goroll's avatar
      vcc: Fix dynamic calls to built-in SUBs and properly check evaluation context · f653000e
      Nils Goroll authored
      As a follow-up issue from #3719, it was noticed that dynamic calls to
      built-in SUBs did not work.
      
      This issue was caused by more (struct symbol) members missing
      initialization in VCC_New().
      
      In turn, it became apparent that the evaluation context check in
      vcc_expr5() as tested in v00020.vtc only worked by accident, and only
      for built-in subs because (struct symbol).eval was NULL for built-in
      subs.
      
      We fix SUB type expression evaluation with a type specific evaluation
      function which allows expression evaluation from explicit SUB contexts
      only.
      
      Fixes #3720
      f653000e
    • Nils Goroll's avatar
      vcc: do not overwrite SUB symbol properties when call'ing · 006618c0
      Nils Goroll authored
      vcc_act_call() implements use-before-define semantics. To do so, it
      needs to instantiate SUB symbols if they do not exist.
      
      However, it wrongly called VCC_GlobalSymbol() also for existing
      symbols, overwriting symbol properties.
      
      In the case of the built-in subs, the symbol's lname (historically)
      still is the unescaped literal name, while user defined subs have
      their name escaped via VCC_GlobalSymbol() -> VCC_PrintCName().
      
      This made the wrong call to VCC_GlobalSymbol() apparent when a
      built-in sub was called with an explicit "call" action.
      
      Besides fixing the VCC_GlobalSymbol() call, we also need to set the
      lname and rname attributes for built-in SUB symbols initialized in
      VCC_New().
      
      Alternatively, we could also have used VCC_GlobalSymbol() there, but
      that would have affected other places where we (still) rely on the
      known name scheme of built-in subs, e.h. EmitStruct(). While the name
      unifaction was nice in general, I found the necessary changes (look up
      SUB symbols) not worth the benefit.
      
      Fixes #3719
      006618c0
  10. 25 Oct, 2021 2 commits
  11. 13 Oct, 2021 2 commits