Created a proper DEBUG build (specified using DEBUG=1). Set warnings to fatal for release builds and fixed the warnings throughout the code

This commit is contained in:
akuker
2020-07-10 17:49:02 -05:00
parent 853d37ea81
commit 32af6cf169
5 changed files with 43 additions and 34 deletions

View File

@@ -101,14 +101,14 @@ char* dirname(char *path)
dirtmp[1] = '\0';
return dirtmp;
}
p = path + strlen(path) - 1;
while( *p == '/' ) {
if( p == path )
return path;
*p-- = '\0';
}
while( p >= path && *p != '/' ) {
p--;
}
@@ -143,7 +143,7 @@ char* basename(char *path)
basetmp[1] = '\0';
return basetmp;
}
p = path + strlen(path) - 1;
while( *p == '/' ) {
if( p == path ) {
@@ -151,11 +151,11 @@ char* basename(char *path)
}
*p-- = '\0';
}
while( p >= path && *p != '/' ) {
p--;
}
return p + 1;
}
#endif // BAREMETAL
@@ -219,9 +219,9 @@ void FASTCALL Filepath::Make()
m_szPath[0] = _T('\0');
// 合成
strcat(m_szPath, m_szDir);
strcat(m_szPath, m_szFile);
strcat(m_szPath, m_szExt);
strncat(m_szPath, m_szDir, ARRAY_SIZE(m_szPath) - strlen(m_szPath));
strncat(m_szPath, m_szFile, ARRAY_SIZE(m_szPath) - strlen(m_szPath));
strncat(m_szPath, m_szExt, ARRAY_SIZE(m_szPath) - strlen(m_szPath));
}
//---------------------------------------------------------------------------
@@ -343,4 +343,4 @@ char Filepath::ShortName[_MAX_FNAME + _MAX_DIR];
// ファイル名+拡張子
//
//---------------------------------------------------------------------------
TCHAR Filepath::FileExt[_MAX_FNAME + _MAX_DIR];
TCHAR Filepath::FileExt[_MAX_FNAME + _MAX_DIR];