diff --git a/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c b/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c
index 648f3411837d851770bb2b9e8e237bc69511b5f4..c0788b6e3a2f1d0ea83d1275a4b391a862f563e7 100644
--- a/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c
+++ b/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c
@@ -606,7 +606,7 @@ static void _make_time_str(time_t * time, char *string, int size)
 extern int slurm_jobcomp_log_record(struct job_record *job_ptr)
 {
 	char usr_str[32], grp_str[32], start_str[32], end_str[32];
-	char time_str[32], *qos, *state_string;
+	char time_str[32], *state_string;
 	time_t elapsed_time;
 	enum job_states job_state;
 	uint32_t time_limit;