mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
cogl-trace: Include cogl-trace.h even when not tracing
Public functions in C should be declared before they are defined, and often compilers warn you if you haven't: ``` ../cogl/cogl/cogl-trace.c:237:1: warning: no previous prototype for ‘cogl_set_tracing_enabled_on_thread_with_fd’ [-Wmissing-prototypes] cogl_set_tracing_enabled_on_thread_with_fd (void *data, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../cogl/cogl/cogl-trace.c:245:1: warning: no previous prototype for ‘cogl_set_tracing_enabled_on_thread’ [-Wmissing-prototypes] cogl_set_tracing_enabled_on_thread (void *data, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../cogl/cogl/cogl-trace.c:253:1: warning: no previous prototype for ‘cogl_set_tracing_disabled_on_thread’ [-Wmissing-prototypes] cogl_set_tracing_disabled_on_thread (void *data) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` In this case the function declarations were not included because `HAVE_TRACING` isn't defined. But we should still include `cogl-trace.h` because it handles the case of `HAVE_TRACING` not being defined and correctly still declares the functions defined in `cogl-trace.c`. https://gitlab.gnome.org/GNOME/mutter/merge_requests/650
This commit is contained in:
parent
54fe0d311d
commit
d7d75dd8e7
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
#include "cogl-config.h"
|
#include "cogl-config.h"
|
||||||
|
|
||||||
#ifdef HAVE_TRACING
|
|
||||||
|
|
||||||
#include "cogl/cogl-trace.h"
|
#include "cogl/cogl-trace.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_TRACING
|
||||||
|
|
||||||
#include <sysprof-capture.h>
|
#include <sysprof-capture.h>
|
||||||
#include <syscall.h>
|
#include <syscall.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user