so far to_string() always return 0, but it is designed to return
an error code if it fails to parse a string.
this change silences following warning:
../src/erasure-code/lrc/ErasureCodeLrc.cc:399:7: error: variable 'err' set but not used [-Werror,-Wunused-but-set-variable]
int err = 0;
^
Signed-off-by: Kefu Chai <kchai@redhat.com>
err |= to_string("crush-device-class", profile,
&rule_device_class,
"", ss);
-
+ if (err) {
+ return err;
+ }
if (profile.count("crush-steps") != 0) {
rule_steps.clear();
string str = profile.find("crush-steps")->second;