- Fix warnings reported by gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
SVN r3293 (trunk)
This commit is contained in:
parent
d6b6a73fee
commit
de8bf651f2
6 changed files with 103 additions and 13 deletions
|
|
@ -186,7 +186,7 @@ int FDirectory::AddDirectory(const char *dirpath)
|
|||
{
|
||||
if (strstr(fileinfo.name, ".orig") || strstr(fileinfo.name, ".bak"))
|
||||
{
|
||||
// We shuuldn't add backup files to the lump directory
|
||||
// We shouldn't add backup files to the lump directory
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -211,8 +211,8 @@ int FDirectory::AddDirectory(const char *dirpath)
|
|||
DIR* directory = opendir(scanDirectories[i].GetChars());
|
||||
if (directory == NULL)
|
||||
{
|
||||
Printf("Could not ready directory: %s\n", strerror(errno));
|
||||
return NULL;
|
||||
Printf("Could not read directory: %s\n", strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct dirent *file;
|
||||
|
|
@ -250,7 +250,7 @@ int FDirectory::AddDirectory(const char *dirpath)
|
|||
|
||||
int FDirectory::AddDirectory(const char *dirpath)
|
||||
{
|
||||
char *argv [2] = {NULL, NULL };
|
||||
char *argv [2] = { NULL, NULL };
|
||||
argv[0] = new char[strlen(dirpath)+1];
|
||||
strcpy(argv[0], dirpath);
|
||||
FTS *fts;
|
||||
|
|
@ -261,7 +261,7 @@ int FDirectory::AddDirectory(const char *dirpath)
|
|||
if (fts == NULL)
|
||||
{
|
||||
Printf("Failed to start directory traversal: %s\n", strerror(errno));
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
while ((ent = fts_read(fts)) != NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue