Skip to content

Commit 07a2d5e

Browse files
committed
BUG#31354830 FIX DOXYGEN WARNINGS IN SRVGEN CODE
Fixed doxygen warnings reported by recent doxygen versions. Changes in Doxyfile.in: - upgraded config to doxygen 1.8.20, while commenting new options not understood by doxygen 1.8.13, for backward compatibility with 1.8.13. - removed the obsolete TCL_SUBST option - set EXTRACT_ANON_NSPACES to YES, which resolves many warnings related to code using anonymous namespace. - excluded test code from the doxygen build. Changes in the source code in general: - removed duplicated page PAGE_COMPONENTS_REGISTRY - fixed many doc duplication between declarations and definitions - fixed some typos in doc - fixed formatting of retval for tuples - fixed unbalanced grouping commands Tested with doxygen 1.8.20. Approved by: Chris Powers <chris.powers@oracle.com>
1 parent d7236d0 commit 07a2d5e

24 files changed

+97
-325
lines changed

Doxyfile.in

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
##
5555
##===========================================================================
5656

57-
# Doxyfile 1.8.17
57+
# Doxyfile 1.8.20
5858

5959
# This file describes the settings to be used by the documentation system
6060
# doxygen (www.doxygen.org) for a project.
@@ -273,6 +273,14 @@ QT_AUTOBRIEF = YES
273273

274274
MULTILINE_CPP_IS_BRIEF = NO
275275

276+
# By default Python docstrings are displayed as preformatted text and doxygen's
277+
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
278+
# doxygen's special commands can be used and the contents of the docstring
279+
# documentation blocks is shown as doxygen documentation.
280+
# The default value is: YES.
281+
282+
# PYTHON_DOCSTRING = YES
283+
276284
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
277285
# documentation from any documented member that it re-implements.
278286
# The default value is: YES.
@@ -310,12 +318,6 @@ TAB_SIZE = 8
310318
ALIASES = "SQL{1}=<small>\1</small>" \
311319
"B{1}=<b>\1</b>"
312320

313-
# This tag can be used to specify a number of word-keyword mappings (TCL only).
314-
# A mapping has the form "name=value". For example adding "class=itcl::class"
315-
# will allow you to use the command class in the itcl::class meaning.
316-
317-
TCL_SUBST =
318-
319321
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
320322
# only. Doxygen will then generate output that is more tailored for C. For
321323
# instance, some of the names that are used will be different. The list of all
@@ -357,13 +359,13 @@ OPTIMIZE_OUTPUT_VHDL = NO
357359
# extension. Doxygen has a built-in mapping, but you can override or extend it
358360
# using this tag. The format is ext=language, where ext is a file extension, and
359361
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
360-
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
362+
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL,
361363
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
362364
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
363365
# tries to guess whether the code is fixed or free formatted code, this is the
364-
# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
365-
# .inc files as Fortran files (default is PHP), and .f files as C (default is
366-
# Fortran), use: inc=Fortran f=C.
366+
# default for Fortran type files). For instance to make doxygen treat .inc files
367+
# as Fortran files (default is PHP), and .f files as C (default is Fortran),
368+
# use: inc=Fortran f=C.
367369
#
368370
# Note: For files without extension you can use no_extension as a placeholder.
369371
#
@@ -502,6 +504,19 @@ TYPEDEF_HIDES_STRUCT = NO
502504

503505
LOOKUP_CACHE_SIZE = 2
504506

507+
# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
508+
# during processing. When set to 0 doxygen will based this on the number of
509+
# cores available in the system. You can set it explicitly to a value larger
510+
# than 0 to get more control over the balance between CPU load and processing
511+
# speed. At this moment only the input processing can be done using multiple
512+
# threads. Since this is still an experimental feature the default is set to 1,
513+
# which efficively disables parallel processing. Please report any issues you
514+
# encounter. Generating dot graphs in parallel is controlled by the
515+
# DOT_NUM_THREADS setting.
516+
# Minimum value: 0, maximum value: 32, default value: 1.
517+
518+
# NUM_PROC_THREADS = 1
519+
505520
#---------------------------------------------------------------------------
506521
# Build related configuration options
507522
#---------------------------------------------------------------------------
@@ -563,7 +578,7 @@ EXTRACT_LOCAL_METHODS = NO
563578
# are hidden.
564579
# The default value is: NO.
565580

