[ttssh2-commit] [9993] コンパイラ警告対応

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2022年 6月 11日 (土) 00:19:51 JST


Revision: 9993
          https://osdn.net/projects/ttssh2/scm/svn/commits/9993
Author:   zmatsuo
Date:     2022-06-11 00:19:51 +0900 (Sat, 11 Jun 2022)
Log Message:
-----------
コンパイラ警告対応

- warning C4706: 条件式の比較値は、代入の結果になっています。
- warning C4459: 'hdcBGBuffer' を宣言すると、グローバル宣言が隠蔽されます

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtdisp.c

-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2022-06-10 15:19:42 UTC (rev 9992)
+++ trunk/teraterm/teraterm/vtdisp.c	2022-06-10 15:19:51 UTC (rev 9993)
@@ -1166,13 +1166,15 @@
     ZeroMemory(&bf,sizeof(bf));
     bf.BlendOp = AC_SRC_OVER;
 
-    if(bf.SourceConstantAlpha = BGSrc1.alpha)
+    bf.SourceConstantAlpha = BGSrc1.alpha;
+    if(bf.SourceConstantAlpha)
     {
       BGLoadSrc(hdcSrc,&BGSrc1);
       (BGAlphaBlend)(hdcBG,0,0,ScreenWidth,ScreenHeight,hdcSrc,0,0,ScreenWidth,ScreenHeight,bf);
     }
 
-    if(bf.SourceConstantAlpha = BGSrc2.alpha)
+    bf.SourceConstantAlpha = BGSrc2.alpha;
+    if(bf.SourceConstantAlpha)
     {
       BGLoadSrc(hdcSrc,&BGSrc2);
       (BGAlphaBlend)(hdcBG,0,0,ScreenWidth,ScreenHeight,hdcSrc,0,0,ScreenWidth,ScreenHeight,bf);
@@ -2671,7 +2673,7 @@
   }
 }
 
-static void DrawTextBGImage(HDC hdcBGBuffer, int X, int Y, int width, int height)
+static void DrawTextBGImage(HDC _hdcBGBuffer, int X, int Y, int width, int height)
 {
 	RECT  rect;
 	SetRect(&rect,0,0,width,height);
@@ -2678,9 +2680,9 @@
 
 	//\x91\x8B\x82̈ړ\xAE\x81A\x83\x8A\x83T\x83C\x83Y\x92\x86\x82͔w\x8Ci\x82\xF0 BGBrushInSizeMove \x82œh\x82\xE8\x82‚Ԃ\xB7
 	if(BGInSizeMove)
-		FillRect(hdcBGBuffer,&rect,BGBrushInSizeMove);
+		FillRect(_hdcBGBuffer,&rect,BGBrushInSizeMove);
 
-	BitBlt(hdcBGBuffer,0,0,width,height,hdcBG,X,Y,SRCCOPY);
+	BitBlt(_hdcBGBuffer,0,0,width,height,hdcBG,X,Y,SRCCOPY);
 
 	if(BGReverseText == TRUE)
 	{
@@ -2689,7 +2691,7 @@
 			BLENDFUNCTION bf;
 			HBRUSH hbr;
 
-			hbr = CreateSolidBrush(GetBkColor(hdcBGBuffer));
+			hbr = CreateSolidBrush(GetBkColor(_hdcBGBuffer));
 			FillRect(hdcBGWork,&rect,hbr);
 			DeleteObject(hbr);
 
@@ -2697,7 +2699,7 @@
 			bf.BlendOp             = AC_SRC_OVER;
 			bf.SourceConstantAlpha = BGReverseTextAlpha;
 
-			BGAlphaBlend(hdcBGBuffer,0,0,width,height,hdcBGWork,0,0,width,height,bf);
+			BGAlphaBlend(_hdcBGBuffer,0,0,width,height,hdcBGWork,0,0,width,height,bf);
 		}
 	}
 }


ttssh2-commit メーリングリストの案内
Back to archive index