[Ttssh2-commit] [7231] 警告対策

scmno****@osdn***** scmno****@osdn*****
2018年 9月 8日 (土) 03:50:58 JST


Revision: 7231
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7231
Author:   zmatsuo
Date:     2018-09-08 03:50:57 +0900 (Sat, 08 Sep 2018)
Log Message:
-----------
警告対策

Modified Paths:
--------------
    branches/cmake/teraterm/common/ttlib.c
    branches/cmake/teraterm/common/ttlib.h
    branches/cmake/teraterm/teraterm/teklib.c
    branches/cmake/teraterm/teraterm/vtwin.cpp

-------------- next part --------------
Modified: branches/cmake/teraterm/common/ttlib.c
===================================================================
--- branches/cmake/teraterm/common/ttlib.c	2018-09-07 18:50:47 UTC (rev 7230)
+++ branches/cmake/teraterm/common/ttlib.c	2018-09-07 18:50:57 UTC (rev 7231)
@@ -274,7 +274,7 @@
 
 /* fit a filename to the windows-filename format */
 /* FileName must contain filename part only. */
-void FitFileName(PCHAR FileName, int destlen, PCHAR DefExt)
+void FitFileName(PCHAR FileName, int destlen, const char *DefExt)
 {
 	int i, j, NumOfDots;
 	char Temp[MAX_PATH];
@@ -879,7 +879,7 @@
 	}
 }
 
-void WINAPI GetDefaultFName(char *home, char *file, char *dest, int destlen)
+void WINAPI GetDefaultFName(const char *home, const char *file, char *dest, int destlen)
 {
 	// My Documents \x82\xC9 file \x82\xAA\x82\xA0\x82\xE9\x8Fꍇ\x81A
 	// \x82\xBB\x82\xEA\x82\xF0\x93ǂݍ\x9E\x82ނ悤\x82ɂ\xB5\x82\xBD\x81B(2007.2.18 maya)

Modified: branches/cmake/teraterm/common/ttlib.h
===================================================================
--- branches/cmake/teraterm/common/ttlib.h	2018-09-07 18:50:47 UTC (rev 7230)
+++ branches/cmake/teraterm/common/ttlib.h	2018-09-07 18:50:57 UTC (rev 7231)
@@ -51,7 +51,7 @@
 BOOL GetFileNamePos(PCHAR PathName, int *DirLen, int *FNPos);
 DllExport BOOL ExtractFileName(PCHAR PathName, PCHAR FileName, int destlen);
 DllExport BOOL ExtractDirName(PCHAR PathName, PCHAR DirName);
-void FitFileName(PCHAR FileName, int destlen, PCHAR DefExt);
+void FitFileName(PCHAR FileName, int destlen, const char *DefExt);
 void AppendSlash(PCHAR Path, int destlen);
 void DeleteSlash(PCHAR Path);
 void Str2Hex(PCHAR Str, PCHAR Hex, int Len, int MaxHexLen, BOOL ConvSP);
@@ -78,7 +78,7 @@
 void GetNthNum(PCHAR Source, int Nth, int *Num);
 int GetNthNum2(PCHAR Source, int Nth, int defval);
 DllExport void GetDownloadFolder(char *dest, int destlen);
-void WINAPI GetDefaultFName(char *home, char *file, char *dest, int destlen);
+void WINAPI GetDefaultFName(const char *home, const char *file, char *dest, int destlen);
 void GetDefaultSetupFName(char *home, char *dest, int destlen);
 void GetUILanguageFile(char *buf, int buflen);
 void GetOnOffEntryInifile(char *entry, char *buf, int buflen);

Modified: branches/cmake/teraterm/teraterm/teklib.c
===================================================================
--- branches/cmake/teraterm/teraterm/teklib.c	2018-09-07 18:50:47 UTC (rev 7230)
+++ branches/cmake/teraterm/teraterm/teklib.c	2018-09-07 18:50:57 UTC (rev 7231)
@@ -58,7 +58,7 @@
 PTEKEnd TEKEnd;
 
 static HMODULE HTTTEK = NULL;
-static UseCount = 0;
+static int UseCount = 0;
 
 static const GetProcAddressList ProcList[] = {
 	{ &TEKInit, "TEKInit", 8 },

Modified: branches/cmake/teraterm/teraterm/vtwin.cpp
===================================================================
--- branches/cmake/teraterm/teraterm/vtwin.cpp	2018-09-07 18:50:47 UTC (rev 7230)
+++ branches/cmake/teraterm/teraterm/vtwin.cpp	2018-09-07 18:50:57 UTC (rev 7231)
@@ -1922,7 +1922,7 @@
 }
 
 /* copy from ttset.c*/
-static void WriteInt2(PCHAR Sect, PCHAR Key, PCHAR FName, int i1, int i2)
+static void WriteInt2(const char *Sect, const char *Key, const char *FName, int i1, int i2)
 {
 	char Temp[32];
 	_snprintf_s(Temp, sizeof(Temp), _TRUNCATE, "%d,%d", i1, i2);
@@ -4897,8 +4897,9 @@
 {
 	BOOL ret = FALSE;
 	int flag = 0;
-	char *s, **p;
-	char *virstore_env[] = {
+	char *s;
+	const char **p;
+	static const char *virstore_env[] = {
 		"ProgramFiles",
 		"ProgramData",
 		"SystemRoot",



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