Skip to content

Commit 07997ee

Browse files
committed
Fix some warnings about missing return statements
1 parent e42111b commit 07997ee

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

include/tao/json/events/cbor/grammar.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ namespace tao
9494
case major::OTHER:
9595
return match_other( in, consumer );
9696
}
97+
// LCOV_EXCL_START
9798
assert( false );
99+
return false;
100+
// LCOV_EXCL_STOP
98101
}
99102

100103
template< typename Input >

include/tao/json/events/msgpack/to_stream.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ namespace tao
160160

161161
void end_array()
162162
{
163-
assert( false );
163+
assert( false ); // LCOV_EXCL_LINE
164164
}
165165

166166
void end_array( const std::size_t ) noexcept
@@ -199,7 +199,7 @@ namespace tao
199199

200200
void end_object()
201201
{
202-
assert( false );
202+
assert( false ); // LCOV_EXCL_LINE
203203
}
204204

205205
void end_object( const std::size_t ) noexcept

include/tao/json/internal/jaxn/action.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ namespace tao
7979
if( ( 'A' <= c ) && ( c <= 'F' ) ) {
8080
return c - 'A' + 10;
8181
}
82+
// LCOV_EXCL_START
8283
assert( false );
84+
return false;
85+
// LCOV_EXCL_STOP
8386
}
8487

8588
template< typename Input, typename Consumer >

src/test/json/unhex.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ namespace tao
2424
if( ( 'A' <= c ) && ( c <= 'F' ) ) {
2525
return c - 'A' + 10;
2626
}
27+
// LCOV_EXCL_START
2728
assert( false );
29+
return 0;
30+
// LCOV_EXCL_STOP
2831
}
2932

3033
inline std::string unhex( const std::string& data )

0 commit comments

Comments
 (0)