Page MenuHomeFreeBSD

Fix compile error in devel/libpru
Needs ReviewPublic

Authored by oskar.holmlund_ohdata.se on Jun 20 2020, 6:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 13 2024, 4:22 PM
Unknown Object (File)
Jan 21 2024, 3:19 AM
Unknown Object (File)
Dec 20 2023, 5:07 AM
Unknown Object (File)
Dec 10 2023, 2:02 PM
Unknown Object (File)
Oct 8 2023, 5:24 AM
Unknown Object (File)
Sep 30 2023, 3:33 AM
Unknown Object (File)
Sep 10 2023, 4:42 AM
Unknown Object (File)
Sep 6 2023, 2:21 AM
Subscribers

Details

Reviewers
manu
Summary

@Stable libpru will compile.
@Head libpru will generate following errors:
Scanning dependencies of target pru
[ 33%] Building C object CMakeFiles/pru.dir/pru.c.o
[ 66%] Building C object CMakeFiles/pru.dir/ti-pru.c.o
/root/clean_rpaulo/libpru/ti-pru.c:505:3: error: 'memmove' will always overflow; destination buffer has size 15, but size argument is 16

[-Werror,-Wfortify-source]
          memmove(c_op2 + 1, c_op2, sizeof(c_op2));
          ^

/root/clean_rpaulo/libpru/ti-pru.c:519:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]

case TI_OP_SLP:
^

/root/clean_rpaulo/libpru/ti-pru.c:519:2: note: insert 'attribute((fallthrough));' to silence this warning

case TI_OP_SLP:
^
__attribute__((fallthrough));

/root/clean_rpaulo/libpru/ti-pru.c:519:2: note: insert 'break;' to avoid fall-through

case TI_OP_SLP:
^
break;

2 errors generated.

  • Error code 1

The mission is just to make it compile.
I have verified the binary (libpru + pructl) can load and execute a program on a PRU on AM3358 (BBBlack/PB).
I did not perform an analysis of the code for each errors but made reasonable decisions from the small context.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped