[Ttssh2-commit] [8859] 危険な警告を修正した

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2020年 7月 26日 (日) 01:00:13 JST


Revision: 8859
          https://osdn.net/projects/ttssh2/scm/svn/commits/8859
Author:   zmatsuo
Date:     2020-07-26 01:00:13 +0900 (Sun, 26 Jul 2020)
Log Message:
-----------
危険な警告を修正した

- warning: type defaults to 'int' in declaration of 'StartupFlag'
- warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'LONG *' {aka 'long int *'}
- warning: 'w' is used uninitialized in this function

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

-------------- next part --------------
Modified: trunk/teraterm/teraterm/ttdde.c
===================================================================
--- trunk/teraterm/teraterm/ttdde.c	2020-07-25 16:00:00 UTC (rev 8858)
+++ trunk/teraterm/teraterm/ttdde.c	2020-07-25 16:00:13 UTC (rev 8859)
@@ -67,7 +67,7 @@
 static HSZ Item2 = 0;
 static HWND HWndDdeCli = NULL;
 
-static StartupFlag = FALSE;
+static BOOL StartupFlag = FALSE;
 
 // for sync mode
 static BOOL SyncMode = FALSE;
@@ -331,7 +331,7 @@
 {
 	int i;
 	BYTE b;
-	WORD w;
+	WORD w = 0;
 
 	for (i=0; i<=3; i++)
 	{
@@ -383,7 +383,7 @@
 		if (ParamXmodemOpt==0) ParamXmodemOpt = 1;
 		break;
 	case CmdSetSync:
-		if (sscanf(&(Command[1]),"%u",&SyncFreeSpace)!=1)
+		if (sscanf(&(Command[1]),"%lu",&SyncFreeSpace)!=1)
 			SyncFreeSpace = 0;
 		SyncMode = (SyncFreeSpace>0);
 		SyncRecv = TRUE;


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