[Spice-commits] server/tests

Frediano Ziglio fziglio at kemper.freedesktop.org
Wed Jan 4 16:10:39 UTC 2017


 server/tests/test-display-base.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit af390d53cac32e098f209d968eb0ff844465c0ff
Author: Snir Sheriber <ssheribe at redhat.com>
Date:   Wed Jan 4 15:29:37 2017 +0200

    tests: Fix compilation error
    
    Fix compilation error due to -Werror=maybe-uninitialized:
    
      CC       test-display-base.o
    test-display-base.c: In function 'do_wakeup':
    test-display-base.c:579:13: error: 'update' may be used uninitialized...
                 push_command(&update->ext);
    
    Signed-off-by: Snir Sheriber <ssheribe at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/tests/test-display-base.c b/server/tests/test-display-base.c
index 8167df5..04c6403 100644
--- a/server/tests/test-display-base.c
+++ b/server/tests/test-display-base.c
@@ -573,7 +573,9 @@ static void produce_command(Test *test)
                 update = test_spice_create_update_solid(command->solid.surface_id,
                         command->solid.bbox, command->solid.color);
                 break;
-            default: /* Just to shut up GCC warning (-Wswitch) */
+            default:
+                /* Terminate on unhandled cases - never actually reached */
+                g_assert_not_reached();
                 break;
             }
             push_command(&update->ext);


More information about the Spice-commits mailing list