Skip to content

Commit 600a830

Browse files
authored
Merge pull request #794 from SimonFJ20/fix_remove_return_value_warning
Avoid warning about missing return
2 parents 480efc7 + 7b9c633 commit 600a830

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

variants/OPTA/variant.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class SecureQSPIFBlockDevice: public QSPIFBlockDevice {
253253

254254
#if 1
255255
// 256byte secure OTP area (on AT25SF128A)
256-
// TODO: could be imcomplete, to be tested
256+
// TODO: could be incomplete, to be tested
257257
class SecureQSPIFBlockDevice: public QSPIFBlockDevice {
258258
public:
259259
virtual int readSecure(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size) {
@@ -263,9 +263,15 @@ class SecureQSPIFBlockDevice: public QSPIFBlockDevice {
263263
}
264264
virtual int programSecure(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size) {
265265
// like normal program with 42h
266+
267+
// avoid warning: no return statement in function returning non-void [-Wreturn-type]
268+
return 0;
266269
}
267270
virtual int eraseSecure(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size) {
268271
// like normal program with 44h
272+
273+
// avoid: warning: no return statement in function returning non-void [-Wreturn-type]
274+
return 0;
269275
}
270276
};
271277
#endif

0 commit comments

Comments
 (0)