Skip to content

Commit 58d31ff

Browse files
committed
Bug#30956093 documentation warnings reported by clang [1/14]
Problem ------- building clang and CMAKE_CXX_FLAGS="-Wdocumentation" reports warnings like: 1. empty paragraph passed to '@return' command 2. '@return' command used in a comment that is attached to a function returning void 3. '@param' command used in a comment that is not attached to a function declaration 4. //<! not a Doxygen trailing comment 5. warning: HTML tag 'table' requires an end tag 6. unrecognized parameter passing direction, valid directions are '[in]', '[out]' and '[in,out]' 7. '@interface' command should not be used in a comment attached to a non-interface declaration 8. '@c' command does not have a valid word argument Change ------ - removed empty @return and @returns from doc-comments - removed @return on 'return-void' functions - moved doc-comment in front of functions or typedefs - fixed trailing comments - wrap code in \code and \encode to avoid HTML escapes - replaced [inout] by [in,out] - removed '@interface' and rely on doxygen's autolink generation - replaced @RetVal with @returns if the first words isn't a value RB: 23952
1 parent 31259eb commit 58d31ff

File tree

134 files changed

+830
-1134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+830
-1134
lines changed

Diff for: client/dump/sql_formatter.cc

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
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,
@@ -430,11 +430,10 @@ void Sql_formatter::format_sql_objects_definer(
430430
/**
431431
Check if the table is innodb stats table in mysql database.
432432
433-
@param [in] db Database name
434-
@param [in] table Table name
433+
@param [in] db Database name
434+
@param [in] table Table name
435435
436-
@return
437-
@retval true if it is innodb stats table else false
436+
@retval true if it is innodb stats table else false
438437
*/
439438
bool Sql_formatter::innodb_stats_tables(std::string db, std::string table) {
440439
return ((db == "mysql") &&

Diff for: client/mysqlbinlog.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
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,
@@ -1303,7 +1303,7 @@ static bool shall_skip_gtids(const Log_event *ev) {
13031303
- At the end of mysqlbinlog, just after printing all log files(binlog or
13041304
relaylog).
13051305
1306-
@param[in|out] print_event_info Context state determining how to print.
1306+
@param[in,out] print_event_info Context state determining how to print.
13071307
*/
13081308
void end_binlog(PRINT_EVENT_INFO *print_event_info) {
13091309
if (in_transaction) {

Diff for: client/mysqldump.cc

+7-10
Original file line numberDiff line numberDiff line change
@@ -2053,8 +2053,7 @@ static void print_comment(FILE *sql_file, bool is_error, const char *format,
20532053
@param[in] object_name object name list (concatenated string)
20542054
@param[out] freemem should buffer be released after usage
20552055
2056-
@return
2057-
@retval pointer to a string with prefixed objects
2056+
@returns pointer to a string with prefixed objects
20582057
*/
20592058
static char const *fix_identifier_with_newline(char const *object_name,
20602059
bool *freemem) {
@@ -2534,11 +2533,10 @@ static inline bool replication_metadata_tables(const char *db,
25342533
/**
25352534
Check if the table is innodb stats table in mysql database.
25362535
2537-
@param [in] db Database name
2538-
@param [in] table Table name
2536+
@param [in] db Database name
2537+
@param [in] table Table name
25392538
2540-
@return
2541-
@retval true if it is innodb stats table else false
2539+
@retval true if it is innodb stats table else false
25422540
*/
25432541
static inline bool innodb_stats_tables(const char *db, const char *table) {
25442542
return (!my_strcasecmp(charset_info, db, "mysql")) &&
@@ -2552,11 +2550,10 @@ static inline bool innodb_stats_tables(const char *db, const char *table) {
25522550
Check if the command line option includes innodb stats table
25532551
or in any way mysql database.
25542552
2555-
@param [in] argc Total count of positional arguments
2556-
@param [in] argv Pointer to positional arguments
2553+
@param [in] argc Total count of positional arguments
2554+
@param [in] argv Pointer to positional arguments
25572555
2558-
@return
2559-
@retval true if dump contains innodb stats table or else false
2556+
@retval true if dump contains innodb stats table or else false
25602557
*/
25612558
static inline bool is_innodb_stats_tables_included(int argc, char **argv) {
25622559
if (opt_alldbs) return true;

Diff for: components/audit_api_message_emit/audit_api_message_emit.cc

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
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,
@@ -191,9 +191,8 @@ char *collation_name = const_cast<char *>(collation);
191191
@param [in, out] args UDF arguments structure
192192
@param [out] handler Error handler
193193
194-
@return
195-
@retval false Set the charset of all arguments successully
196-
@retval true Otherwise
194+
@retval false Set the charset of all arguments successully
195+
@retval true Otherwise
197196
*/
198197
static bool set_args_charset_info(UDF_ARGS *args, IError_handler &handler) {
199198
for (size_t index = 0; index < args->arg_count; ++index) {
@@ -213,9 +212,8 @@ static bool set_args_charset_info(UDF_ARGS *args, IError_handler &handler) {
213212
@param [in, out] initid A pointer to the UDF_INIT structure
214213
@param [out] handler Error handler that keeps the error message
215214
216-
@return
217-
@retval false Charset info of return value set successfully.
218-
@retval true Otherwise
215+
@retval false Charset info of return value set successfully.
216+
@retval true Otherwise
219217
*/
220218
bool set_return_value_charset_info(UDF_INIT *initid, IError_handler &handler) {
221219
if (mysql_service_mysql_udf_metadata->result_set(
@@ -240,7 +238,6 @@ bool set_return_value_charset_info(UDF_INIT *initid, IError_handler &handler) {
240238
set to false, if the provided argument count is
241239
greater, this does not return error.
242240
243-
@return
244241
@retval -1 None of the argument definition was matched.
245242
@retval >=0 n-th argument definition was matched.
246243
*/
@@ -328,7 +325,6 @@ static int arg_check(IError_handler &handler, unsigned int arg_count,
328325
@param handler Error handler used for error handling.
329326
@param args UDF_ARGS structure.
330327
331-
@return
332328
@retval false Succeeded. Arguments are ok.
333329
@retval true Failed. Error is reported via specified handler.
334330
*/

Diff for: components/mysqlbackup/backup_page_tracker.cc

-10
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ bool Backup_page_tracker::backup_id_update() {
5757

5858
/**
5959
Make a list of the UDFs exposed by mysqlbackup page_tracking.
60-
61-
@return None
6260
*/
6361
void Backup_page_tracker::initialize_udf_list() {
6462
m_udf_list.push_back(new udf_data_t(
@@ -165,8 +163,6 @@ bool Backup_page_tracker::set_page_tracking_init(UDF_INIT *, UDF_ARGS *,
165163

166164
/**
167165
Callback method for initialization of UDF "mysqlbackup_page_track_set".
168-
169-
@return None
170166
*/
171167
void Backup_page_tracker::set_page_tracking_deinit(
172168
UDF_INIT *initid MY_ATTRIBUTE((unused))) {}
@@ -220,8 +216,6 @@ bool Backup_page_tracker::page_track_get_start_lsn_init(UDF_INIT *, UDF_ARGS *,
220216
/**
221217
Callback method for initialization of UDF
222218
"mysqlbackup_page_track_get_start_lsn"
223-
224-
@return None
225219
*/
226220
void Backup_page_tracker::page_track_get_start_lsn_deinit(
227221
UDF_INIT *initid MY_ATTRIBUTE((unused))) {}
@@ -266,8 +260,6 @@ bool Backup_page_tracker::page_track_get_changed_page_count_init(UDF_INIT *,
266260
/**
267261
Callback method for initialization of UDF
268262
"mysqlbackup_page_track_get_changed_page_count".
269-
270-
@return None
271263
*/
272264
void Backup_page_tracker::page_track_get_changed_page_count_deinit(
273265
UDF_INIT *initid MY_ATTRIBUTE((unused))) {}
@@ -319,8 +311,6 @@ bool Backup_page_tracker::page_track_get_changed_pages_init(UDF_INIT *,
319311
/**
320312
Callback method for initialization of UDF
321313
"mysqlbackup_page_track_get_changed_pages".
322-
323-
@return None
324314
*/
325315
void Backup_page_tracker::page_track_get_changed_pages_deinit(
326316
UDF_INIT *initid MY_ATTRIBUTE((unused))) {

Diff for: components/test/perfschema/test_pfs_resource_group.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
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,
@@ -140,7 +140,6 @@ void session_disconnect_callback(const PSI_thread_attrs *thread_attrs) {
140140
/**
141141
Test the Resource Group service.
142142
Log messages are written to the console and log file.
143-
@return NULL for success
144143
*/
145144
void session_event(const Event_info &event) {
146145
PSI_thread_attrs attrs = event.m_attrs;

Diff for: components/test/test_audit_api_message.cc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
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,
@@ -51,7 +51,6 @@ REQUIRES_SERVICE_PLACEHOLDER(mysql_audit_api_message);
5151
@param null_value Unused.
5252
@param error Unused.
5353
54-
@return
5554
@retval 0 This function always returns 0.
5655
*/
5756
static long long message_internal(UDF_INIT *init MY_ATTRIBUTE((unused)),
@@ -82,7 +81,6 @@ static long long message_internal(UDF_INIT *init MY_ATTRIBUTE((unused)),
8281
@param null_value Unused.
8382
@param error Unused.
8483
85-
@return
8684
@retval 0 This function always returns 0.
8785
*/
8886
static long long message_user(UDF_INIT *init MY_ATTRIBUTE((unused)),

0 commit comments

Comments
 (0)