Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid warning about missing return #794

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion variants/OPTA/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down
Loading