From ebc6e3038bd0220d20d4f19dc0d6f5a1c3725478 Mon Sep 17 00:00:00 2001 From: SimonFJ20 Date: Fri, 8 Dec 2023 10:01:12 +0100 Subject: [PATCH 1/2] return value to avoid warning --- variants/OPTA/variant.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/variants/OPTA/variant.cpp b/variants/OPTA/variant.cpp index db175d0af..f0726e187 100644 --- a/variants/OPTA/variant.cpp +++ b/variants/OPTA/variant.cpp @@ -263,9 +263,15 @@ class SecureQSPIFBlockDevice: public QSPIFBlockDevice { } virtual int programSecure(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size) { // like normal program with 42h + + // avoid warning: no return statement in function returning non-void [-Wreturn-type] + return 0; } virtual int eraseSecure(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size) { // like normal program with 44h + + // avoid: warning: no return statement in function returning non-void [-Wreturn-type] + return 0; } }; #endif From 7b9c633bb01faa3237e230bf6bf093a72220a6bf Mon Sep 17 00:00:00 2001 From: SimonFJ20 Date: Fri, 8 Dec 2023 10:03:24 +0100 Subject: [PATCH 2/2] fix misspelling in comment --- variants/OPTA/variant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/OPTA/variant.cpp b/variants/OPTA/variant.cpp index f0726e187..e076647bb 100644 --- a/variants/OPTA/variant.cpp +++ b/variants/OPTA/variant.cpp @@ -253,7 +253,7 @@ class SecureQSPIFBlockDevice: public QSPIFBlockDevice { #if 1 // 256byte secure OTP area (on AT25SF128A) -// TODO: could be imcomplete, to be tested +// TODO: could be incomplete, to be tested class SecureQSPIFBlockDevice: public QSPIFBlockDevice { public: virtual int readSecure(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size) {