From 0f7d01cdbe03936d51a29fa57bee04991537ee7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 14 Apr 2023 11:30:14 +0200 Subject: [PATCH] mesa/st: Make st_convert_image(_from_unit) declaration match definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pointed out by GCC 13: ../src/mesa/state_tracker/st_atom_image.c:51:1: warning: conflicting types for ‘st_convert_image’ due to enum/integer mismatch; have ‘void(const struct st_context *, const struct gl_image_unit *, struct pipe_image_view *, enum gl_access_qualifier)’ [-Wenum-int-mismatch] 51 | st_convert_image(const struct st_context *st, const struct gl_image_unit *u, | ^~~~~~~~~~~~~~~~ In file included from ../src/mesa/state_tracker/st_atom_image.c:41: ../src/mesa/state_tracker/st_texture.h:242:1: note: previous declaration of ‘st_convert_image’ with type ‘void(const struct st_context *, const struct gl_image_unit *, struct pipe_image_view *, unsigned int)’ 242 | st_convert_image(const struct st_context *st, const struct gl_image_unit *u, | ^~~~~~~~~~~~~~~~ ../src/mesa/state_tracker/st_atom_image.c:134:1: warning: conflicting types for ‘st_convert_image_from_unit’ due to enum/integer mismatch; have ‘void(const struct st_context *, struct pipe_image_view *, GLuint, enum gl_access_qualifier)’ {aka ‘void(const struct st_context *, struct pipe_image_view *, unsigned int, enum gl_access_qualifier)’} [-Wenum-int-mismatch] 134 | st_convert_image_from_unit(const struct st_context *st, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/mesa/state_tracker/st_texture.h:246:1: note: previous declaration of ‘st_convert_image_from_unit’ with type ‘void(const struct st_context *, struct pipe_image_view *, GLuint, unsigned int)’ {aka ‘void(const struct st_context *, struct pipe_image_view *, unsigned int, unsigned int)’} 246 | st_convert_image_from_unit(const struct st_context *st, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Part-of: --- src/mesa/state_tracker/st_texture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index 1e5c7827851..673c225a843 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -240,13 +240,13 @@ st_compressed_format_fallback(struct st_context *st, mesa_format format); void st_convert_image(const struct st_context *st, const struct gl_image_unit *u, - struct pipe_image_view *img, unsigned shader_access); + struct pipe_image_view *img, enum gl_access_qualifier shader_access); void st_convert_image_from_unit(const struct st_context *st, struct pipe_image_view *img, GLuint imgUnit, - unsigned shader_access); + enum gl_access_qualifier shader_access); void st_convert_sampler(const struct st_context *st,