summaryrefslogtreecommitdiffstats
path: root/server/tests/test_display_base.c
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-08-02 12:20:41 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-09-01 03:57:35 +0200
commita26f5714e4f68c2010333162baf6de459f812f1c (patch)
tree249ad333c251edc336e8544f930e314f43007307 /server/tests/test_display_base.c
parentb4c14b3bd8607fff5a660e92f925fea6e1d28c77 (diff)
downloadspice-a26f5714e4f68c2010333162baf6de459f812f1c.tar.gz
spice-a26f5714e4f68c2010333162baf6de459f812f1c.tar.xz
spice-a26f5714e4f68c2010333162baf6de459f812f1c.zip
fix valgrind warning in test_display__stream
create_test_primary_surface::test_display_base.c creates a QXLDevSurfaceCreate structure and initialize it, but doesn't set the position field. Moreover, this structure has 4 bytes of padding to the end (as shown by pahole from dwarves), so initialize the whole structure to 0 before using it.
Diffstat (limited to 'server/tests/test_display_base.c')
-rw-r--r--server/tests/test_display_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index d69f8064..a174d876 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -235,7 +235,7 @@ static uint8_t primary_surface[HEIGHT * WIDTH * 4];
static void create_test_primary_surface(QXLWorker *worker)
{
- QXLDevSurfaceCreate surface;
+ QXLDevSurfaceCreate surface = { 0, };
surface.format = SPICE_SURFACE_FMT_32_xRGB;
surface.width = WIDTH;