Skip to content

Conversation

maribu
Copy link
Member

@maribu maribu commented Nov 6, 2021

Contribution description

As the title says.

Testing procedure

The generated binaries should remain identical to before, but compilation with -Wcast-align won't fail.

Issues/PRs references

Split out of #14955

@github-actions github-actions bot added the Area: pkg Area: External package ports label Nov 6, 2021
@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Nov 6, 2021
@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 6, 2021
@kaspar030
Copy link
Contributor

Sorry, my new docker-compose worker seems to have trouble with git-cache not being initialized, which causes pkg checkouts to fail. re-started with new worker disabled.

@benpicco benpicco requested a review from vincent-d November 6, 2021 22:21
Copy link
Member

@vincent-d vincent-d left a comment

Choose a reason for hiding this comment

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

This is one of the "How did this ever worked?" kind of bug

If foo[] is an array, &foo is equal to foo but this is not very readable, though ;)

If the unit tests still pass, it should be fine!

@maribu
Copy link
Member Author

maribu commented Nov 8, 2021

If foo[] is an array, &foo is equal to foo

Indeed:

$ cat test.c 
#include <stdio.h>

int main(void)
{
    int array[] = {1, 2, 3, 4};
    int *pa = array;
    printf("array = %p, &array = %p, pa = %p, &pa = %p\n",
           array, &array, pa, &pa);

    return 0;
}

$ gcc -o test test.c

~ $ ./test
array = 0x7ffd38b3f7f0, &array = 0x7ffd38b3f7f0, pa = 0x7ffd38b3f7f0, &pa = 0x7ffd38b3f7e8

C never stops to surprise me. Let me fix the commit message and PR title then. I'll skip compilation test now, as a change in the commit message shouldn't break any C code. (And if so, that code really had it coming.)

@maribu maribu added the CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs label Nov 8, 2021
@maribu maribu changed the title pkg/littlefs{,2}: fix memory corruption and compilation with -Wcast-align pkg/littlefs{,2}: fix compilation with -Wcast-align Nov 8, 2021
@maribu
Copy link
Member Author

maribu commented Nov 8, 2021

Hey, Murdock: Skip compile tests ;-P

@maribu maribu added CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels Nov 8, 2021
@maribu maribu merged commit d520772 into RIOT-OS:master Nov 9, 2021
@maribu
Copy link
Member Author

maribu commented Nov 9, 2021

Thx!

@maribu maribu deleted the pkg/littlefs2 branch November 9, 2021 14:24
@fjmolinas fjmolinas added this to the Release 2022.01 milestone Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants