[Ttssh2-commit] [6240] チケット #35744 VS2015の警告除去

svnno****@sourc***** svnno****@sourc*****
2016年 1月 3日 (日) 19:42:44 JST


Revision: 6240
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6240
Author:   yutakapon
Date:     2016-01-03 19:42:44 +0900 (Sun, 03 Jan 2016)
Log Message:
-----------
チケット #35744 VS2015の警告除去

データ型の違いによる警告を除去した。

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/35744

Modified Paths:
--------------
    branches/vs2015_warn/ttssh2/ttxssh/ed25519_bcrypt_pbkdf.c
    branches/vs2015_warn/ttssh2/ttxssh/key.c

-------------- next part --------------
Modified: branches/vs2015_warn/ttssh2/ttxssh/ed25519_bcrypt_pbkdf.c
===================================================================
--- branches/vs2015_warn/ttssh2/ttxssh/ed25519_bcrypt_pbkdf.c	2016-01-03 10:37:35 UTC (rev 6239)
+++ branches/vs2015_warn/ttssh2/ttxssh/ed25519_bcrypt_pbkdf.c	2016-01-03 10:42:44 UTC (rev 6240)
@@ -74,10 +74,10 @@
 
 	/* key expansion */
 	Blowfish_initstate(&state);
-	Blowfish_expandstate(&state, sha2salt, shalen, sha2pass, shalen);
+	Blowfish_expandstate(&state, sha2salt, (u_int16_t)shalen, sha2pass, (u_int16_t)shalen);
 	for (i = 0; i < 64; i++) {
-		Blowfish_expand0state(&state, sha2salt, shalen);
-		Blowfish_expand0state(&state, sha2pass, shalen);
+		Blowfish_expand0state(&state, sha2salt, (u_int16_t)shalen);
+		Blowfish_expand0state(&state, sha2pass, (u_int16_t)shalen);
 	}
 
 	/* encryption */

Modified: branches/vs2015_warn/ttssh2/ttxssh/key.c
===================================================================
--- branches/vs2015_warn/ttssh2/ttxssh/key.c	2016-01-03 10:37:35 UTC (rev 6239)
+++ branches/vs2015_warn/ttssh2/ttxssh/key.c	2016-01-03 10:42:44 UTC (rev 6240)
@@ -822,8 +822,8 @@
 	}
 
 	/* mark starting point and end point*/
-	field[FLDSIZE_X / 2][FLDSIZE_Y / 2] = len - 1;
-	field[x][y] = len;
+	field[FLDSIZE_X / 2][FLDSIZE_Y / 2] = (unsigned char)(len - 1);
+	field[x][y] = (unsigned char)len;
 
 	/* assemble title */
 	r = _snprintf_s(title, sizeof(title), _TRUNCATE, "[%s %u]",



Ttssh2-commit メーリングリストの案内