!14363 fix codex warnings

From: @xutianchun
Reviewed-by: @zhanghaibo5,@HilbertDavid,@zhanghaibo5
Signed-off-by: @HilbertDavid
This commit is contained in:
mindspore-ci-bot 2021-03-30 18:44:52 +08:00 committed by Gitee
commit 883249a410
1 changed files with 3 additions and 1 deletions

View File

@ -73,7 +73,9 @@ std::unique_ptr<char[]> ReadFileToBuf(const std::string &filename, size_t *size)
return std::unique_ptr<char[]>(nullptr); return std::unique_ptr<char[]>(nullptr);
} }
ifs.close(); ifs.close();
if (size) *size = fsize; if (size != nullptr) {
*size = fsize;
}
return buf; return buf;
} }