diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 18a61a886..69df8513e 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -2952,8 +2952,10 @@ int scst_get_cmd_abnormal_done_state(const struct scst_cmd *cmd) PRINT_CRIT_ERROR("Wrong cmd state %d (cmd %p, op %x)", cmd->state, cmd, cmd->cdb[0]); sBUG(); +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 < 6 /* Invalid state to suppress a compiler warning */ res = SCST_CMD_STATE_LAST_ACTIVE; +#endif } TRACE_EXIT_RES(res); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index e6c04567a..407681a90 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -4787,8 +4787,11 @@ void scst_process_active_cmd(struct scst_cmd *cmd, bool atomic) PRINT_CRIT_ERROR("cmd (%p) in state %d, but shouldn't " "be", cmd, cmd->state); sBUG(); +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 < 6 + /* For suppressing a gcc compiler warning */ res = SCST_CMD_STATE_RES_CONT_NEXT; break; +#endif } } while (res == SCST_CMD_STATE_RES_CONT_SAME); @@ -4820,8 +4823,10 @@ void scst_process_active_cmd(struct scst_cmd *cmd, bool atomic) cmd->state); spin_unlock_irq(&cmd->cmd_threads->cmd_list_lock); sBUG(); +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 < 6 spin_lock_irq(&cmd->cmd_threads->cmd_list_lock); break; +#endif } #endif wake_up(&cmd->cmd_threads->cmd_list_waitQ); @@ -6419,8 +6424,11 @@ static int scst_process_mgmt_cmd(struct scst_mgmt_cmd *mcmd) mcmd->cmd_finish_wait_count, mcmd->cmd_done_wait_count); sBUG(); +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 < 6 + /* For suppressing a gcc compiler warning */ res = -1; goto out; +#endif } }