bao-project / bao-hypervisor

Bao, a Lightweight Static Partitioning Hypervisor
Apache License 2.0
379 stars 128 forks source link

feat(c11): Adapt code to be compatible with ISO C11 #122

Closed miguelafsilva5 closed 6 months ago

miguelafsilva5 commented 10 months ago

PR Description

This PR is the first on the chain of PRs (This PR <- #146 <- #147 ). The main goal of this PR is to force ISO C11 on bao and deal with all -pedantic errors. Each commit tries to deal with a specific error.

The platforms tested were:

josecm commented 10 months ago

I don't think we need the wip in #120. We can use just this PR for both enabling pedantic C11 and adding the fixes to the new errors.

josecm commented 10 months ago

@miguelafsilva5 please fix your commit messages to pass gitlint checks and apply the code formatter.

I also see that the builds are still failing due to -Wpedantic errors.

miguelafsilva5 commented 8 months ago

The changes seem OK to me and well-documented on each commit description. However, build checkers are failing.

Commit 1853b59efa741a0a1f622155c5fb528e71145c52 seems to have fixed it.

miguelafsilva5 commented 6 months ago

Commit message for commit f2a7e50 has extra text before the sign-off

Fixed in bd1b162fb26d7a29c2ecd1b95d791788d510a80e

In commit message for e6bc02b should it be VA_OTPS or VA_OPT ?

Fixed in c4edbd3b53be0894531c4a267882304a8098038a

In e6bc02b, nit: "Its expansion ends in a variadic macro that was not receive the correct amount of arguments if the evaluated macro was not define." should be: "Its expansion ends in a variadic macro that was not receiving the correct number of arguments if the evaluated macro was not defined."

@DavidMCerdeira you tagged the wrong commit, but it is fixed here 0f83bbf091474cb6dffe0e44a8421820a784079d

miguelafsilva5 commented 6 months ago

There are compilations errors for tx2, ultra96, zcu102, zcu104 platforms These are related to the uart drivers

The errors were related to previous commits. I've fixed them in commits ee8c6b474e5463571e168e7b2c58aa77b7381916 and 88d90e9eeee727708f4a05f8d12662a57e338f9e