Skip to content

Commit 389f01c

Browse files
committed
Bug#33734206 doc-comment warning in sql/
Issue ===== clang -Wdocumentation reports: sql/sql_class.cc:3213:4: warning: '@returns' command used in a comment that is attached to a function returning void [-Wdocumentation] Doxygen's param command is spec'ed as: @param '['dir']' <parameter-name> { parameter description } which makes [out] in: @param new_item [out] return new_item, if created part of the param-description, instead of 'dir'. Change ====== - @param name [in] -> @param[in] name - use @returns instead of @RetVal when no value is specified - removed empty @returns - @param name [out] -> @param[out] name RB: 27548
1 parent 7700dab commit 389f01c

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

sql-common/net_serv.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2021, Oracle and/or its affiliates.
1+
/* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -125,10 +125,9 @@ void net_extension_free(NET *net) {
125125
If the caller is server then fetch is fromthe server extension
126126
structure.
127127
128-
@param net [in] NET structure
128+
@param[in] net NET structure
129129
130-
@return
131-
@retval mysql_compress_context structure pointer
130+
@returns mysql_compress_context structure pointer
132131
*/
133132
static mysql_compress_context *compress_context(NET *net) {
134133
mysql_compress_context *mysql_compress_ctx = nullptr;
@@ -1815,9 +1814,8 @@ static void net_read_init_offsets(NET *net, size_t &start_of_packet,
18151814
@param [in, out] multi_byte_packet Flag that indicate if packet is multibyte
18161815
@param [in, out] first_packet_offset Starting offset of the packet to read
18171816
1818-
@returns
1819-
@retval true The last packet read
1820-
@retval false Otherwise
1817+
@retval true The last packet read
1818+
@retval false Otherwise
18211819
*/
18221820
static bool net_read_process_buffer(NET *net, size_t &start_of_packet,
18231821
size_t &buf_length, uint &multi_byte_packet,

sql/item_cmpfunc.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2021, Oracle and/or its affiliates.
1+
/* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -5637,7 +5637,7 @@ bool Item_cond::fix_fields(THD *thd, Item **ref) {
56375637
56385638
@param thd Current thread
56395639
@param item Item which needs to be evaluated
5640-
@param new_item [out] return new_item, if created
5640+
@param[out] new_item return new_item, if created
56415641
56425642
@return true, if error
56435643
false, on success

sql/sql_class.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -3200,8 +3200,6 @@ void THD::disable_mem_cnt() {
32003200
@param db Schema name in which table is being created.
32013201
@param tablename Table name being created.
32023202
@param hton Handlerton representing engine used for table.
3203-
3204-
@returns void
32053203
*/
32063204
void Transactional_ddl_context::init(dd::String_type db,
32073205
dd::String_type tablename,
@@ -3215,8 +3213,6 @@ void Transactional_ddl_context::init(dd::String_type db,
32153213
/**
32163214
Remove the table share used while creating the table, if the transaction
32173215
is being rolledback.
3218-
3219-
@returns void
32203216
*/
32213217
void Transactional_ddl_context::rollback() {
32223218
if (!inited()) return;
@@ -3241,8 +3237,6 @@ void Transactional_ddl_context::rollback() {
32413237
End the transactional context created by calling post ddl hook for engine
32423238
on which table is being created. This is done after transaction rollback
32433239
and commit.
3244-
3245-
@returns void
32463240
*/
32473241
void Transactional_ddl_context::post_ddl() {
32483242
if (!inited()) return;

0 commit comments

Comments
 (0)