pan/bi: Fix infinite loop parsing arguments for bifrost_compiler
While char is signed on macOS AArch64, on Linux it is unsigned. This
means it cannot represent the -1 return value of getopt_long.
Change the type of `c` to int, the type that getopt_long returns, so
that the -1 will be kept intact and can be checked for.
Fixes: c6be4f85e3 ("pan/bi: Use getopt for bifrost_compiler")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12153>
This commit is contained in:
@@ -252,7 +252,7 @@ disassemble(const char *filename)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char c;
|
||||
int c;
|
||||
|
||||
if (argc < 2) {
|
||||
printf("Pass a command\n");
|
||||
|
||||
Reference in New Issue
Block a user