diff --git a/src/Utils.cpp b/src/Utils.cpp index 2d65daf2b..c1436590e 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -177,7 +177,7 @@ std::string getFullPath(const std::string &path) { if (path[0]=='/') return path; char tmp[PATH_MAX]; char * ret = realpath(path.c_str(), tmp); - if( tmp != 0 ) printf(std::string("fail to get full path of "+path+"\n").c_str()); + if (tmp != 0) printf("fail to get full path of %s\n", path.c_str()); return std::string(tmp); } diff --git a/src/_test_runtime.cpp b/src/_test_runtime.cpp index c82303a18..84510e15e 100644 --- a/src/_test_runtime.cpp +++ b/src/_test_runtime.cpp @@ -208,7 +208,7 @@ extern "C" void __stat_file_close(const char *func_name,char *str){ FILE *f; f = fopen(tmp_file, "w"); - fprintf(f,str); + fputs(str, f); fclose(f); free(str); }