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)
Oct 24 2024, 10:24 PM
Unknown Object (File)
Oct 18 2024, 8:06 PM
Unknown Object (File)
Oct 6 2024, 4:53 PM
Unknown Object (File)
Oct 5 2024, 11:37 PM
Unknown Object (File)
Oct 5 2024, 3:49 PM
Unknown Object (File)
Oct 2 2024, 11:24 PM
Unknown Object (File)
Sep 23 2024, 4:02 AM
Unknown Object (File)
Sep 8 2024, 9:55 PM
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