From 7b1a9efd72ec3c99dd42348e30d783a0a2724f10 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Wed, 5 Oct 2011 13:49:14 -0700 Subject: [PATCH] Modify code to eliminate compiler warning --- src/slurmctld/node_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 25303ed44e2..c4f84f014fa 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -941,9 +941,10 @@ int update_node ( update_node_msg_t * update_node_msg ) error_code = ESLURM_INVALID_NODE_STATE; } base_state &= NODE_STATE_BASE; - node_flags = node_ptr->node_state & NODE_STATE_FLAGS; } + if (state_val != (uint16_t) NO_VAL) { + node_flags = node_ptr->node_state & NODE_STATE_FLAGS; if (state_val == NODE_RESUME) { if (IS_NODE_IDLE(node_ptr) && (IS_NODE_DRAIN(node_ptr) || -- GitLab