Mesa (main): swrast: Fix another warning from gcc 11
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Oct 10 19:48:08 UTC 2021
Module: Mesa
Branch: main
Commit: 1c3d3bf84a085d194e807f27f0559dfa6efed81d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c3d3bf84a085d194e807f27f0559dfa6efed81d
Author: Tapani Pälli <tapani.palli at intel.com>
Date: Thu Oct 7 13:18:13 2021 +0300
swrast: Fix another warning from gcc 11
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 <tapani.palli at intel.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13245>
---
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);
More information about the mesa-commit
mailing list