Skip to content

vtest: Fix undefined behavior with clang

Khem Raj requested to merge kraj/virglrenderer:kraj/clang into main

This is seen when compiling with CC="clang -D_FORTIFY_SOURCE=2" Move #ifdef outside of printf() call.

Fixes

| ../git/vtest/vtest_server.c:244:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
|   244 | #ifdef ENABLE_VENUS
|       |  ^
| ../git/vtest/vtest_server.c:246:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
|   246 | #endif
|       |  ^

Signed-off-by: Khem Raj raj.khem@gmail.com

Edited by Khem Raj

Merge request reports

Loading