fix const params, unused set vars

This commit is contained in:
iceman1001 2024-05-14 12:04:03 +02:00
parent 4aa8645a33
commit f3f647e6af

View file

@ -416,7 +416,7 @@ static int nxp_15693_print_signature(uint8_t *uid, uint8_t *signature) {
// get a product description based on the UID
// uid[8] tag uid
// returns description of the best match
static const char *getTagInfo_15(uint8_t *uid) {
static const char *getTagInfo_15(const uint8_t *uid) {
if (uid == NULL) {
return "";
}
@ -734,7 +734,7 @@ static int CmdHF15Samples(const char *Cmd) {
return PM3_SUCCESS;
}
static int NxpTestEAS(uint8_t *uid) {
static int NxpTestEAS(const uint8_t *uid) {
if (uid == NULL) {
return PM3_EINVARG;
@ -1182,7 +1182,7 @@ static void hf15EmlClear(void) {
WaitForResponse(CMD_HF_ISO15693_EML_CLEAR, &resp);
}
static int hf15EmlSetMem(uint8_t *data, uint16_t count, size_t offset) {
static int hf15EmlSetMem(const uint8_t *data, uint16_t count, size_t offset) {
struct p {
uint32_t offset;
uint16_t count;
@ -1356,7 +1356,7 @@ static void print_blocks_15693(iso15_tag_t *tag, bool dense_output) {
for (int i = 0; i < tag->pagesCount; i++) {
uint8_t *blk = d + (i * blocksize);
const uint8_t *blk = d + (i * blocksize);
// suppress repeating blocks, truncate as such that the first and last block with the same data is shown
// but the blocks in between are replaced with a single line of "......" if dense_output is enabled
@ -2470,7 +2470,7 @@ static int CmdHF15Readblock(const char *Cmd) {
return PM3_SUCCESS;
}
static int hf_15_write_blk(uint8_t *pm3flags, uint16_t flags, uint8_t *uid, bool fast, uint8_t blockno, uint8_t *data, uint8_t dlen) {
static int hf_15_write_blk(const uint8_t *pm3flags, uint16_t flags, const uint8_t *uid, bool fast, uint8_t blockno, const uint8_t *data, uint8_t dlen) {
// request to be sent to device/card
// 2 + 8 + 1 + (4|8) + 2
@ -2729,7 +2729,7 @@ static int CmdHF15Restore(const char *Cmd) {
size_t bytes = 0;
uint16_t i = 0;
uint8_t *data = calloc(tag->bytesPerPage, sizeof(uint8_t));
uint32_t tried = 0;
uint32_t tried;
while (bytes < (tag->pagesCount * tag->bytesPerPage)) {
// copy over the data to the request