Skip to content

Commit

Permalink
Remove extra semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Oct 18, 2024
1 parent 399bb65 commit f678d6e
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 65 deletions.
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ StatementAttributeLikeMacros:
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
- munit_void_test_decl
- nghttp3_max_def
- nghttp3_min_def
- nghttp3_objalloc_decl
- nghttp3_objalloc_def
TabWidth: 8
UseTab: Never
VerilogBreakBetweenInstancePorts: true
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ if test "x$werror" != "xno"; then
# Only work with Clang for the moment
AX_CHECK_COMPILE_FLAG([-Wheader-guard], [CFLAGS="$CFLAGS -Wheader-guard"])
AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CFLAGS="$CFLAGS -Wsometimes-uninitialized"])
AX_CHECK_COMPILE_FLAG([-Wextra-semi], [CFLAGS="$CFLAGS -Wextra-semi"])

# Only work with gcc7 for the moment
AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [CFLAGS="$CFLAGS -Wduplicated-branches"])
Expand All @@ -230,6 +231,7 @@ if test "x$werror" != "xno"; then
#AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAGS="$CXXFLAGS -Werror"])
AX_CHECK_COMPILE_FLAG([-Wformat-security], [CXXFLAGS="$CXXFLAGS -Wformat-security"])
AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CXXFLAGS="$CXXFLAGS -Wsometimes-uninitialized"])
AX_CHECK_COMPILE_FLAG([-Wextra-semi], [CXXFLAGS="$CXXFLAGS -Wextra-semi"])
# Disable noexcept-type warning of g++-7. This is not harmful as
# long as all source files are compiled with the same compiler.
AX_CHECK_COMPILE_FLAG([-Wno-noexcept-type], [CXXFLAGS="$CXXFLAGS -Wno-noexcept-type"])
Expand Down
2 changes: 1 addition & 1 deletion lib/nghttp3_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
dynamic table capacity that QPACK encoder is willing to use. */
#define NGHTTP3_QPACK_ENCODER_MAX_DTABLE_CAPACITY 4096

nghttp3_objalloc_def(chunk, nghttp3_chunk, oplent);
nghttp3_objalloc_def(chunk, nghttp3_chunk, oplent)

/*
* conn_remote_stream_uni returns nonzero if |stream_id| is remote
Expand Down
2 changes: 1 addition & 1 deletion lib/nghttp3_conn.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ typedef struct nghttp3_chunk {
nghttp3_opl_entry oplent;
} nghttp3_chunk;

nghttp3_objalloc_decl(chunk, nghttp3_chunk, oplent);
nghttp3_objalloc_decl(chunk, nghttp3_chunk, oplent)

struct nghttp3_conn {
nghttp3_objalloc out_chunk_objalloc;
Expand Down
2 changes: 1 addition & 1 deletion lib/nghttp3_ksl.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

static nghttp3_ksl_blk null_blk = {{{NULL, NULL, 0, 0, {0}}}};

nghttp3_objalloc_def(ksl_blk, nghttp3_ksl_blk, oplent);
nghttp3_objalloc_def(ksl_blk, nghttp3_ksl_blk, oplent)

static size_t ksl_nodelen(size_t keylen) {
assert(keylen >= sizeof(uint64_t));
Expand Down
2 changes: 1 addition & 1 deletion lib/nghttp3_ksl.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct nghttp3_ksl_blk {
};
};

nghttp3_objalloc_decl(ksl_blk, nghttp3_ksl_blk, oplent);
nghttp3_objalloc_decl(ksl_blk, nghttp3_ksl_blk, oplent)

/*
* nghttp3_ksl_compar is a function type which returns nonzero if key
Expand Down
36 changes: 18 additions & 18 deletions lib/nghttp3_macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,27 @@
#define nghttp3_max_def(SUFFIX, T) \
static inline T nghttp3_max_##SUFFIX(T a, T b) { return a < b ? b : a; }

nghttp3_max_def(int8, int8_t);
nghttp3_max_def(int16, int16_t);
nghttp3_max_def(int32, int32_t);
nghttp3_max_def(int64, int64_t);
nghttp3_max_def(uint8, uint8_t);
nghttp3_max_def(uint16, uint16_t);
nghttp3_max_def(uint32, uint32_t);
nghttp3_max_def(uint64, uint64_t);
nghttp3_max_def(size, size_t);
nghttp3_max_def(int8, int8_t)
nghttp3_max_def(int16, int16_t)
nghttp3_max_def(int32, int32_t)
nghttp3_max_def(int64, int64_t)
nghttp3_max_def(uint8, uint8_t)
nghttp3_max_def(uint16, uint16_t)
nghttp3_max_def(uint32, uint32_t)
nghttp3_max_def(uint64, uint64_t)
nghttp3_max_def(size, size_t)

#define nghttp3_min_def(SUFFIX, T) \
static inline T nghttp3_min_##SUFFIX(T a, T b) { return a < b ? a : b; }

nghttp3_min_def(int8, int8_t);
nghttp3_min_def(int16, int16_t);
nghttp3_min_def(int32, int32_t);
nghttp3_min_def(int64, int64_t);
nghttp3_min_def(uint8, uint8_t);
nghttp3_min_def(uint16, uint16_t);
nghttp3_min_def(uint32, uint32_t);
nghttp3_min_def(uint64, uint64_t);
nghttp3_min_def(size, size_t);
nghttp3_min_def(int8, int8_t)
nghttp3_min_def(int16, int16_t)
nghttp3_min_def(int32, int32_t)
nghttp3_min_def(int64, int64_t)
nghttp3_min_def(uint8, uint8_t)
nghttp3_min_def(uint16, uint16_t)
nghttp3_min_def(uint32, uint32_t)
nghttp3_min_def(uint64, uint64_t)
nghttp3_min_def(size, size_t)

#endif /* !defined(NGHTTP3_MACRO_H) */
2 changes: 1 addition & 1 deletion lib/nghttp3_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/* NGHTTP3_MIN_RBLEN is the minimum length of nghttp3_ringbuf */
#define NGHTTP3_MIN_RBLEN 4

