Skip to content

Commit 05ba3e7

Browse files
chenhayatvitaut
authored andcommitted
Fix Klockwork compilation warning
1 parent 1daddec commit 05ba3e7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

fmt/format.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,8 @@ inline void format_decimal(Char *buffer, UInt value, unsigned num_digits,
10001000

10011001
template <typename UInt, typename Char>
10021002
inline void format_decimal(Char *buffer, UInt value, unsigned num_digits) {
1003-
return format_decimal(buffer, value, num_digits, NoThousandsSep());
1003+
format_decimal(buffer, value, num_digits, NoThousandsSep());
1004+
return;
10041005
}
10051006

10061007
#ifndef _WIN32
@@ -1948,8 +1949,10 @@ class ArgFormatterBase : public ArgVisitor<Impl, void> {
19481949
void visit_any_double(T value) { writer_.write_double(value, spec_); }
19491950

19501951
void visit_bool(bool value) {
1951-
if (spec_.type_)
1952-
return visit_any_int(value);
1952+
if (spec_.type_) {
1953+
visit_any_int(value);
1954+
return;
1955+
}
19531956
write(value);
19541957
}
19551958

0 commit comments

Comments
 (0)