From ecf73192b3befa94d005a9217d05ba26066ff704 Mon Sep 17 00:00:00 2001
From: Mark Grondona <mgrondona@llnl.gov>
Date: Wed, 7 May 2003 00:57:39 +0000
Subject: [PATCH]  o fix missing braces in slurm_protocol_socket implementation
  o Fix -Wall warnings

---
 src/common/slurm_protocol_socket_implementation.c | 4 ++--
 src/sinfo/sinfo.h                                 | 1 -
 src/slurmd/io.c                                   | 6 +++++-
 src/srun/allocate.c                               | 1 -
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/common/slurm_protocol_socket_implementation.c b/src/common/slurm_protocol_socket_implementation.c
index 57e2869b358..acb74e4aec6 100644
--- a/src/common/slurm_protocol_socket_implementation.c
+++ b/src/common/slurm_protocol_socket_implementation.c
@@ -216,14 +216,14 @@ int _slurm_send_timeout(slurm_fd fd, char *buf, size_t size,
                         goto done;
                 }
                 if ((rc = poll(&ufds, 1, timeout)) <= 0) {
-                        if ((rc == 0) || (errno == EINTR)) {
+                        if ((rc == 0) || (errno == EINTR)) 
                                 continue;
                          else {
                                 sent = SLURM_ERROR;
                                 goto done;
                          }
                 }
-                rc = _slurm_send(fd, &buf[sent], (size - sent), flags)
+                rc = _slurm_send(fd, &buf[sent], (size - sent), flags);
                 if (rc < 0) {
                         if (errno == EINTR)
                                 continue;
diff --git a/src/sinfo/sinfo.h b/src/sinfo/sinfo.h
index 33da21faf05..a0b4b5c2c24 100644
--- a/src/sinfo/sinfo.h
+++ b/src/sinfo/sinfo.h
@@ -54,7 +54,6 @@
 #include "src/common/slurm_protocol_api.h"
 #include "src/common/xmalloc.h"
 
-#define MIN(x,y) (((x)<(y))?(x):(y))
 
 struct sinfo_parameters {
 	char* partition;
diff --git a/src/slurmd/io.c b/src/slurmd/io.c
index 24e123f18d8..40638296c53 100644
--- a/src/slurmd/io.c
+++ b/src/slurmd/io.c
@@ -122,7 +122,6 @@ static void   _io_client_attach(io_obj_t *, io_obj_t *, io_obj_t *,
 static void   _io_connect_objs(io_obj_t *, io_obj_t *);
 static int    _shutdown_task_obj(struct io_info *t);
 static bool   _isa_client(struct io_info *io);
-static bool   _isa_task(struct io_info *io);
 static int    _open_output_file(slurmd_job_t *job, task_info_t *t, 
 		                char *fname, slurmd_io_type_t type);
 static int    _open_stdin_file(slurmd_job_t *job, task_info_t *t, 
@@ -133,6 +132,9 @@ static struct io_info * _io_info_create(uint32_t id);
 static struct io_obj  * _io_obj(slurmd_job_t *, task_info_t *, int, int);
 static void           * _io_thr(void *arg);
 
+#ifndef NDEBUG
+static bool   _isa_task(struct io_info *io);
+#endif
 
 static struct io_operations * _ops_copy(struct io_operations *ops);
 static void                   _ops_destroy(struct io_operations *ops);
@@ -851,6 +853,7 @@ _io_disconnect_client(struct io_info *client, List objs)
 	return;
 }
 
+#ifndef NDEBUG
 static bool
 _isa_task(struct io_info *io)
 {
@@ -859,6 +862,7 @@ _isa_task(struct io_info *io)
 		|| (io->type == TASK_STDERR)
 		|| (io->type == TASK_STDIN ));
 }
+#endif
 
 static bool
 _isa_client(struct io_info *io)
diff --git a/src/srun/allocate.c b/src/srun/allocate.c
index 3eb052668c9..36d503b49c5 100644
--- a/src/srun/allocate.c
+++ b/src/srun/allocate.c
@@ -45,7 +45,6 @@
 #define MAX_ALLOC_WAIT 60	/* seconds */
 #define MIN_ALLOC_WAIT  2	/* seconds */
 #define MAX_RETRIES    10
-#define MIN(x,y) (((x)<(y))?(x):(y))
 
 /*
  * Static Prototypes
-- 
GitLab