Corrected some GCC 7.1+ compile warnings (#3522)

* Fixes #2787 and fixes #3513.
* Resolved some format-truncation warnings.
* The remaining will be fixed at a later time.
Thanks to @RadianFord and @Lemongrass3110!
This commit is contained in:
Aleos
2018-09-28 13:57:27 -04:00
committed by GitHub
parent b7ba7fe5a6
commit 926e37cb65
7 changed files with 22 additions and 21 deletions

View File

@@ -216,7 +216,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*))
DIR* dir; // pointer to the scanned directory.
struct dirent* entry; // pointer to one directory entry.
struct stat dir_stat; // used by stat().
char tmppath[MAX_DIR_PATH+1];
char tmppath[MAX_DIR_PATH * 2];
char path[MAX_DIR_PATH+1]= ".";
const char *pattern = (pat==NULL)? "" : pat;
if(p!=NULL) strcpy(path,p);