Fix codecheck warnings

Issue: I5JJ9O
Test: Compiling, OAT Check

Signed-off-by: wangyantian <wangyantian@huawei.com>
This commit is contained in:
wangyantian 2022-07-29 13:11:08 +08:00
parent d5d0ad6618
commit 1920956944
5 changed files with 7 additions and 8 deletions

View File

@ -50,18 +50,17 @@
<licensefile></licensefile>
<policylist>
<policy name="projectPolicy" desc="">
<policyitem type="compatibility" name="Apache" path=".*" desc="">
<policyitem type="compatibility" name="Apache" path=".*" desc=""/>
</policy>
</policylist>
<filefilterlist>
<filefilter name="defaultFilter" desc="Files not to check">
<filteritem type="filename" name="*.iml|*.json|*.txt|*.png" desc="desc files"/>
<filteritem type="filename" name="AUTHORS" desc="Author list"/>
<filteritem type="filepath" name=".*/docs/.*" desc="Docs files"/>
<filteritem type="filepath" name=".*/docs/diagrams/.*" desc="Docs files"/>
<filteritem type="filepath" name="scripts/dep-lists/.*" desc="Dependency lists"/>
<filteritem type="filepath" name="third_party/.*" desc="Third party"/>
<filteritem type="filepath" name="plugins/java/.*" desc="Plugin for java"/>
</filefilter>
</filefilterlist>
</oatconfig>

View File

@ -721,7 +721,7 @@ public:
}
void RemoveThrowableInst(const Inst *inst);
void ReplaceThrowableInst(Inst *inst, Inst *new_inst);
void ReplaceThrowableInst(Inst *old_inst, Inst *new_inst);
const auto &GetThrowableInstHandlers(const Inst *inst) const
{

View File

@ -210,13 +210,13 @@ std::unique_ptr<const panda_file::File> OpenPandaFile(std::string_view location,
LOG(ERROR, PANDAFILE) << "Can't fopen location: " << location;
return nullptr;
}
fseek(fp, 0, SEEK_SET);
(void)fseek(fp, 0, SEEK_SET);
if (fread(&magic, sizeof(magic), 1, fp) != 1) {
fclose(fp);
LOG(ERROR, PANDAFILE) << "Can't read from file!(magic) " << location;
return nullptr;
}
fseek(fp, 0, SEEK_SET);
(void)fseek(fp, 0, SEEK_SET);
std::unique_ptr<const panda_file::File> file;
if (IsZipMagic(magic)) {
// Open Zipfile and do the extraction.

View File

@ -183,9 +183,9 @@ public:
bool WriteChecksum(size_t offset) override
{
fseek(file_, offset, SEEK_SET);
(void)fseek(file_, offset, SEEK_SET);
auto res = Write<uint32_t>(checksum_);
fseek(file_, offset, SEEK_END);
(void)fseek(file_, offset, SEEK_END);
return res;
}