[Mesa-dev] [PATCH mesa] i965: add missing `const` in function signature

Eric Engestrom eric.engestrom at imgtec.com
Thu Aug 24 14:55:53 UTC 2017


Gets rid of a few warnings of the form:
  src/mesa/drivers/dri/i965/intel_screen.c:918:49: warning: passing argument 2 of ‘modifier_is_supported’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
          !modifier_is_supported(&screen->devinfo, f, 0, modifier))
                                                   ^
  src/mesa/drivers/dri/i965/intel_screen.c:301:1: note: expected ‘struct intel_image_format *’ but argument is of type ‘const struct intel_image_format *’

Fixes: 1efd73df39b39589d26f "i965: Advertise the CCS modifier"
Cc: Ben Widawsky <ben at bwidawsk.net>
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 src/mesa/drivers/dri/i965/intel_screen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 579554f4ba..f98475997d 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -299,7 +299,7 @@ static const struct {
 
 static bool
 modifier_is_supported(const struct gen_device_info *devinfo,
-                      struct intel_image_format *fmt, int dri_format,
+                      const struct intel_image_format *fmt, int dri_format,
                       uint64_t modifier)
 {
    const struct isl_drm_modifier_info *modinfo =
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list