[Intel-gfx] [PATCH igt] lib/igt_core: use print("%s", #expr) instead of print(#expr)
Dave Gordon
david.s.gordon at intel.com
Mon Aug 17 09:42:25 PDT 2015
On 13/08/15 18:17, Paulo Zanoni wrote:
> If I have a program with the following:
>
> igt_skip_on(i % 2 == 0);
> igt_skip_on_f(i % 2 == 0, "i:%d\n", i);
> igt_require(i % 2 == 0);
> igt_require_f(i % 2 == 0, "i:%d\n", i);
>
> then I'll get compiler error messages complaining about format
> conversions related to the '%' character used in the mod operation. So
> put the whole string as a %s argument to avoid interpreting '%' and
> any other possible chars.
>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
Reviewed-by: Dave Gordon <david.s.gordon at intel.com>
... and I found a similar issue in the i915 driver's macros; see the
patch I just posted:
[PATCH] drm/i915: fix driver's versions of WARN_ON & WARN_ON_ONCE
.Dave.
More information about the Intel-gfx
mailing list