Skip to content

Commit b1b9886

Browse files
committed
SE050: fix warnings
1 parent 6dc4c06 commit b1b9886

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Diff for: libraries/SE05X/src/SE05X.cpp

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

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

645-
uint16_t left = length;
646-
647-
status = Se05x_API_WriteSymmKey(&_se05x_session, NULL, 3, objectId, NULL, data, length, kSE05x_INS_NA, kSE05x_SymmKeyType_AES);
643+
status = Se05x_API_WriteSymmKey(&_se05x_session, NULL, 3, objectId, SE05x_KeyID_KEK_NONE, data, length, kSE05x_INS_NA, kSE05x_SymmKeyType_AES);
648644

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

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

670663
if (result == kSE05x_Result_SUCCESS) {
671664
SMLOG_E("Object exists \n");
672-
exists = 1;
673665
}
674666

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

Diff for: 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)