From 1c3d3bf84a085d194e807f27f0559dfa6efed81d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Thu, 7 Oct 2021 13:18:13 +0300 Subject: [PATCH] swrast: Fix another warning from gcc 11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is similar change as commit f535ab59e26. [2/4] Compiling C object src/mesa/libmesa_classic.a.p/swrast_s_texfilter.c.o ../src/mesa/swrast/s_texfilter.c: In function ‘sample_2d_footprint’: ../src/mesa/swrast/s_texfilter.c:1817:7: warning: ‘sample_2d_linear’ reading 16 bytes from a region of size 8 [-Wstringop-overread] 1817 | sample_2d_linear(ctx, samp, img, newCoord, rgba); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/mesa/swrast/s_texfilter.c:1817:7: note: referencing argument 4 of type ‘const GLfloat *’ {aka ‘const float *’} ../src/mesa/swrast/s_texfilter.c:1150:1: note: in a call to function ‘sample_2d_linear’ 1150 | sample_2d_linear(struct gl_context *ctx, | ^~~~~~~~~~~~~~~~ Signed-off-by: Tapani Pälli Reviewed-by: Adam Jackson Part-of: --- src/mesa/swrast/s_texfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 4d8b8ed0d10..4b4c3b723b8 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1150,7 +1150,7 @@ static void sample_2d_linear(struct gl_context *ctx, const struct gl_sampler_object *samp, const struct gl_texture_image *img, - const GLfloat texcoord[4], + const GLfloat texcoord[2], GLfloat rgba[]) { const struct swrast_texture_image *swImg = swrast_texture_image_const(img);