diff mbox

[3/3] Fixlinker error with clang with -O < 2

Message ID alpine.BSF.2.00.1212110205390.71586@toaster.local (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Garrett Cooper Dec. 11, 2012, 10:09 a.m. UTC
The previous function definition was incorrect per c99 and is silently
ignored with gcc and is optimized away with clang and optimization
levels < 2.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
---
  osmtest/osmtest.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/osmtest/osmtest.c b/osmtest/osmtest.c
index 68b0e40..717c864 100644
--- a/osmtest/osmtest.c
+++ b/osmtest/osmtest.c
@@ -3068,7 +3068,8 @@  Exit:
  	return (status);
  }

-inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec)
+static inline uint32_t
+osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec)
  {
  	return (p_rec->dlid << 16 | p_rec->slid);
  }