From e6c2978fd5b5ad8fc92290a635ebbac0b4e665ad Mon Sep 17 00:00:00 2001
From: "Christopher J. Morrone" <morrone2@llnl.gov>
Date: Wed, 26 Apr 2006 23:32:03 +0000
Subject: [PATCH] Quiet more compiler warnings.

---
 src/common/arg_desc.c         |  4 ++--
 src/common/arg_desc.h         |  4 ++--
 src/slurmctld/sched_plugin.h  | 26 +++-----------------------
 src/slurmctld/sched_upcalls.c |  6 +++---
 src/slurmd/slurmd/req.c       |  2 ++
 5 files changed, 12 insertions(+), 30 deletions(-)

diff --git a/src/common/arg_desc.c b/src/common/arg_desc.c
index 7de09ee0705..031c13453b1 100644
--- a/src/common/arg_desc.c
+++ b/src/common/arg_desc.c
@@ -35,7 +35,7 @@ strong_alias(arg_count,		slurm_arg_count);
 strong_alias(arg_idx_by_name,	slurm_arg_idx_by_name);
 strong_alias(arg_name_by_idx,	slurm_arg_name_by_idx);
 
-const int
+int
 arg_count( const arg_desc_t *desc )
 {
 	int i;
@@ -49,7 +49,7 @@ arg_count( const arg_desc_t *desc )
 }
 
 
-const int
+int
 arg_idx_by_name( const arg_desc_t *desc, const char *name )
 {
 	int i;
diff --git a/src/common/arg_desc.h b/src/common/arg_desc.h
index 989be6b89f2..cbe636f95fd 100644
--- a/src/common/arg_desc.h
+++ b/src/common/arg_desc.h
@@ -77,14 +77,14 @@ typedef struct _arg_desc {
 /*
  * Return the number of argument names in the descriptor.
  */
-const int arg_count( const arg_desc_t *desc );
+int arg_count( const arg_desc_t *desc );
 
 /*
  * Return the index in the descriptor corresponding to the name.
  *
  * Returns -1 if the name can't be found.
  */
-const int arg_idx_by_name( const arg_desc_t *desc, const char *name );
+int arg_idx_by_name( const arg_desc_t *desc, const char *name );
 
 /*
  * Return the name of the argument for the given index, or NULL if
diff --git a/src/slurmctld/sched_plugin.h b/src/slurmctld/sched_plugin.h
index c8e3140c2be..743e3e18fe0 100644
--- a/src/slurmctld/sched_plugin.h
+++ b/src/slurmctld/sched_plugin.h
@@ -87,32 +87,12 @@ char *slurm_sched_p_strerror( int errnum );
  * scheduler requests.  The interpretation of this value depends on
  * the scheduler type.  The value is returned in host byte order.
  */
-const u_int16_t sched_get_port( void );
+u_int16_t sched_get_port( void );
 
 /*
  * Returns the authentication credentials.
  */
-const char * const sched_get_auth( void );
-
-/*
- * RootOnly partitions are typically exempted from external scheduling
- * because these partitions are expected to be directly maintained by
- * the root user (or some external meta-scheduler) that may have its
- * own mechanisms for scheduling. However some cluster configurations
- * may want to use RootOnly partitions simply to prevent non-root
- * access, and would still like normal external scheduler operation to
- * occur.
- *
- * This procedure reflects the "SchedulerRootFilter" setting in
- * slurm.conf which allows the SLURM configuration to request how
- * external schedulers handle RootOnly partition, if supported by
- * the external scheduler. Currently only the SLURM backfill
- * scheduler makes use of this.
- *
- * Returns non-zero if RootOnly partitions are to be filtered from
- * any external scheduling efforts.
- */
-const u_int16_t sched_get_root_filter( void );
+const char * sched_get_auth( void );
 
 /*
  * RootOnly partitions are typically exempted from external scheduling
@@ -132,7 +112,7 @@ const u_int16_t sched_get_root_filter( void );
  * Returns non-zero if RootOnly partitions are to be filtered from
  * any external scheduling efforts.
  */
-const u_int16_t sched_get_root_filter( void );
+u_int16_t sched_get_root_filter( void );
 
 /*
  * Opaque type for a list of objects supplied by the controller.
diff --git a/src/slurmctld/sched_upcalls.c b/src/slurmctld/sched_upcalls.c
index 3b89baf803b..2b12e46c559 100644
--- a/src/slurmctld/sched_upcalls.c
+++ b/src/slurmctld/sched_upcalls.c
@@ -139,7 +139,7 @@ static void * sched_get_node_mod_time( 	sched_obj_list_t, int32_t, char * );
 /* ************************************************************************ */
 /*  TAG(                         sched_get_port                          )  */
 /* ************************************************************************ */
-const u_int16_t
+u_int16_t
 sched_get_port( void )
 {
 	u_int16_t port;
@@ -157,7 +157,7 @@ sched_get_port( void )
 /* ************************************************************************ */
 /*  TAG(                         sched_get_auth                          )  */
 /* ************************************************************************ */
-const char * const
+const char *
 sched_get_auth( void )
 {
 	static char auth[128];
@@ -179,7 +179,7 @@ sched_get_auth( void )
 /* ************************************************************************ */
 /*  TAG(                     sched_get_root_filter                       )  */
 /* ************************************************************************ */
-const u_int16_t
+u_int16_t
 sched_get_root_filter( void )
 {
 	u_int16_t root_filter;
diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c
index 42019e87f09..920240d5c91 100644
--- a/src/slurmd/slurmd/req.c
+++ b/src/slurmd/slurmd/req.c
@@ -60,6 +60,7 @@
 #include "src/common/util-net.h"
 #include "src/common/forward.h"
 #include "src/common/read_config.h"
+#include "src/common/fd.h"
 
 #include "src/slurmd/slurmd/slurmd.h"
 #include "src/slurmd/slurmd/reverse_tree_math.h"
@@ -1140,6 +1141,7 @@ done2:
 	close(fd);
 done:
 	slurm_send_rc_msg(msg, rc);
+	return SLURM_SUCCESS;
 }
 
 static int
-- 
GitLab