regedit: avoid assigning a variable to itself (LLVM/Clang)
Austin English
austinenglish at gmail.com
Tue Apr 12 18:22:55 CDT 2011
Also slightly improve error handling.
--
-Austin
-------------- next part --------------
diff --git a/programs/regedit/main.c b/programs/regedit/main.c
index 27bc26f..4815b2f 100644
--- a/programs/regedit/main.c
+++ b/programs/regedit/main.c
@@ -29,6 +29,10 @@
#define REGEDIT_DECLARE_FUNCTIONS
#include "main.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(regedit);
+
WCHAR g_pszDefaultValueName[64];
BOOL ProcessCmdLine(LPSTR lpCmdLine);
@@ -113,8 +117,11 @@ static BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
};
- ATOM hChildWndClass = RegisterClassEx(&wcChild); /* register child windows class */
- hChildWndClass = hChildWndClass; /* warning eater */
+
+ if(!RegisterClassEx(&wcChild)) /* register child windows class */
+ {
+ WINE_ERR("Could not register child window class\n");
+ }
hMenuFrame = LoadMenuW(hInstance, MAKEINTRESOURCEW(IDR_REGEDIT_MENU));
hPopupMenus = LoadMenuW(hInstance, MAKEINTRESOURCEW(IDR_POPUP_MENUS));
More information about the wine-patches
mailing list