Skip to content

Commit

Permalink
log Remove enclosing '#ifndef NDEBUG' from ly_log_dbg_groups
Browse files Browse the repository at this point in the history
Not having the prototype for ly_log_dbg_groups breaks my release builds
(frrouting) due to an implicit function declaration. Judging from the
implementation of ly_log_dbg_groups, it was intended to be present in
release builds and just do nothing. So the removal of the #ifndef
shouldn't be problematic.

Signed-off-by: Thomas Egerer <[email protected]>
  • Loading branch information
spellingmistake committed Oct 23, 2023
1 parent 7e5ea21 commit 91c04f4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ LIBYANG_API_DECL uint32_t ly_log_options(uint32_t opts);
*/
LIBYANG_API_DECL void ly_temp_log_options(uint32_t *opts);

#ifndef NDEBUG

/**
* @ingroup log
* @defgroup dbggroup Debug messages groups
Expand All @@ -166,14 +164,13 @@ LIBYANG_API_DECL void ly_temp_log_options(uint32_t *opts);
* @brief Enable specific debugging messages (independent of log level).
*
* To get the current value, the function must be called twice resetting the level by the received value.
* Note: does not have any effect on non-debug (Release) builds
*
* @param[in] dbg_groups Bitfield of enabled debug message groups (see @ref dbggroup).
* @return Previous options bitfield.
*/
LIBYANG_API_DECL uint32_t ly_log_dbg_groups(uint32_t dbg_groups);

#endif

/**
* @brief Logger callback.
*
Expand Down

0 comments on commit 91c04f4

Please sign in to comment.