opnsense-src/sys/compat/linuxkpi/common/include
Dimitry Andric 4bdad53c24 Fix statement with no effect in linuxkpi's xarray.h
When compiling the kernel with gcc 14, errors similar to the following
are emitted:

  sys/dev/cxgbe/iw_cxgbe/ev.c: In function 'c4iw_ev_handler':
  sys/compat/linuxkpi/common/include/linux/xarray.h:132:23: error: statement with no effect [-Werror=unused-value]
    132 |                 flags == 0; \
  sys/dev/cxgbe/iw_cxgbe/ev.c:274:17: note: in expansion of macro 'xa_unlock_irqrestore'
    274 |                 xa_unlock_irqrestore(&dev->cqs, flag);
        |                 ^~~~~~~~~~~~~~~~~~~~
  sys/compat/linuxkpi/common/include/linux/xarray.h:132:23: error: statement with no effect [-Werror=unused-value]
    132 |                 flags == 0; \
  sys/dev/cxgbe/iw_cxgbe/ev.c:283:17: note: in expansion of macro 'xa_unlock_irqrestore'
    283 |                 xa_unlock_irqrestore(&dev->cqs, flag);
        |                 ^~~~~~~~~~~~~~~~~~~~

It looks like the intent of the "flags == 0" statement was to make the
'flags' macro argument not unused, but it still results in a warning.
Use the construct "(void)flags" instead.

Reviewed by:	bz
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D59787

(cherry picked from commit aca53fc2a6879f45dcbe1a60f91f14a5f6d48448)
2026-10-07 07:54:13 +02:00
..
acpi LinuxKPI: acpi; fix type to acpi_get_handle() 2025-09-15 14:51:36 +00:00
asm linuxkpi: work with numpages > 1 in the set_pages_*() KPIs 2026-09-23 11:26:47 +02:00
asm-generic
crypto
kunit LinuxKPI: kunit: add static_stub.h and more dummy headers 2025-09-15 14:52:49 +00:00
linux Fix statement with no effect in linuxkpi's xarray.h 2026-10-07 07:54:13 +02:00
media linuxkpi: Replicate the chain of #include in the cec*.h headers 2026-04-22 20:56:57 +00:00
net LinuxKPI: 802.11: add more defines, structures, ... 2026-09-23 11:55:49 +02:00
video linuxkpi: Include <linux/{types,io}.h> from <video/vga.h> 2025-01-31 17:00:48 +01:00
xen LinuxKPI: Add xen/xen.h header 2023-12-24 11:19:58 +03:00
stdarg.h machine/stdarg.h -> sys/stdarg.h 2025-06-11 17:39:02 +01:00