Skip to content

FlashIAP Block device: Assert if default constructor is used without setting config parameters #9475

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

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

davidsaada
Copy link
Contributor

Description

FlashIAP block device's constructor has two parameters - base address and size (of the block device). Their default values are taken from the configuration, making it function as a default constructor. This PR produces an error if default constructor is used with unchanged config values (which are illegal).
Resolves #9468.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@tommikas

@ciarmcom ciarmcom requested review from tommikas and a team January 23, 2019 16:00
@ciarmcom
Copy link
Member

@davidsaada, thank you for your changes.
@tommikas @ARMmbed/mbed-os-storage @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@tommikas tommikas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@dannybenor dannybenor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did not find a way to fail in compilation, but improved the runtime error

@cmonr
Copy link
Contributor

cmonr commented Jan 30, 2019

#9475 (review)

@bulislaw Fyi

@cmonr
Copy link
Contributor

cmonr commented Jan 31, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 31, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr merged commit 39d4628 into ARMmbed:master Jan 31, 2019
@bulislaw
Copy link
Member

bulislaw commented Feb 1, 2019

Was the fact that this use case is illegal documented in last release? In any case we need to mention it in release notes that now it'll fail and need to be fixed.

@ARMmbed/mbed-os-maintainers

@davidsaada davidsaada deleted the david_flashiap_no_default branch March 16, 2019 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants