“02bb9b6334958d6050602e720c6d2cf436c6e9f1”上不存在“tests/pytest/account/account_del.py”
提交 0381bf57 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!219 Fix CodeDEX reporting errors

Merge pull request !219 from 李鸿章/fix_linting
......@@ -293,10 +293,10 @@ uint32_t MakeCrc32c(uint32_t init_crc, const char *data, size_t size) {
auto *bp_align = reinterpret_cast<const uint8_t *>(MEM_ALIGN(pval, 2));
// process the not alignment bits when size < 4 byte
if (bp_align <= ep) {
if (bp_align <= ep && bp < bp_align) {
// Process bytes until finished or p is 4-byte aligned
while (bp != bp_align) {
crc = crc_table_o32[(crc & 0xFF) ^ (*bp++)] ^ (crc >> 8);
crc = crc_table_o32[(crc ^ (*bp++)) & 0xFF] ^ (crc >> 8);
}
}
......@@ -307,7 +307,7 @@ uint32_t MakeCrc32c(uint32_t init_crc, const char *data, size_t size) {
// Process the last not alignment bytes
while (bp < ep) {
crc = crc_table_o32[(crc & 0xFF) ^ (*bp++)] ^ (crc >> 8);
crc = crc_table_o32[(crc ^ (*bp++)) & 0xFF] ^ (crc >> 8);
}
return crc ^ 0xFFFFFFFFU;
}
......@@ -53,7 +53,7 @@ uint32_t MakeCrc32c(uint32_t init_crc, const char* data, size_t size);
// A function return the crc32c value
uint32_t GetMaskCrc32cValue(const char* data, size_t n) {
if (data == nullptr && n > 0) {
if (data == nullptr) {
// Return early to prevent MakeCrc32c resulting in segmentfault
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册