Hi GCC 6.0 previews give the indentation warning below
../../../../../rtems/c/src/libchip/network/sonic.c:837:11: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] on this code from sonic.c. for (i = 0 ; i < 2 ; i++) { if ((*sc->read_register)( rp, SONIC_REG_RRP ) == (*sc->read_register)( rp, SONIC_REG_RSA )) (*sc->write_register)( rp, SONIC_REG_RRP, (*sc->read_register)( rp, SONIC_REG_REA ) ); (*sc->write_register)( rp, SONIC_REG_RRP, (*sc->read_register)(rp, SONIC_REG_RRP) - sizeof(ReceiveResource_t) ); } >From the comments, this code was written for RTEMS. Assuming it works (and it did on both a DMV177 and erc32 Tharsys board), then I am prone to add braces to the if and move the second write register to the left. That at least makes the code match what the compiler thinks was written. Any thoughts? --joel
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel