[RTEMS Project] #2467: tems/c/src/lib/libbsp/arm/stm32f7x/hal/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c:2904: possibl bad expression

RTEMS trac trac at rtems.org
Thu Nov 12 15:16:09 UTC 2015


#2467: tems/c/src/lib/libbsp/arm/stm32f7x/hal/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c:2904:
possibl bad expression
---------------------+--------------------
 Reporter:  dcb      |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:  4.11.1
Component:  General  |    Version:  4.10
 Severity:  normal   |   Keywords:
---------------------+--------------------
 [rtems/c/src/lib/libbsp/arm/stm32f7x/hal/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c:2904]:
 (style) Same expression on both sides of '|'.

 Source code is

     /* Disable ERRI, TCI, STOPI, NACKI, ADDRI, RXI, TXI interrupt */
     __HAL_I2C_DISABLE_IT(hi2c,I2C_IT_ERRI | I2C_IT_TCI| I2C_IT_STOPI|
 I2C_IT_NACKI | I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_RXI );

 Maybe better code would be to ensure the comment and the code match up
 as follows

     /* Disable ERRI, TCI, STOPI, NACKI, ADDRI, RXI, TXI interrupt */
     __HAL_I2C_DISABLE_IT(hi2c,I2C_IT_ERRI | I2C_IT_TCI| I2C_IT_STOPI|
 I2C_IT_NACKI | I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI );

--
Ticket URL: <http://devel.rtems.org/ticket/2467>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list