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

fix use of calloc() against GCC 14.1 directive -Wcalloc-transposed-args #6912

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

etienne-lms
Copy link
Contributor

This change complements #6853.
Changes in libtomcrypt are under review in libtom/libtomcrypt#647.
No functional changes.

@GseoC
Copy link
Contributor

GseoC commented Jun 25, 2024

Acked-by: Gatien Chevallier <[email protected]>

@GseoC
Copy link
Contributor

GseoC commented Jun 25, 2024

By the way, when issues are found in an external component, what are the steps to follow?
Should we fix it in OP-TEE and in the component independently or should we wait for the merge in the component tree and backport it in OP-TEE?

@etienne-lms
Copy link
Contributor Author

I think the issue should be fixed in both: in the original component and in OP-TEE. Fixing the original component does not means OP-TEE should upgrade to the latest (fixed) release of that component which may have other implication. Picking the fix can be enough.

For the very case of this change, as it is quite simple, libtom/libtomcrypt#647 has been quite quickly merged. I think it ok we only pick the fix, as proposed in this P-R.

Maybe should I refer to libtom/libtomcrypt#647 (or to libtom/libtomcrypt@2302a3a) in the commit message.

For info: the checkpatch warning report is due to the build error trace message that exceeds 75 char/line in the commit message.

@jenswi-linaro
Copy link
Contributor

Maybe should I refer to libtom/libtomcrypt#647 (or to libtom/libtomcrypt@2302a3a) in the commit message.

Yes, please.

@jforissier
Copy link
Contributor

One minor thing: for the second commit, I'd rather use the libtomcrypt: prefix than core: ltc since it is really a libtomcrypt fix (as opposed to a fix in the integration code with the core).
For both commits:
Reviewed-by: Jerome Forissier <[email protected]>

@etienne-lms
Copy link
Contributor Author

I've updated the commit messages and applied posted review tags.

@jenswi-linaro
Copy link
Contributor

Reviewed-by: Jens Wiklander <[email protected]>

Fix calloc() calls against GCC 14 directive -Wcalloc-transposed-args that
makes GCC to complain with an warning/error trace message like:

warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]

No functional change.

Signed-off-by: Etienne Carriere <[email protected]>
Acked-by: Gatien Chevallier <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Fix use of XCALLOC() macro against GCC 14 directive
-Wcalloc-transposed-args that makes GCC to complain with an warning/error
trace message like:

warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]

This change was proposed and merged in mainline libtomcrypt repository.

No functional change.

Link: libtom/libtomcrypt#647
Signed-off-by: Etienne Carriere <[email protected]>
Acked-by: Gatien Chevallier <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
@jforissier jforissier merged commit 29be83d into OP-TEE:master Jun 27, 2024
7 of 8 checks passed
@jforissier
Copy link
Contributor

FYI I have cherry-picked the libtomcrypt patch on top of import/libtomcrypt-1.18.2-develop-20240412.

@etienne-lms etienne-lms deleted the calloc branch August 28, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants