[Spice-devel] [vdagent-win V2 6/6] vdagent: as_user: reorder initialization to make mingw-gcc happy

Uri Lublin uril at redhat.com
Mon Mar 24 10:02:43 PDT 2014


Fixes compiler warning that starts with:

In file included from vdagent/as_user.cpp:19:0:
vdagent/as_user.h: In constructor 'AsUser::AsUser(DWORD)':
vdagent/as_user.h:35:10: warning: 'AsUser::_started' will be initialized after [-Wreorder]
     bool _started;
---
 vdagent/as_user.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vdagent/as_user.cpp b/vdagent/as_user.cpp
index d2d6c58..c8016da 100644
--- a/vdagent/as_user.cpp
+++ b/vdagent/as_user.cpp
@@ -21,9 +21,9 @@
 #include <wtsapi32.h>

 AsUser::AsUser(DWORD session_id):
-    _started(false),
     _session_id(session_id),
-    _token(INVALID_HANDLE_VALUE)
+    _token(INVALID_HANDLE_VALUE),
+    _started(false)
 {
 }

-- 
1.8.5.3



More information about the Spice-devel mailing list