[rtems commit] beagle/i2c/bbb-i2c.c: Eliminiate set but not used warning

Joel Sherrill joel at rtems.org
Fri Jul 28 19:31:20 UTC 2017


Module:    rtems
Branch:    master
Commit:    9cb874d667f9a8f6abc91f4eeabb003439e05911
Changeset: http://git.rtems.org/rtems/commit/?id=9cb874d667f9a8f6abc91f4eeabb003439e05911

Author:    Joel Sherrill <joel at rtems.org>
Date:      Fri Jul 28 11:27:54 2017 -0500

beagle/i2c/bbb-i2c.c: Eliminiate set but not used warning

---

 c/src/lib/libbsp/arm/beagle/i2c/bbb-i2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/arm/beagle/i2c/bbb-i2c.c b/c/src/lib/libbsp/arm/beagle/i2c/bbb-i2c.c
index 26bae52..3a8637d 100644
--- a/c/src/lib/libbsp/arm/beagle/i2c/bbb-i2c.c
+++ b/c/src/lib/libbsp/arm/beagle/i2c/bbb-i2c.c
@@ -238,6 +238,7 @@ static void am335x_i2c_setup_write_transfer(
 
   REG( &regs->BBB_I2C_CNT ) = bus->current_msg_todo;
   no_bytes = REG( &regs->BBB_I2C_CNT );
+  (void) no_bytes; /* indicate we know that no_bytes is not referenced again */
   REG( &regs->BBB_I2C_SA ) = msgs->addr;
   REG( &regs->BBB_I2C_CON ) = AM335X_I2C_CFG_MST_TX | AM335X_I2C_CON_I2C_EN;
   am335x_clean_interrupts( regs );
@@ -462,4 +463,4 @@ int am335x_i2c_bus_register(
   bus->base.destroy = am335x_i2c_destroy;
 
   return i2c_bus_register( &bus->base, bus_path );
-}
\ No newline at end of file
+}




More information about the vc mailing list