Formatter::new_formatter(): pass const function parameter by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
close file descriptor in error case

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_o_trunc.c: reduce scope of some variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
SyntheticClient::play_trace: reduce scope of local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ErasureCodePlugin.cc: reduce scope of local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_o_trunc.c: fix indentation to kernel style (tabs, 8 spaces)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
PG::generate_past_intervals: reduce scope of variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
PG.h: use !empty() instead of size() > 0

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
KeyValueStore: use !empty() instead of size()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph_argparse.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ECBackend.cc: use !empty() instead of size()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librados.cc: remove unused variable cpp_category

[src/librados/librados.cc:3083]: (style) Variable 'cpp_category' is
 assigned a value that is never used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osd_types.cc: add missing break in operator<< case handling

CID 1086831 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value 4635) is not terminated by a
 'break' statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
MDSMonitor::prepare_command: fix "mds set"

CID 1160828 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
 result_independent_of_operands: !cmd_getval(g_ceph_context, cmdmap,
 std::string("var", std::allocator<char>()), var) < 0 is always false
 regardless of the values of its operands. This occurs as the logical
 operand of if.

Remove '< 0' check, replaced with check if returned string is empty.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
pg_t::get_split_bits: add assert to silence coverity

CID 751330 (#1 of 1): Overflowed return value (INTEGER_OVERFLOW)
 overflow_sink: Overflowed or truncated value (or a value computed
 from an overflowed or truncated value) "p - 1U" used as return value.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
watch_info_t: pass parameter by reference

CID 1030126 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter a of type entity_addr_t (size 136 bytes)
 by value

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
watch_item_t: pass entity_addr_t by reference

CID 1030127 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter addr of type entity_addr_t (size 136
 bytes) by value.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osd/Watch.cc: pass entity_addr_t by reference

CID 1086832 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter addr of type entity_addr_t (size 136 bytes)
 by value.

CID 1086833 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter addr of type entity_addr_t (size 136 bytes)
 by value.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-filestore-dump.cc: pass OSDSuperblock by reference

CID 1100693 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter superblock of type OSDSuperblock
 (size 240 bytes) by value.

CID 1100694 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter sb of type OSDSuperblock (size 240 bytes)
 by value.

CID 1100695 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter sb of type OSDSuperblock (size 240 bytes)
 by value.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test/bench/distribution.h: pass rngen_t by reference

CID 1135927 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter rng of type rngen_t (size 1416 bytes)
 by value.

CID 1135928 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter rng of type rngen_t (size 1416 bytes)
 by value.

CID 1135929 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter rng of type rngen_t (size 1416 bytes)
 by value.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>