MinGW tweak: Constructs such as:
CharArray somevariable = "somestring"
...are not allowed. It seems like MSVC does not correctly check
accessibility for temporaries. Chapter 12.2 of ISO/IEC 14882:2003(E):
> Even when the creation of the temporary object is avoided (12.8),
> all the semantic restrictions must be respected as if the temporary
> object was created. [Example: even if the copy constructor is not
> called, all the semantic restrictions, such as accessibility
> (clause 11), shall be satisfied. ]
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3344 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/win/vncviewer/CConnOptions.cxx b/win/vncviewer/CConnOptions.cxx
index ea0941e..6069e95 100644
--- a/win/vncviewer/CConnOptions.cxx
+++ b/win/vncviewer/CConnOptions.cxx
@@ -324,7 +324,7 @@
_T("Storing the password is more convenient but poses a security risk."),
MB_YESNO | MB_DEFBUTTON2 | MB_ICONWARNING) == IDYES) {
ObfuscatedPasswd obfPwd(password);
- CharArray obfuscatedHex = rdr::HexOutStream::binToHexStr(obfPwd.buf, obfPwd.length);
+ CharArray obfuscatedHex(rdr::HexOutStream::binToHexStr(obfPwd.buf, obfPwd.length));
fprintf(f, "Password=%s\n", obfuscatedHex.buf);
}
}