Skip to content

Commit

Permalink
Enable Doxygen's WARN_AS_ERROR option
Browse files Browse the repository at this point in the history
Fixing all existing Doxygen warnings in the process.
  • Loading branch information
pcolby committed Jul 13, 2016
1 parent 0b5f4cb commit 5a9e3bf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ WARN_NO_PARAMDOC = YES
# a warning is encountered.
# The default value is: NO.

WARN_AS_ERROR = NO
WARN_AS_ERROR = YES

# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
Expand Down
7 changes: 7 additions & 0 deletions include/pcp-cpp/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,11 @@ inline char * get_pcp_runtime_version()

PCP_CPP_END_NAMESPACE

/**
* @brief Let the compiler know that a parameter is unsed.
*
* @param name The name of the unused parameter.
*/
#define PCP_CPP_UNUSED(name) (void)name;

#endif
18 changes: 11 additions & 7 deletions include/pcp-cpp/pmda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,13 +956,15 @@ class pmda {
* function will not be called for any metric that did not include
* the `storable_metric` flag in the get_supported_metrics result.
*
* @param metric_id The metric to store.
* @param value The value to store.
* @param metric The metric to store.
* @param value The value to store.
*
* @throw pcp::exception on error.
*/
virtual void store_value(const metric_id &/*metric*/, const int &/*value*/)
virtual void store_value(const metric_id &metric, const int &value)
{
PCP_CPP_UNUSED(metric)
PCP_CPP_UNUSED(value)
throw pcp::exception(PM_ERR_PERMISSION);
}

Expand All @@ -978,14 +980,16 @@ class pmda {
* function will not be called for any metric that did not include
* the `storable_metric` flag in the get_supported_metrics result.
*
* @param metric_id The metric to store.
* @param value The value to store.
* @param metric The metric to store.
* @param value The value to store.
*
* @throw pcp::exception on error.
*/
virtual void store_value(const metric_id &/*metric*/,
const pmValueBlock * const /*value*/)
virtual void store_value(const metric_id &metric,
const pmValueBlock * const value)
{
PCP_CPP_UNUSED(metric)
PCP_CPP_UNUSED(value)
throw pcp::exception(PM_ERR_PERMISSION);
}

Expand Down

0 comments on commit 5a9e3bf

Please sign in to comment.