Fix some cppcheck warnings.

This commit is contained in:
joris 2013-03-24 14:58:32 +01:00
parent 8c58c7b05e
commit 0447aa9814
2 changed files with 4 additions and 3 deletions
src
game
stratagus

View file

@ -122,7 +122,7 @@ void StartMap(const std::string &filename, bool clean)
}
GetDefaultTextColors(nc, rc);
CreateGame(filename.c_str(), &Map);
CreateGame(filename, &Map);
UI.StatusLine.Set(NameLine);
SetMessage("%s", _("Do it! Do it now!"));

View file

@ -508,11 +508,12 @@ long CFile::PImpl::tell()
*/
static bool FindFileWithExtension(char *file, size_t filesize)
{
char buf[PATH_MAX];
if (!access(file, R_OK)) {
return true;
}
#if defined(USE_ZLIB) || defined(USE_BZ2LIB)
char buf[PATH_MAX];
#endif
#ifdef USE_ZLIB // gzip or bzip2 in global shared directory
sprintf(buf, "%s.gz", file);
if (!access(buf, R_OK)) {