[ofa-general] [PATCH] libibnetdisc: fix compilation warning
Sasha Khapyorsky
sashak at voltaire.com
Sun Aug 30 05:43:16 PDT 2009
Newly introduced retract_dpath() was declared as int but no any value
was returned, this resulted in this warning:
src/ibnetdisc.c: In function ‘retract_dpath’:
src/ibnetdisc.c:186: warning: control reaches end of non-void function
Fixing this by declaring retract_dpath() as void.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
infiniband-diags/libibnetdisc/src/ibnetdisc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
index 0f6fc55..97e369c 100644
--- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c
+++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
@@ -175,7 +175,7 @@ static int add_port_to_dpath(ib_dr_path_t * path, int nextport)
return path->cnt;
}
-static int retract_dpath(ib_portid_t * path)
+static void retract_dpath(ib_portid_t * path)
{
path->drpath.cnt--; /* restore path */
if (path->drpath.cnt == 0 && path->lid) {
--
1.6.4.1
More information about the general
mailing list