Skip to content

Commit fc732ba

Browse files
committed
SE050: fix warnings
1 parent 799bdfa commit fc732ba

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

libraries/SE05X/src/SE05X.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,6 @@ int SE05XClass::writeAESKey(int objectId, const byte data[], size_t length)
627627
{
628628
smStatus_t status;
629629
SE05x_Result_t result;
630-
uint16_t offset = 0;
631-
uint16_t size;
632630

633631
status = Se05x_API_CheckObjectExists(&_se05x_session, objectId, &result);
634632
if (status != SM_OK) {
@@ -641,9 +639,7 @@ int SE05XClass::writeAESKey(int objectId, const byte data[], size_t length)
641639
return 0;
642640
}
643641

644-
uint16_t left = length;
645-
646-
status = Se05x_API_WriteSymmKey(&_se05x_session, NULL, 3, objectId, NULL, data, length, kSE05x_INS_NA, kSE05x_SymmKeyType_AES);
642+
status = Se05x_API_WriteSymmKey(&_se05x_session, NULL, 3, objectId, SE05x_KeyID_KEK_NONE, data, length, kSE05x_INS_NA, kSE05x_SymmKeyType_AES);
647643

648644
if (status != SM_OK) {
649645
SMLOG_E("Error in Se05x_API_WriteSymmKey \n");
@@ -656,9 +652,6 @@ int SE05XClass::writeHMACKey(int objectId, const byte data[], size_t length)
656652
{
657653
smStatus_t status;
658654
SE05x_Result_t result;
659-
uint8_t exists = 0;
660-
uint16_t offset = 0;
661-
uint16_t size;
662655

663656
status = Se05x_API_CheckObjectExists(&_se05x_session, objectId, &result);
664657
if (status != SM_OK) {
@@ -668,7 +661,6 @@ int SE05XClass::writeHMACKey(int objectId, const byte data[], size_t length)
668661

669662
if (result == kSE05x_Result_SUCCESS) {
670663
SMLOG_E("Object exists \n");
671-
exists = 1;
672664
}
673665

674666
status = Se05x_API_WriteSymmKey(&_se05x_session, NULL, 0, objectId, SE05x_KeyID_KEK_NONE, data, length, kSE05x_INS_NA, kSE05x_SymmKeyType_HMAC);

libraries/SE05X/src/SE05X.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ class SE05XClass
396396

397397
inline int locked() { return 1; }
398398
inline int lock() { return 1; }
399-
inline int writeConfiguration(const byte data[]) { return 1; }
399+
inline int writeConfiguration(const byte data[]) { (void)data; return 1; }
400400
inline Se05xSession_t* getSession() { return &_se05x_session; }
401401

402402
private:

0 commit comments

Comments
 (0)