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

Submitted by Uri Lublin on March 9, 2014, 5:05 p.m.

Details

Message ID 1394384706-29711-3-git-send-email-uril@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Uri Lublin March 9, 2014, 5:05 p.m.
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(-)

Patch hide | download patch | download mbox

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)
 {
 }


Comments

On Sun, Mar 09, 2014 at 07:05:06PM +0200, Uri Lublin wrote:
> 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;

ACK

Christophe