egl/dri2: Fix -Wempty-body warning

Add braces to a dangling else comprised of only an empty statement.
Fixes warning below on Android Jellybean.

  external/mesa/src/egl/drivers/dri2/egl_dri2.c:144:21: warning: suggest
    braces around empty body in an 'else' statement

Change-Id: Idfe14aa0acdc29fbd7e90eec61f43327f76026f6
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
egl/dri2: Fix an unitialized variable warning

Initialize the variable in the switch statement's default case, even
though the default case should never be taken.

Fixes warning below on Android Jellybean.

  external/mesa/src/egl/drivers/dri2/egl_dri2.c:1032:42: warning: 'format'
    may be used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: I5bc8942f1230349cc05dd78b8c51491ee61fc1eb
Signe-off-by: Chad Versace <chad.versace@linux.intel.com>
i965: Fix an uninitialized variable warning

Initialize the variable in the switch statement's default case, even
though the default case should never be taken.

Fixes warning below on Android Jellybean.

  external/mesa/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp:2238:72:
    warning: 'lod_type' may be used uninitialized in this function

Change-Id: Iff919ff1fc5f00d29e8e47dba43414ce16429068
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
i965: Fix an unitialized pointer warning

Just assign the variable to NULL at point of declaration.
Fixes warning below on Android Jellybean.

  external/mesa/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp:2238:72:
    warning: 'lod_type' may be used uninitialized in this function

Change-Id: I5bd7992bd0f29c808e11519d60a84ba0b2864ea0
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
mesa: Fix some unitialized pointer warnings

Just assign the pointer variables to NULL at point of declaration.
Fixes warning below on Android Jellybean.

external/mesa/src/mesa/main/get.c:1153:20: warning: 'p' may be used
  uninitialized in this function [-Wmaybe-uninitialized]
external/mesa/src/mesa/main/get.c:1239:19: warning: 'p' may be used
  uninitialized in this function [-Wmaybe-uninitialized]
external/mesa/src/mesa/main/get.c:1268:25: warning: 'p' may be used
  uninitialized in this function [-Wmaybe-uninitialized]
external/mesa/src/mesa/main/get.c:1360:27: warning: 'p' may be used
  uninitialized in this function [-Wmaybe-uninitialized]
external/mesa/src/mesa/main/get.c:1509:20: warning: 'p' may be used
  uninitialized in this function [-Wmaybe-uninitialized]
external/mesa/src/mesa/main/get.c:1766:19: warning: 'p' may be used
  uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: I79450651a4dc2c5b848d6a19a48ae7dbff0af498
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
mesa: Fix some unitialized variable warnings in ETC code

In the ETC transocoding code, some array variables cause unitialized
variable warnings on Android Jellybean.  The unitialized variables are out
parameters to later function calls, but C is incapable of enforcing that
out parameters are actually written to; hence the warning.

This patch initializes each array variable to all zeros; there should be
only negligible performance penalty because each array consists of at most
4 bytes.

Change-Id: I2d8bcc1802ec3444ce6b50c1f774d1d985091e18
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
i915: Fix sign promotion warning

When the src_reg constructor was passed a bool, gcc chose the constructor
with the closest matching signature: src_reg(int32_t i). To fix the
warning, define a constructor with the desired signature: src_reg(bool b).

Fixes warning below on Android Jellybean.

  external/mesa/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp:2046:40:
    warning: passing 'bool' chooses 'int32_t {aka int}' over 'uint32_t
    {aka unsigned int}' [-Wsign-promo]

Change-Id: Ia7fca1e8ebe66cb38698384c3c233f6e00be56b9
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
intel: Fix pointer arithmetic warnings

Android Jellybean complains that the Intel drivers use pointer arithmetic;
it complains a lot. Shut it up with by adding -Wno-pointer-arith to
CFLAGS.

Change-Id: I5fda5b4a870c1265ff753539ba9b822dcb58978f
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
intel: Fix unitialized variable warning

Fixes warning below on Android Jellybean.

external/mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c: In function
  'intel_miptree_alloc_mcs':
external/mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c:305:4:
  warning: 'format' may be used uninitialized in this function
  [-Wuninitialized]
external/mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c:814:14: note:
  'format' was declared here

(Surprisingly, GCC found this potential unitialized use by analyzing the
call graph).

Change-Id: Ia459bcd03b5866619557bac8edc699465895b9b1
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
vbo: Fix unitialized variable warning

Initialize the variable in the switch statement's default case, even
though the default case should never be taken. Fixes warnings below on
Android Jellybean.

external/mesa/src/mesa/vbo/vbo_exec_api.c:339:8: warning: 'tmp[3]' may be
  used uninitialized in this function [-Wmaybe-uninitialized]
external/mesa/src/mesa/vbo/vbo_exec_api.c:339:8: warning: 'tmp[2]' may be
  used uninitialized in this function [-Wmaybe-uninitialized]
external/mesa/src/mesa/vbo/vbo_exec_api.c:339:8: warning: 'tmp[1]' may be
  used uninitialized in this function [-Wmaybe-uninitialized]
external/mesa/src/mesa/vbo/vbo_exec_api.c:339:8: warning: 'tmp[0]' may be
  used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: Ia1d3b1093a5640ed81490e93832f59cf25f93182
android: Define more assembly CFLAGS for x86

If the target arch is x86, define DUSE_SSE_ASM and USE_3DNOW_ASM.  Fixes
the warnings below when building libmesa_dricore.

  external/mesa/src/mesa/x86/x86_xform.c:118:7: warning: implicit
    declaration of function '_mesa_init_3dnow_transform_asm'
  external/mesa/src/mesa/x86/x86_xform.c:122:7: warning: implicit
    declaration of function '_mesa_init_sse_transform_asm'

Change-Id: I16c556e6de1ae7644738d6b433272a5a3fe443d7