mesa: use correct return statement for a void function
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 26 Jan 2017 13:18:39 +0000 (13:18 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 27 Jan 2017 17:56:56 +0000 (17:56 +0000)
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 <emil.velikov@collabora.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/teximage.c

index bc3b76a926dc3c97b1a78c39673f28d1abeca67e..2dc657bcc34c7a21f2989ce1d57c069ce4ce55ee 100644 (file)
@@ -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);