• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Révision9522 (tree)
l'heure2021-11-10 22:02:28
Auteurzmatsuo

Message de Log

コンパイラ警告対策

warning: "REFKNOWNFOLDERID" redefined
warning: left operand of comma operator has no effect
warning: unused variable ‘r’
warning: suggest parentheses around ‘&&’ within ‘||’

Change Summary

Modification

--- trunk/teraterm/common/compat_win.h (revision 9521)
+++ trunk/teraterm/common/compat_win.h (revision 9522)
@@ -175,11 +175,13 @@
175175 // shell32.dll
176176 #if !defined(NTDDI_VERSION) || !defined(NTDDI_VISTA) || (NTDDI_VERSION < NTDDI_VISTA)
177177 typedef GUID KNOWNFOLDERID;
178+#if !defined(REFKNOWNFOLDERID)
178179 #ifdef __cplusplus
179180 #define REFKNOWNFOLDERID const KNOWNFOLDERID &
180181 #else // !__cplusplus
181182 #define REFKNOWNFOLDERID const KNOWNFOLDERID * const
182183 #endif // __cplusplus
184+#endif
183185
184186 #include "ttknownfolders.h"
185187
--- trunk/teraterm/common/dlglib_cpp.cpp (revision 9521)
+++ trunk/teraterm/common/dlglib_cpp.cpp (revision 9522)
@@ -379,6 +379,9 @@
379379 {
380380 char class_name[32];
381381 int r = GetClassNameA(hwnd, class_name, _countof(class_name));
382+ if (r == 0) {
383+ return;
384+ }
382385 if (strcmp(class_name, "Button") == 0) {
383386 SendMessage(hwnd, BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)icon);
384387 }
@@ -386,7 +389,8 @@
386389 SendMessage(hwnd, STM_SETICON, (WPARAM)icon, 0);
387390 }
388391 else {
389- assert(("not support", FALSE));
392+ // not support
393+ assert(FALSE);
390394 }
391395 }
392396
--- trunk/teraterm/common/tmfc_frame.cpp (revision 9521)
+++ trunk/teraterm/common/tmfc_frame.cpp (revision 9522)
@@ -79,7 +79,7 @@
7979 nullptr);
8080 pseudoPtr = nullptr;
8181 if (hWnd == nullptr) {
82- OutputDebugPrintf("CreateWindow %d\n", GetLastError());
82+ OutputDebugPrintf("CreateWindow %ld\n", GetLastError());
8383 return FALSE;
8484 } else {
8585 m_hWnd = hWnd;
--- trunk/teraterm/common/ttlib_static_cpp.cpp (revision 9521)
+++ trunk/teraterm/common/ttlib_static_cpp.cpp (revision 9522)
@@ -1298,7 +1298,7 @@
12981298 */
12991299 BOOL IsRelativePathW(const wchar_t *path)
13001300 {
1301- if (path[0] == '\\' || path[0] == '/' || path[0] != '\0' && path[1] == ':') {
1301+ if (path[0] == '\\' || path[0] == '/' || (path[0] != '\0' && path[1] == ':')) {
13021302 return FALSE;
13031303 }
13041304 return TRUE;
@@ -1306,7 +1306,7 @@
13061306
13071307 BOOL IsRelativePathA(const char *path)
13081308 {
1309- if (path[0] == '\\' || path[0] == '/' || path[0] != '\0' && path[1] == ':') {
1309+ if (path[0] == '\\' || path[0] == '/' || (path[0] != '\0' && path[1] == ':')) {
13101310 return FALSE;
13111311 }
13121312 return TRUE;
Afficher sur ancien navigateur de dépôt.