[Spice-devel] [PATCH 1/8] Fix warning from OSX compiler

alexl at redhat.com alexl at redhat.com
Wed Sep 29 04:43:03 PDT 2010


From: Alexander Larsson <alexl at redhat.com>

The OSX compiler warns about uninitialized variable, so we change
a bit how size is initialized.
---
 client/application.cpp |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/client/application.cpp b/client/application.cpp
index 490cd8c..3bd3330 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -647,13 +647,10 @@ RedScreen* Application::get_screen(int id)
 
     if (!(screen = _screens[id])) {
         Monitor* mon = find_monitor(id);
-        SpicePoint size;
+        SpicePoint size = {SCREEN_INIT_WIDTH, SCREEN_INIT_HEIGHT};
 
         if (_full_screen && mon) {
             size = mon->get_size();
-        } else {
-            size.x = SCREEN_INIT_WIDTH;
-            size.y = SCREEN_INIT_HEIGHT;
         }
         screen = _screens[id] = new RedScreen(*this, id, _title, size.x, size.y);
 #ifdef USE_GUI
-- 
1.7.0.1



More information about the Spice-devel mailing list