Skip to content

Conversation

@metux
Copy link
Contributor

@metux metux commented Dec 11, 2025

../hw/xfree86/os-support/shared/posix_tty.c:366:38: warning: while loop has empty body [-Wempty-body]
366 | SYSCALL(r = read(fd, buf, count));
| ^

Signed-off-by: Enrico Weigelt, metux IT consult info@metux.net

> ../hw/xfree86/os-support/shared/posix_tty.c:366:38: warning: while loop has empty body [-Wempty-body]
>    366 |     SYSCALL(r = read(fd, buf, count));
>        |                                      ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
@stefan11111
Copy link
Contributor

@metux what compiler throws a warning on while(foo());?
This is the canonical way of writing such loops.

@metux
Copy link
Contributor Author

metux commented Dec 11, 2025

@metux what compiler throws a warning on while(foo());? This is the canonical way of writing such loops.

happening with clang on *BSD. Strangely only in a single case.

@metux metux merged commit c2d6007 into maint-25.0 Dec 11, 2025
@metux metux deleted the pr/xfree86-silence-warnings-on-syscall-macro-_2025-12-11_14-42-25 branch December 11, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants