- more fixes from cppcheck

This commit is contained in:
SoftCoder
2014-11-28 18:19:40 -08:00
parent a656a64830
commit ceca2fc5aa
8 changed files with 23 additions and 10 deletions

View File

@@ -619,7 +619,7 @@ void updatePathClimbingParts(string &path,bool processPreviousDirTokenCheck) {
//printf("x [%d][%c] pos [%ld][%c] [%s]\n",x,path[x],(long int)pos,path[pos],path.substr(0,x+1).c_str());
if((path[x] == '/' || path[x] == '\\') && x != (int)pos) {
string origLoop = path;
//string origLoop = path;
path.erase(x,(int)pos-x);
//printf("#5 [%d] [%d] [%d] CHANGE relative path from [%s] to [%s]\n",(int)pos,(int)x,(int)origLoop.length(),origLoop.c_str(),path.c_str());
@@ -2455,7 +2455,7 @@ void ValueCheckerVault::checkItemInVault(const void *ptr,int value) const {
}
string getUserHome() {
string home_folder = "";
string home_folder;
home_folder = safeCharPtrCopy(getenv("HOME"),8095);
if(home_folder == "") {
#if _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED

View File

@@ -136,6 +136,7 @@ static int getFileAndLine(char *function, void *address, char *file, size_t flen
#if __APPLE_CC__
//### TODO Will: still working this out
int len = fread(buf,1,maxbufSize,f);
pclose(f);
buf[len] = 0;
fprintf(stderr,"< %s",buf);
return -1;