Mesa (master): ilo: Initialize read_back in transfer_map_sys.
Chia-I Wu
olv at kemper.freedesktop.org
Fri May 10 07:32:27 UTC 2013
Module: Mesa
Branch: master
Commit: 5471e3949cb6482f1a6dcb969332f2544a758e46
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5471e3949cb6482f1a6dcb969332f2544a758e46
Author: Vinson Lee <vlee at freedesktop.org>
Date: Thu May 9 22:42:10 2013 -0700
ilo: Initialize read_back in transfer_map_sys.
Fixes "Uninitialized scalar variable" defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Chia-I Wu <olvaffe at gmail.com>
---
src/gallium/drivers/ilo/ilo_resource.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
index c401d9f..41e4ffb 100644
--- a/src/gallium/drivers/ilo/ilo_resource.c
+++ b/src/gallium/drivers/ilo/ilo_resource.c
@@ -340,7 +340,7 @@ transfer_map_sys(struct ilo_context *ilo,
const size_t stride = util_format_get_stride(res->base.format, box->width);
const size_t size =
util_format_get_2d_size(res->base.format, stride, box->height);
- bool read_back;
+ bool read_back = false;
if (xfer->base.usage & PIPE_TRANSFER_READ) {
read_back = true;
More information about the mesa-commit
mailing list