Commit bab2f9b
drivers: hv: dxgkrnl: Add noop do-while to non-DEBUG DXG_TRACE to avoid compiler warnings (Nevuly/WSL2-Rolling-Kernel-Issue#37)
When compiling with no DEBUG, snippets like the following generates a
compiler warning on GCC 15 due to DXG_TRACE being expanded into
nothing, which in turn leads to build failures when WERROR=y.
if (result)
DXG_TRACE("...");
An example of error message is as follows:
drivers/hv/dxgkrnl/dxgmodule.c: In function ‘dxg_pci_probe_device’:
drivers/hv/dxgkrnl/dxgmodule.c:598:43: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
598 | DXG_TRACE("err: %d", ret);
This patch modifies the macro so that it generates a noop do-while
loop, serving as a placeholder statement and silencing the warning.
Signed-off-by: Rong Bao <[email protected]>1 parent c40eb1e commit bab2f9b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
1031 | | - | |
| 1031 | + | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
| |||
0 commit comments