[Piglit] [PATCH] cl-program-tester: Fix regexec usage.
Tom Stellard
tom at stellard.net
Thu Jun 12 16:45:21 PDT 2014
On Sun, Jun 01, 2014 at 08:28:32PM -0700, Vinson Lee wrote:
> This patch fixes this GCC warning.
>
> program-tester.c: In function ‘parse_name’:
> program-tester.c:1131:2: warning: passing argument 4 of ‘regexec’ from incompatible pointer type [enabled by default]
> if (!regexec(®ex, input, 1, &pmatch, 0)) {
> ^
> program-tester.c:33:0:
> /usr/include/regex.h:578:12: note: expected ‘struct regmatch_t * __restrict__’ but argument is of type ‘struct regmatch_t (*)[1]’
> extern int regexec (const regex_t *__restrict __preg,
> ^
>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/cl/program/program-tester.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/cl/program/program-tester.c b/tests/cl/program/program-tester.c
> index 6ff3251..834c6c8 100644
> --- a/tests/cl/program/program-tester.c
> +++ b/tests/cl/program/program-tester.c
> @@ -1128,7 +1128,7 @@ parse_name(const char *input)
> return NULL;
> }
>
> - if (!regexec(®ex, input, 1, &pmatch, 0)) {
> + if (!regexec(®ex, input, 1, pmatch, 0)) {
> char bad_char = *(input + pmatch[0].rm_so);
> fprintf(stderr, "Illegal character in test name '%s': %c\n",
> input, bad_char);
> --
> 1.8.3.2
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list