]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ErasureCodeLrc.cc: fix -Wmaybe-uninitialized compiler warning
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Sep 2014 11:42:49 +0000 (13:42 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Sep 2014 11:42:49 +0000 (13:42 +0200)
Init 'n' with 0 to prevent uninitialized integer.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/erasure-code/lrc/ErasureCodeLrc.cc

index caa78960504e9f803aba8cd7f8d6e79d747a1e03..249f9f7a5ac0e68c7acca364242a2119d45e2c64 100644 (file)
@@ -443,7 +443,7 @@ int ErasureCodeLrc::parse_ruleset_step(string description_string,
   json_spirit::write(description, json_string);
   string op;
   string type;
-  int n;
+  int n = 0;
   int position = 0;
   for (vector<json_spirit::mValue>::iterator i = description.begin();
        i != description.end();