nghttp3_objalloc_def(stream, nghttp3_stream, oplent);
nghttp3_objalloc_def(stream, nghttp3_stream, oplent)

int nghttp3_stream_new(nghttp3_stream **pstream, int64_t stream_id,
const nghttp3_stream_callbacks *callbacks,
Expand Down
2 changes: 1 addition & 1 deletion lib/nghttp3_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ struct nghttp3_stream {
};
};

nghttp3_objalloc_decl(stream, nghttp3_stream, oplent);
nghttp3_objalloc_decl(stream, nghttp3_stream, oplent)

typedef struct nghttp3_frame_entry {
nghttp3_frame fr;
Expand Down
54 changes: 27 additions & 27 deletions tests/nghttp3_conn_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,32 @@

extern const MunitSuite conn_suite;

munit_void_test_decl(test_nghttp3_conn_read_control);
munit_void_test_decl(test_nghttp3_conn_write_control);
munit_void_test_decl(test_nghttp3_conn_submit_request);
munit_void_test_decl(test_nghttp3_conn_http_request);
munit_void_test_decl(test_nghttp3_conn_http_resp_header);
munit_void_test_decl(test_nghttp3_conn_http_req_header);
munit_void_test_decl(test_nghttp3_conn_http_content_length);
munit_void_test_decl(test_nghttp3_conn_http_content_length_mismatch);
munit_void_test_decl(test_nghttp3_conn_http_non_final_response);
munit_void_test_decl(test_nghttp3_conn_http_trailers);
munit_void_test_decl(test_nghttp3_conn_http_ignore_content_length);
munit_void_test_decl(test_nghttp3_conn_http_record_request_method);
munit_void_test_decl(test_nghttp3_conn_http_error);
munit_void_test_decl(test_nghttp3_conn_qpack_blocked_stream);
munit_void_test_decl(test_nghttp3_conn_just_fin);
munit_void_test_decl(test_nghttp3_conn_submit_response_read_blocked);
munit_void_test_decl(test_nghttp3_conn_recv_uni);
munit_void_test_decl(test_nghttp3_conn_recv_goaway);
munit_void_test_decl(test_nghttp3_conn_shutdown_server);
munit_void_test_decl(test_nghttp3_conn_shutdown_client);
munit_void_test_decl(test_nghttp3_conn_priority_update);
munit_void_test_decl(test_nghttp3_conn_request_priority);
munit_void_test_decl(test_nghttp3_conn_set_stream_priority);
munit_void_test_decl(test_nghttp3_conn_shutdown_stream_read);
munit_void_test_decl(test_nghttp3_conn_stream_data_overflow);
munit_void_test_decl(test_nghttp3_conn_get_frame_payload_left);
munit_void_test_decl(test_nghttp3_conn_update_ack_offset);
munit_void_test_decl(test_nghttp3_conn_read_control)
munit_void_test_decl(test_nghttp3_conn_write_control)
munit_void_test_decl(test_nghttp3_conn_submit_request)
munit_void_test_decl(test_nghttp3_conn_http_request)
munit_void_test_decl(test_nghttp3_conn_http_resp_header)
munit_void_test_decl(test_nghttp3_conn_http_req_header)
munit_void_test_decl(test_nghttp3_conn_http_content_length)
munit_void_test_decl(test_nghttp3_conn_http_content_length_mismatch)
munit_void_test_decl(test_nghttp3_conn_http_non_final_response)
munit_void_test_decl(test_nghttp3_conn_http_trailers)
munit_void_test_decl(test_nghttp3_conn_http_ignore_content_length)
munit_void_test_decl(test_nghttp3_conn_http_record_request_method)
munit_void_test_decl(test_nghttp3_conn_http_error)
munit_void_test_decl(test_nghttp3_conn_qpack_blocked_stream)
munit_void_test_decl(test_nghttp3_conn_just_fin)
munit_void_test_decl(test_nghttp3_conn_submit_response_read_blocked)
munit_void_test_decl(test_nghttp3_conn_recv_uni)
munit_void_test_decl(test_nghttp3_conn_recv_goaway)
munit_void_test_decl(test_nghttp3_conn_shutdown_server)
munit_void_test_decl(test_nghttp3_conn_shutdown_client)
munit_void_test_decl(test_nghttp3_conn_priority_update)
munit_void_test_decl(test_nghttp3_conn_request_priority)
munit_void_test_decl(test_nghttp3_conn_set_stream_priority)
munit_void_test_decl(test_nghttp3_conn_shutdown_stream_read)
munit_void_test_decl(test_nghttp3_conn_stream_data_overflow)
munit_void_test_decl(test_nghttp3_conn_get_frame_payload_left)
munit_void_test_decl(test_nghttp3_conn_update_ack_offset)

#endif /* !defined(NGHTTP3_CONN_TEST_H) */
4 changes: 2 additions & 2 deletions tests/nghttp3_http_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

extern const MunitSuite http_suite;

munit_void_test_decl(test_nghttp3_http_parse_priority);
munit_void_test_decl(test_nghttp3_check_header_value);
munit_void_test_decl(test_nghttp3_http_parse_priority)
munit_void_test_decl(test_nghttp3_check_header_value)

#endif /* !defined(NGHTTP3_HTTP_TEST_H) */
22 changes: 11 additions & 11 deletions tests/nghttp3_qpack_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@

extern const MunitSuite qpack_suite;

munit_void_test_decl(test_nghttp3_qpack_encoder_encode);
munit_void_test_decl(test_nghttp3_qpack_encoder_encode_try_encode);
munit_void_test_decl(test_nghttp3_qpack_encoder_still_blocked);
munit_void_test_decl(test_nghttp3_qpack_encoder_set_dtable_cap);
munit_void_test_decl(test_nghttp3_qpack_decoder_feedback);
munit_void_test_decl(test_nghttp3_qpack_decoder_stream_overflow);
munit_void_test_decl(test_nghttp3_qpack_huffman);
munit_void_test_decl(test_nghttp3_qpack_huffman_decode_failure_state);
munit_void_test_decl(test_nghttp3_qpack_decoder_reconstruct_ricnt);
munit_void_test_decl(test_nghttp3_qpack_decoder_read_encoder);
munit_void_test_decl(test_nghttp3_qpack_encoder_read_decoder);
munit_void_test_decl(test_nghttp3_qpack_encoder_encode)
munit_void_test_decl(test_nghttp3_qpack_encoder_encode_try_encode)
munit_void_test_decl(test_nghttp3_qpack_encoder_still_blocked)
munit_void_test_decl(test_nghttp3_qpack_encoder_set_dtable_cap)
munit_void_test_decl(test_nghttp3_qpack_decoder_feedback)
munit_void_test_decl(test_nghttp3_qpack_decoder_stream_overflow)
munit_void_test_decl(test_nghttp3_qpack_huffman)
munit_void_test_decl(test_nghttp3_qpack_huffman_decode_failure_state)
munit_void_test_decl(test_nghttp3_qpack_decoder_reconstruct_ricnt)
munit_void_test_decl(test_nghttp3_qpack_decoder_read_encoder)
munit_void_test_decl(test_nghttp3_qpack_encoder_read_decoder)

#endif /* !defined(NGHTTP3_QPACK_TEST_H) */
2 changes: 1 addition & 1 deletion tests/nghttp3_tnode_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@

extern const MunitSuite tnode_suite;

munit_void_test_decl(test_nghttp3_tnode_schedule);
munit_void_test_decl(test_nghttp3_tnode_schedule)

#endif /* !defined(NGHTTP3_TNODE_TEST_H) */

0 comments on commit f678d6e

Please sign in to comment.