big open source project. recently, they decided to open their service to every open source project.
I have submited a project wich use chibios, so the checker pass my code (founding several issues), and chibios.
On the chibios side, there is a lot false positive, but some errors seems reals
I will put some on this post, but, coverity offer for open source project to add automatic build/report at each
commit to follow easily new bug and regressions, perhaps is worth the investment (in work since the service is free).
some errors :
Code: Select all
void rtcSetPeriodicWakeup_v2(RTCDriver *rtcp, const RTCWakeup *wakeupspec){
deref_ptr: Directly dereferencing pointer wakeupspec.
242 chDbgCheck((wakeupspec->wakeup != 0x30000),
243 "rtc_lld_set_periodic_wakeup, forbidden combination");
244
CID 59709 (#1 of 2): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking wakeupspec suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
Code: Select all
void mac_lld_stop(MACDriver *macp) {
365
366 if (macp->state != MAC_STOP) {
367#if STM32_MAC_ETH1_CHANGE_PHY_STATE
368 /* PHY in power down mode until the driver will be restarted.*/
369 mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) | BMCR_PDOWN);
370#endif
371
372 /* MAC and DMA stopped.*/
373 ETH->MACCR = 0;
374 ETH->DMAOMR = 0;
375 ETH->DMAIER = 0;
CID 25515 (#1 of 2): Self assignment (NO_EFFECT)self_assign: Assignment operation (ETH_TypeDef *)0x40028000->DMASR = (ETH_TypeDef *)0x40028000->DMASR has no effect.
376 ETH->DMASR = ETH->DMASR;
Code: Select all
there is the same self assignment in mac_lld_start
What could be seen, is that with only one real problem on all the codebase (i suppose the self assignment is not a bug but a stm32 trick), the chibios code quality
seen by the coverity metric is very high !
Alexandre