libcamera: base: log: Declare log categories when defining them
libcamera will enable -Wmissing-declarations to catch mismatches between function declarations and definitions. There is one offender in log.h: when a category is defined with LOG_DEFINE_CATEGORY(), it generates a function with no declaration. Fix it by declaring the function using LOG_DECLARE_CATEGORY() as the first step of the category definition. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
4d0834ea0a
commit
38c75f863a
1 changed files with 1 additions and 0 deletions
|
@ -48,6 +48,7 @@ private:
|
|||
extern const LogCategory &_LOG_CATEGORY(name)();
|
||||
|
||||
#define LOG_DEFINE_CATEGORY(name) \
|
||||
LOG_DECLARE_CATEGORY(name) \
|
||||
const LogCategory &_LOG_CATEGORY(name)() \
|
||||
{ \
|
||||
/* The instance will be deleted by the Logger destructor. */ \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue