intel/compiler tests: fix variable type for getopt_long() return value
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

`getopt_long()` returns an `int`, not a `char`; putting the value in
a `char` before comparing it to `-1` was making the comparison always
fail, resulting in the invalid codepath taken that then fails with:

    option `-' is invalid: ignored

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34756>
This commit is contained in:
Eric Engestrom 2025-04-30 10:35:03 +02:00 committed by Marge Bot
parent f545f9eed4
commit 99e8d804bf
2 changed files with 2 additions and 2 deletions

View file

@ -132,7 +132,7 @@ int main(int argc, char **argv)
void *mem_ctx = ralloc_context(NULL);
FILE *input_file = NULL;
char *output_file = NULL;
char c;
int c;
FILE *output = stdout;
bool help = false, compact = false;
uint64_t pci_id = 0;

View file

@ -208,7 +208,7 @@ i965_postprocess_labels()
int main(int argc, char **argv)
{
char *output_file = NULL;
char c;
int c;
FILE *output = stdout;
bool help = false, compact = false;
void *store;