fix a spatial layer index error
Merge pull request #1667 from lyao2/ut_fix3

fix a spatial layer index error
Remove a write-only variable

This fixes warnings with GCC about a variable that is set but
not used.
Use an unsigned variable for comparison with unsigned values

This avoids warnings about comparison between signed and unsigned.
Initialize a local variable

This fixes warnings with GCC about a variable that may be used
uninitialized (if iResProperty was an incorrect value).
Merge pull request #1668 from mstorsjo/fix-warnings

Fix build warnings with GCC
Merge remote-tracking branch 'upstream/master' into travis.android