From 00f082ecf7b9ca52b6c41031810a96d9b03987b1 Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Tue, 27 Aug 2013 14:55:15 -0700
Subject: [PATCH] Initialize a variable in acct_gather_energy/rapl plugin

---
 src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c b/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c
index a7c91e50917..72a6576dbca 100644
--- a/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c
+++ b/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c
@@ -236,7 +236,7 @@ static void _hardware(void)
 {
 	char buf[1024];
 	FILE *fd;
-	int cpu, pkg;
+	int cpu = 0, pkg = 0;
 
 	if ((fd = fopen("/proc/cpuinfo", "r")) == 0)
 		fatal("RAPL: error on attempt to open /proc/cpuinfo");
-- 
GitLab