566-
EXTRACT_ANON_NSPACES = NO
581+
EXTRACT_ANON_NSPACES = YES
567582

568583
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
569584
# undocumented members inside documented classes or files. If set to NO these
@@ -606,7 +621,7 @@ INTERNAL_DOCS = NO
606621
# names in lower-case letters. If set to YES, upper-case letters are also
607622
# allowed. This is useful if you have classes or files whose names only differ
608623
# in case and if your file system supports case sensitive file names. Windows
609-
# (including Cygwin) ands Mac users are advised to set this option to NO.
624+
# (including Cygwin) and Mac users are advised to set this option to NO.
610625
# The default value is: system dependent.
611626

612627
CASE_SENSE_NAMES = YES
@@ -940,7 +955,7 @@ INPUT_ENCODING = UTF-8
940955
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
941956
# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
942957
# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen
943-
# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd,
958+
# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
944959
# *.vhdl, *.ucf, *.qsf and *.ice.
945960

946961
FILE_PATTERNS = *.c \
@@ -976,6 +991,7 @@ RECURSIVE = YES
976991

977992
EXCLUDE = cmd-line-utils \
978993
client/mysqlbinlog.cc \
994+
components/test \
979995
extra \
980996
generated \
981997
include/mysqld_error.h \
@@ -984,6 +1000,8 @@ EXCLUDE = cmd-line-utils \
9841000
internal \
9851001
libevent \
9861002
plugin/innodb_memcached/daemon_memcached/include/memcached \
1003+
plugin/test_services \
1004+
plugin/test_service_sql_api \
9871005
source_downloads \
9881006
sql/sql_hints.cc \
9891007
sql/sql_yacc.cc \
@@ -1101,7 +1119,6 @@ INPUT_FILTER =
11011119
FILTER_PATTERNS = "*/sql/mysqld.cc=perl ./doxygen_resources/doxygen-filter-mysqld" \
11021120
"*/plugin/x/protocol/*.proto=perl ./doxygen_resources/doxygen-filter-proto"
11031121

1104-
11051122
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
11061123
# INPUT_FILTER) will also be used to filter the input files that are used for
11071124
# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
@@ -1474,7 +1491,7 @@ CHM_FILE =
14741491
HHC_LOCATION =
14751492

14761493
# The GENERATE_CHI flag controls if a separate .chi index file is generated
1477-
# (YES) or that it should be included in the master .chm file (NO).
1494+
# (YES) or that it should be included in the main .chm file (NO).
14781495
# The default value is: NO.
14791496
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
14801497

@@ -1636,6 +1653,17 @@ TREEVIEW_WIDTH = 250
16361653

16371654
EXT_LINKS_IN_WINDOW = NO
16381655

1656+
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
1657+
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
1658+
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
1659+
# the HTML output. These images will generally look nicer at scaled resolutions.
1660+
# Possible values are: png (the default) and svg (looks nicer but requires the
1661+
# pdf2svg or inkscape tool).
1662+
# The default value is: png.
1663+
# This tag requires that the tag GENERATE_HTML is set to YES.
1664+
1665+
# HTML_FORMULA_FORMAT = png
1666+
16391667
# Use this tag to change the font size of LaTeX formulas included as images in
16401668
# the HTML documentation. When you change the font size after a successful
16411669
# doxygen run you need to manually remove any form_*.png images from the HTML
@@ -1691,7 +1719,7 @@ MATHJAX_FORMAT = HTML-CSS
16911719
# Content Delivery Network so you can quickly see the result without installing
16921720
# MathJax. However, it is strongly recommended to install a local copy of
16931721
# MathJax from https://www.mathjax.org before deployment.
1694-
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
1722+
# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2.
16951723
# This tag requires that the tag USE_MATHJAX is set to YES.
16961724

16971725
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
@@ -1930,9 +1958,11 @@ LATEX_EXTRA_FILES =
19301958

19311959
PDF_HYPERLINKS = YES
19321960

1933-
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
1934-
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
1935-
# higher quality PDF documentation.
1961+
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
1962+
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
1963+
# files. Set this option to YES, to get a higher quality PDF documentation.
1964+
#
1965+
# See also section LATEX_CMD_NAME for selecting the engine.
19361966
# The default value is: YES.
19371967
# This tag requires that the tag GENERATE_LATEX is set to YES.
19381968

