From c1960e23ffb10f782cbcd09caabdd573d440c012 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 26 Jan 2017 13:18:39 +0000 Subject: mesa: use correct return statement for a void function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using return foo() is incorrect even if foo itself returns void. Spotted by AppVeyor, as below: teximage.c(3653) : warning C4098: 'copyteximage' : 'void' function returning a value Signed-off-by: Emil Velikov Reviewed-by: Nicolai Hähnle --- src/mesa/main/teximage.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/teximage.c') diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index bc3b76a926d..2dc657bcc34 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3648,9 +3648,10 @@ copyteximage(struct gl_context *ctx, GLuint dims, if (texImage && can_avoid_reallocation(texImage, internalFormat, texFormat, x, y, width, height, border)) { _mesa_unlock_texture(ctx, texObj); - return _mesa_copy_texture_sub_image(ctx, dims, texObj, target, level, - 0, 0, 0, x, y, width, height, - "CopyTexImage"); + _mesa_copy_texture_sub_image(ctx, dims, texObj, target, level, + 0, 0, 0, x, y, width, height, + "CopyTexImage"); + return; } } _mesa_unlock_texture(ctx, texObj); -- cgit v1.2.3