summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Xiao <b49994@freescale.com>2015-05-14 20:14:09 +0800
committerPrabhu Sundararaj <prabhu.sundararaj@freescale.com>2015-05-15 11:18:16 -0500
commitde4988db5f038b71ed0fe1cfb3f3e4a04ab2d096 (patch)
treeb89b65035e03d79c049330e6720dbe0a3f6a2b97
parenta49e3c68582c8b19b02ef42d48d18116628fc072 (diff)
MGS-715 [#ccc] Uninitialized pointer cause compiler warning
Some variables is not initialized, which causes compiler prompt there may be potential harm. This patch from Conti gives initial value to such variables. Date May 7, 2015 Signed-off-by: Shawn Xiao <b49994@freescale.com>
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c2
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c2
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
index 31da41598527..cab92a5f7d47 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
@@ -950,7 +950,7 @@ gckKERNEL_Dispatch(
{
gceSTATUS status = gcvSTATUS_OK;
gctSIZE_T bytes;
- gcuVIDMEM_NODE_PTR node;
+ gcuVIDMEM_NODE_PTR node = gcvNULL;
gctBOOL locked = gcvFALSE;
gctPHYS_ADDR physical = gcvNULL;
gctPOINTER logical = gcvNULL;
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c
index ae12dffba3e6..dd8a0fe99b02 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c
@@ -1107,7 +1107,7 @@ _AllocateCommandBuffer(
gctUINT requestedSize;
gctUINT allocationSize;
gctUINT32 address = 0;
- gcsCMDBUFFER_PTR commandBuffer;
+ gcsCMDBUFFER_PTR commandBuffer = gcvNULL;
gctUINT8_PTR endCommand;
/* Determine the aligned header size. */
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
index 740006b4d5a1..f72e5bfcf1ae 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
@@ -1636,7 +1636,7 @@ gckVIDMEM_Lock(
gctBOOL acquired = gcvFALSE;
gctBOOL locked = gcvFALSE;
gckOS os = gcvNULL;
- gctBOOL needMapping;
+ gctBOOL needMapping = gcvFALSE;
gctUINT32 baseAddress;
gcmkHEADER_ARG("Node=0x%x", Node);