diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-09-13 12:30:30 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-09-13 12:30:30 +0200 |
commit | 9c88e0dd266292b4dec7857f073b811137b6b30d (patch) | |
tree | e8ea29145c093e2f502a6f8ea15d466b62bce3de /vncviewer | |
parent | 07cbf841be9a8a50e0842213086114fdd2cbbc06 (diff) | |
download | tigervnc-9c88e0dd266292b4dec7857f073b811137b6b30d.tar.gz tigervnc-9c88e0dd266292b4dec7857f073b811137b6b30d.zip |
Avoid compiler "use of uninitialised variable" warnings
The compiler isn't smart enough to figure all of these out, so
restructure things a bit to avoid warnings.
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/UserDialog.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vncviewer/UserDialog.cxx b/vncviewer/UserDialog.cxx index 640f2a98..c3aa2f36 100644 --- a/vncviewer/UserDialog.cxx +++ b/vncviewer/UserDialog.cxx @@ -135,6 +135,12 @@ void UserDialog::getUserPasswd(bool secure, char** user, char** password) y += 20 + 5; username = new Fl_Input(70, y, win->w()-70-10, 25); y += 25 + 5; + } else { + /* + * Compiler is not bright enough to understand that + * username won't be used further down... + */ + username = NULL; } (new Fl_Box(70, y, win->w()-70-10, 20, _("Password:"))) |