components/libminchassis/minimal_chassis_runtime_error_imp.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
2424
#include <mysql/components/service_implementation.h>
2525
#include <stdio.h>
2626

27-
/**
28-
This is the default implementation for emit api.
29-
@param error_id error ID.
30-
@param flags error flags
31-
@param args va_list type, which hold the error message string.
32-
*/
33-
3427
DEFINE_METHOD(void, mysql_runtime_error_imp::emit,
3528
(int error_id, int flags, va_list args)) {
3629
char buff[1024];

components/libminchassis/minimal_chassis_runtime_error_imp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
2828

2929
/**
3030
An default implementation of the mysql_runtime_error service for minimal
31-
chassis library to reportthe error messages.
31+
chassis library to report the error messages.
3232
*/
3333
class mysql_runtime_error_imp {
3434
public:
3535
/**
3636
This function reports the given error to the caller.
37-
@param error_id error id is used to retrive the error description.
37+
@param error_id error id is used to retrieve the error description.
3838
@param flags flags for the given error do decide where to print the error
3939
@param args variable list arguments which holds error message format
4040
string

components/libminchassis/registry_imp.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
3333
#include "mysql_service_implementation.h"
3434
#include "rwlock_scoped_lock.h"
3535

36-
/**
37-
@page PAGE_COMPONENTS_REGISTRY The Service Registry Service
38-
The Service Registry is a central part of Components subsystem. It maintains
39-
a list of the Service Implementations and allow acquiring them by any actor
40-
that has a reference to main Registry Service Implementation. For each Service
41-
a reference counter is maintained to make sure no one can remove any Service
42-
Implementation being actively used.
43-
The Service Implementations can be acquired by the Service name or by the full
44-
Service Implementation name.
45-
For each Service a default Service Implementation is distinguished, the first
46-
one to be added, but it is possible to change it at will at any point.
47-
48-
A convenient RAII-style wrapper on Service acquisition and automatic release
49-
is provided, the my_service<T> class.
50-
*/
51-
5236
typedef std::map<const char *, mysql_service_implementation *, c_string_less>
5337
my_service_registry;
5438

libmysql/authentication_ldap/auth_ldap_kerberos.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ class Kerberos {
6464
it again.
6565
6666
@return
67-
@retval true, If function is successfully able to obtain and store
68-
credentials.
69-
@retval false, If function is failed to obtain and store credentials.
67+
@retval true Successfully able to obtain and store credentials.
68+
@retval false Failed to obtain and store credentials.
7069
*/
7170
bool obtain_store_credentials();
7271
/**
@@ -75,8 +74,8 @@ class Kerberos {
7574
MySQL client, This method can be used to get the user name and use for
7675
authentication.
7776
@return
78-
@retval true, If function is successfully able to get user name.
79-
@retval false, If function is failed to get user name.
77+
@retval true Successfully able to get user name.
78+
@retval false Failed to get user name.
8079
*/
8180
bool get_user_name(std::string *name);
8281
void destroy_credentials();
@@ -90,9 +89,9 @@ class Kerberos {
9089
This function creates kerberos context, initializes credentials cache and
9190
user principal.
9291
@return
93-
@retval true, If all the required kerberos objects like context,
94-
credentials cache and user principal are initialized correctly.
95-
@retval false, If required kerberos objects are failed to initialized.
92+
@retval true All the required kerberos objects like context,
93+
credentials cache and user principal are initialized correctly.
94+
@retval false Required kerberos objects failed to initialized.
9695
*/
9796
bool setup();
9897
/**

sql/auth/dynamic_privileges_impl.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, 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,
@@ -36,15 +36,6 @@ class dynamic_privilege_services_impl {
3636
static DEFINE_BOOL_METHOD(register_privilege, (const char *privilege_str,
3737
size_t privilege_str_len));
3838

39-
/**
40-
Unregister a previously registered privilege object identifier so that it no
41-
longer can be used in GRANT statements.
42-
@param privilege_str Privilege object ID
43-
@param privilege_str_len The length of the string (not including \0)
44-
@return Error state
45-
@retval true Operation was not successful
46-
@retval false Success
47-
*/
4839
static DEFINE_BOOL_METHOD(unregister_privilege, (const char *privilege_str,
4940
size_t privilege_str_len));
5041

sql/auth/sql_auth_cache.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3208,20 +3208,6 @@ uint64 Acl_cache::version() { return m_role_graph_version.load(); }
32083208

32093209
int32 Acl_cache::size() { return m_cache.count.load(); }
32103210

3211-
/**
3212-
Finds an Acl_map entry in the Acl_cache and increase its reference count.
3213-
If no Acl_map is located, a new one is created with reference count one.
3214-
The Acl_map is returned to the caller.
3215-
3216-
@param sctx The target Security_context
3217-
@param uid The target authid
3218-
@param active_roles A list of active roles
3219-
3220-
@return A pointer to an Acl_map
3221-
@retval !NULL Success
3222-
@retval NULL A fatal OOM error happened.
3223-
*/
3224-
32253211
Acl_map *Acl_cache::checkout_acl_map(Security_context *sctx, Auth_id_ref &uid,
32263212
List_of_auth_id_refs &active_roles) {
32273213
DBUG_TRACE;

sql/auth/sql_auth_cache.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,13 @@ class Acl_cache {
597597
A new object will also be created if the role graph version counter is
598598
different than the acl map object's version.
599599
600-
@param uid user id
600+
@param sctx The target Security_context
601+
@param uid The target authid
602+
@param active_roles A list of active roles
603+
604+
@return A pointer to an Acl_map
605+
@retval !NULL Success
606+
@retval NULL A fatal OOM error happened.
601607
*/
602608
Acl_map *checkout_acl_map(Security_context *sctx, Auth_id_ref &uid,
603609
List_of_auth_id_refs &active_roles);

sql/auth/sql_security_ctx.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,10 @@ bool Security_context::any_table_acl(const LEX_CSTRING &db) {
640640
@param [in] priv privilege to check
641641
@param [in] priv_len length of privilege
642642
643-
@returns pair/<has_privilege, has_with_grant_option/>
644-
@retval /<true, true/> has required privilege with grant option
645-
@retval /<true, false/> has required privilege without grant option
646-
@retval /<false, false/> does not have the required privilege
643+
@returns pair@<has_privilege, has_with_grant_option@>
644+
@retval "<true, true>" has required privilege with grant option
645+
@retval "<true, false>" has required privilege without grant option
646+
@retval "<false, false>" does not have the required privilege
647647
*/
648648
std::pair<bool, bool> Security_context::has_global_grant(const char *priv,
649649
size_t priv_len) {
@@ -692,10 +692,10 @@ std::pair<bool, bool> Security_context::has_global_grant(const char *priv,
692692
roles granted to it irrespective the roles are
693693
active or not.
694694
695-
@returns pair/<has_privilege, has_with_grant_option/>
696-
@retval /<true, true/> has required privilege with grant option
697-
@retval /<true, false/> has required privilege without grant option
698-
@retval /<false, false/> does not have the required privilege, OR
695+
@returns pair@<has_privilege, has_with_grant_option@>
696+
@retval "<true, true>" has required privilege with grant option
697+
@retval "<true, false>" has required privilege without grant option
698+
@retval "<false, false>" does not have the required privilege, OR
699699
auth_id does not exist.
700700
*/
701701
std::pair<bool, bool> Security_context::has_global_grant(
@@ -1149,10 +1149,10 @@ ulong Security_context::filter_access(const ulong access,
11491149
true - privileges granted directly or coming through
11501150
roles granted to it irrespective the roles are
11511151
active or not.
1152-
@returns pair/<has_privilege, has_with_grant_option/>
1153-
@retval /<true, true/> has required privilege with grant option
1154-
@retval /<true, false/> has required privilege without grant option
1155-
@retval /<false, false/> does not have the required privilege
1152+
@returns pair@<has_privilege, has_with_grant_option@>
1153+
@retval "<true, true>" has required privilege with grant option
1154+
@retval "<true, false>" has required privilege without grant option
1155+
@retval "<false, false>" does not have the required privilege
11561156
*/
11571157
std::pair<bool, bool> Security_context::fetch_global_grant(
11581158
const ACL_USER &acl_user, const std::string &privilege,

0 commit comments

Comments
 (0)