我在不同的文件中收到这些警告。我试图解决它,但对所有人(所有 6 种情况)仍然有相同的警告。
#define CMD_READ_ARRAY_FAST 0x0bU
uint64 page_size;
uint32 offset;
uint64 page_addr;
uint64 sector_size;
uint8_t cmd[5];
size_t len;
size_t actual;
1) page_addr = (uint64) (offset / page_size);
2) cmd[0] = CMD_READ_ARRAY_FAST;
cmd[1] = (uint8_t) (page_addr >> 8U);
cmd[2] = (uint8_t) page_addr;
cmd[3] = (uint8_t) (offset % page_size);
cmd[4] = 0x00U;
3)page_addr = (uint64) (offset / page_size);
4)byte_addr = (uint64) (offset % page_size);
5)if ((offset % sector_size) || (len % sector_size))
6)cmd[1] = (uint8_t) ((offset / sector_size) + actual);
你能告诉我这样做的原因吗?