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

Remove minor build warnings #11392

Merged
merged 4 commits into from
Sep 5, 2019

Conversation

hugueskamba
Copy link
Collaborator

Description

The various warnings removed were observed when building mbed-os-example-blinky for the K64F target with the GCC_ARM toolchain.

Pull request type

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

Reviewers

@kjbracey-arm @evedon

Release Notes

@ciarmcom ciarmcom requested review from evedon, kjbracey and a team September 2, 2019 15:00
@ciarmcom
Copy link
Member

ciarmcom commented Sep 2, 2019

@hugueskamba, thank you for your changes.
@kjbracey-arm @evedon @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-storage @ARMmbed/mbed-os-wan please review.

@@ -1203,6 +1203,8 @@ void sn_coap_protocol_linked_list_duplication_info_remove(struct coap_s *handle,
(void)msg_id;
#endif //SN_COAP_DUPLICATION_MAX_MSGS_COUNT
}

#if SN_COAP_DUPLICATION_MAX_MSGS_COUNT
Copy link
Contributor

Choose a reason for hiding this comment

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

Mbed Coap comes from external source.
@mikter or @artokin Is this acceptable to be modified here?

Copy link
Contributor

Choose a reason for hiding this comment

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

@mikter or @artokin Is this acceptable to be modified here?

Any update? Can this go in or not?

Copy link
Contributor

Choose a reason for hiding this comment

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

All other references to sn_coap_protocol_duplication_info_free are already flagged by SN_COAP_DUPLICATION_MAX_MSGS_COUNT and therefore this is good to go.

CC: @anttiylitokola

@@ -869,7 +869,7 @@ attest_create_token(struct useful_buf_c *challenge,
token_err = attest_token_start(&attest_token_ctx,
option_flags, /* option_flags */
key_select, /* key_select */
COSE_ALGORITHM_ES256, /* alg_select */
alg_select, /* alg_select */
Copy link
Contributor

Choose a reason for hiding this comment

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

@ARMmbed/mbed-os-crypto This one also should be fixed in tfm repository?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@hugueskamba hugueskamba Sep 3, 2019

Choose a reason for hiding this comment

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

The code in the trusted firmware repo is different than the version in Mbed OS.
The variable alg_select has been added to the Mbed OS version along with

    /* Map the key select to an algorithm. Maybe someday we'll support something
    * other than ES256
   */
    switch (key_select) {
    default:
        alg_select = COSE_ALGORITHM_ES256;
    }

Therefore no fix is necessary upstream.

Is the file usually synchronized with the upstream version? If so, should the Mbed OS version of the file (well the function at least) be changed instead to mirror its upstream counterpart?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, agreed that no change upstream is necessary.

Yes, we should take the upstream version when we replace our attestation service with the TF-M one.

In the mean time, I'd suggest removing the switch to fix the warning, as that keeps the code better aligned with upstream TF-M.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 3, 2019

👍 for fixing warnings

As the variable underlying type size is different depending on the
toolchain used
@hugueskamba hugueskamba force-pushed the hk-remove-minor-warnings branch from afa9698 to 8c22bbb Compare September 3, 2019 08:29
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Waiting for crypto and mesh team to review

@hugueskamba hugueskamba force-pushed the hk-remove-minor-warnings branch from a9abdac to 9715587 Compare September 3, 2019 08:58
@@ -869,7 +869,7 @@ attest_create_token(struct useful_buf_c *challenge,
token_err = attest_token_start(&attest_token_ctx,
option_flags, /* option_flags */
key_select, /* key_select */
COSE_ALGORITHM_ES256, /* alg_select */
alg_select, /* alg_select */
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

All changes approved

@mbed-ci
Copy link

mbed-ci commented Sep 4, 2019

Test run: SUCCESS

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

@hugueskamba hugueskamba deleted the hk-remove-minor-warnings branch September 10, 2019 07:55
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