From acb81bc9a922af1b75852cc751a77de2dc60780f Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 15 Dec 2018 17:53:17 +0000 Subject: [PATCH] Add log.h to files that need it Signed-off-by: Yuxuan Shui --- src/c2.c | 1 + src/common.h | 1 + src/compton.c | 1 + src/compton.h | 1 + src/config.c | 1 + src/config_libconfig.c | 1 + src/dbus.c | 1 + src/opengl.c | 2 ++ src/opengl.h | 1 + src/region.h | 2 +- src/utils.h | 2 -- src/win.c | 1 + src/win.h | 1 - src/x.c | 1 + src/xrescheck.c | 2 ++ 15 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/c2.c b/src/c2.c index 45b5368b..567c6555 100644 --- a/src/c2.c +++ b/src/c2.c @@ -31,6 +31,7 @@ #include "win.h" #include "c2.h" #include "string_utils.h" +#include "log.h" #define C2_MAX_LEVELS 10 diff --git a/src/common.h b/src/common.h index d606eaf3..83e12334 100644 --- a/src/common.h +++ b/src/common.h @@ -141,6 +141,7 @@ #include "win.h" #include "x.h" #include "region.h" +#include "log.h" // === Constants === diff --git a/src/compton.c b/src/compton.c index 187e7d0a..d702b950 100644 --- a/src/compton.c +++ b/src/compton.c @@ -30,6 +30,7 @@ #include "config.h" #include "diagnostic.h" #include "string_utils.h" +#include "log.h" #define auto __auto_type diff --git a/src/compton.h b/src/compton.h index 951d1718..62e68d4d 100644 --- a/src/compton.h +++ b/src/compton.h @@ -33,6 +33,7 @@ #include "win.h" #include "x.h" #include "c2.h" +#include "log.h" // XXX clean up // == Functions == // TODO move static inline functions that are only used in compton.c, into diff --git a/src/config.c b/src/config.c index 5f86b1e3..e64180b2 100644 --- a/src/config.c +++ b/src/config.c @@ -9,6 +9,7 @@ #include "utils.h" #include "c2.h" #include "string_utils.h" +#include "log.h" #include "config.h" diff --git a/src/config_libconfig.c b/src/config_libconfig.c index 32d483b9..ee9a430c 100644 --- a/src/config_libconfig.c +++ b/src/config_libconfig.c @@ -11,6 +11,7 @@ #include "common.h" #include "config.h" #include "string_utils.h" +#include "log.h" /** * Wrapper of libconfig's config_lookup_int. diff --git a/src/dbus.c b/src/dbus.c index 024df78c..b1085dc3 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -11,6 +11,7 @@ #include "win.h" #include "string_utils.h" +#include "log.h" #include "dbus.h" diff --git a/src/opengl.c b/src/opengl.c index 5e194350..664da296 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -10,6 +10,8 @@ */ #include "string_utils.h" +#include "log.h" + #include "opengl.h" static inline int diff --git a/src/opengl.h b/src/opengl.h index 69b88164..326b5e83 100644 --- a/src/opengl.h +++ b/src/opengl.h @@ -12,6 +12,7 @@ #pragma once #include "common.h" +#include "log.h" #include #include diff --git a/src/region.h b/src/region.h index a42f9f2e..3627651c 100644 --- a/src/region.h +++ b/src/region.h @@ -43,7 +43,7 @@ from_x_rect(const xcb_rectangle_t *rect) { /// Returning an array that needs to be freed static inline rect_t * from_x_rects(int nrects, const xcb_rectangle_t *rects) { - rect_t *ret = calloc(nrects, sizeof *ret); + rect_t *ret = ccalloc(nrects, rect_t); for (int i = 0; i < nrects; i++) ret[i] = from_x_rect(rects+i); return ret; diff --git a/src/utils.h b/src/utils.h index 5bede5a5..15ee5ed8 100644 --- a/src/utils.h +++ b/src/utils.h @@ -10,8 +10,6 @@ #include #include -#include "log.h" - #define ARR_SIZE(arr) (sizeof(arr)/sizeof(arr[0])) #ifdef __FAST_MATH__ diff --git a/src/win.c b/src/win.c index a1ba8c01..a019df17 100644 --- a/src/win.c +++ b/src/win.c @@ -13,6 +13,7 @@ #include "c2.h" #include "x.h" #include "string_utils.h" +#include "log.h" #include "win.h" diff --git a/src/win.h b/src/win.h index ff65b174..75a205b4 100644 --- a/src/win.h +++ b/src/win.h @@ -16,7 +16,6 @@ #include "x.h" #include "types.h" #include "c2.h" -#include "utils.h" typedef struct session session_t; typedef struct _glx_texture glx_texture_t; diff --git a/src/x.c b/src/x.c index 9c097af7..157bc21e 100644 --- a/src/x.c +++ b/src/x.c @@ -10,6 +10,7 @@ #include "common.h" #include "x.h" +#include "log.h" /** * Get a specific attribute of a window. diff --git a/src/xrescheck.c b/src/xrescheck.c index 1cd25ee7..5a5ec6b0 100644 --- a/src/xrescheck.c +++ b/src/xrescheck.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MIT // Copyright (c) 2014 Richard Grenville +#include "log.h" + #include "xrescheck.h" static xrc_xid_record_t *gs_xid_records = NULL;