BUILD: map: fix build warning
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 27 Nov 2023 13:49:33 +0000 (14:49 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 27 Nov 2023 14:03:41 +0000 (15:03 +0100)
commiteabe477ad2d57da5477deafc93319a1f02bd7b6f
treee1f15ba249e1e88a62daddec08c03e3474197713
parent3ac9912837118a81f3291e106ce9a7c4be6c934f
BUILD: map: fix build warning

<pattern> field pointer of pat_ref_elt structure has been by a
zero-length array. As such, it's now unneeded to check for NULL address
before printing it.

This type conversion was done in the following commit :
  3ac9912837118a81f3291e106ce9a7c4be6c934f
  OPTIM: pattern: save memory and time using ebst instead of ebis

The current patch is mandatory to fix the following GCC warning :
CC src/map.o
  src/map.c: In function ‘cli_io_handler_map_lookup’:
  src/map.c:549:54: error: the comparison will always evaluate as ‘true’ for the address of ‘pattern’ will never be NULL [-Werror=address]
  549 |                                         if (pat->ref && pat->ref->pattern)
      |

No need to backport it unless the above commit is.
src/map.c