From 489d903a28e2c06b4f4bde51dd5a41ee8f8dab3b Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Fri, 12 Jul 2002 16:32:39 +0000
Subject: [PATCH] Added hostlist to common Makefile.am Set initial value of n
 in hostset_insert_range to eliminate warning on compile

---
 src/common/Makefile.am | 22 ++--------------------
 src/common/hostlist.c  |  2 +-
 2 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 5c58da242c8..647c7021313 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -27,6 +27,7 @@ libcommon_la_SOURCES = 	xmalloc.c 	\
 			bitstring.c     \
 			pack.c		\
 			xerrno.c	\
+			hostlist.c	\
 			nodelist.c	\
 			slurm_protocol_api.c	\
 			slurm_protocol_pack.c	\
@@ -48,6 +49,7 @@ noinst_HEADERS = 	xmalloc.h 	\
 			bitstring.h     \
 			pack.h		\
 			xerrno.h	\
+			hostlist.h	\
 			nodelist.h	\
 			slurm_protocol_api.h	\
 			slurm_protocol_pack.h	\
@@ -65,23 +67,3 @@ noinst_HEADERS = 	xmalloc.h 	\
 
 EXTRA_libcommon_la_SOURCES =		\
 			qsw.c
-
-# target specific CFLAGS do not work until automake 1.5, use explicit rules
-# for now. If we ever move to 1.5, the CFLAGS defs below should work in
-# place of the rules that follow.
-
-#bits_bytes_CFLAGS     = -DDEBUG_MODULE $(AM_CFLAGS)
-
-# debug modules to built as binaries:
-#
-# need to create a rule to build each binary from an object file with _d suffix
-# as these will have been compiled with -DDEBUG_MODULE
-#
-# Note: automake 1.5 will complain about these...
-#
-bits_bytes     : bits_bytes_d.o log.o xmalloc.o xstring.o xassert.o strlcpy.o 
-% : %_d.o
-	$(LINK) $(LDFLAGS) $^ $(LDADD) $(LIBS)
-
-%_d.o : %.c
-	$(COMPILE) -DDEBUG_MODULE -c -o $@ $< 
diff --git a/src/common/hostlist.c b/src/common/hostlist.c
index e8768510ec7..de3d1671e7a 100644
--- a/src/common/hostlist.c
+++ b/src/common/hostlist.c
@@ -2190,7 +2190,7 @@ hostset_insert_host(hostset_t set, char *host)
 static int
 hostset_insert_range(hostset_t set, hostrange_t hr)
 {
-	int i, n;
+	int i, n = 0;
 	int inserted = 0;
 	int retval   = 0;
 
-- 
GitLab