2 Nov
2007
2 Nov
'07
12:09 p.m.
On Di, 2007-10-30 at 12:36 +0000, Robert Shearman wrote:
+static DWORD open_cred_mgr_key(HKEY *hkey, BOOL open_for_write) +{ + return RegCreateKeyExW(HKEY_CURRENT_USER, wszCredentialManagerKey, 0, + NULL, REG_OPTION_NON_VOLATILE, + KEY_READ | KEY_WRITE, NULL, hkey, NULL); +} +
What's the reason of the Parameter "BOOL open_for_write" ? open_cred_mgr_key is called with (..., TRUE) and (..., FALSE), but you always use "KEY_READ | KEY_WRITE". On the other hand, gcc does not warn about that unused Parameter. My first Idea was the optimizer in gcc, but removing "-O2" does not give us a warning. With "-pedantic", we lost (but still no warning for "open_for_write"). -- By by ... Detlef