[Mesa-dev] [PATCH] intel/aubinator: Use int to store getopt_long flags.
Rafael Antognolli
rafael.antognolli at intel.com
Tue Jun 12 19:45:28 UTC 2018
On Tue, Jun 12, 2018 at 12:23:17PM -0700, Rafael Antognolli wrote:
> getopt_long flag parameter is an int pointer, so if we use bool to store
> those values, when getopt_long writes to one of them, it might end up
> overwriting the next one.
I forgot to mention in the commit message that without this, sometimes
when I use --no-offsets I also get the equivalent of --headers (no
instructions are decoded, just their name).
> ---
> src/intel/tools/aubinator.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
> index 930cc92f132..9c14a9d4c97 100644
> --- a/src/intel/tools/aubinator.c
> +++ b/src/intel/tools/aubinator.c
> @@ -71,8 +71,8 @@ memfd_create(const char *name, unsigned int flags)
>
> /* options */
>
> -static bool option_full_decode = true;
> -static bool option_print_offsets = true;
> +static int option_full_decode = true;
> +static int option_print_offsets = true;
> static int max_vbo_lines = -1;
> static enum { COLOR_AUTO, COLOR_ALWAYS, COLOR_NEVER } option_color;
>
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list