lib: remove includes from logging.h
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 22 Oct 2019 15:16:58 +0000 (11:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Oct 2019 19:14:52 +0000 (15:14 -0400)
Nothing in logging.h uses anything from those includes.

Removing them causes this failure in py-common.c:

  CC       py-common.lo
In file included from /home/smarchi/src/babeltrace/src/py-common/py-common.c:32:0:
/home/smarchi/src/babeltrace/src/py-common/py-common.h:44:18: error: unknown type name ‘bool’; did you mean ‘_Bool’?
   int log_level, bool chain);
                  ^~~~
                  _Bool

Doing this change revealed a few files that were using bool without
including stdbool.h, add the includes there.

Change-Id: Ica802312a21c2a28cfaa1011d0034f0d1f65594e
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2241
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
include/babeltrace2/logging.h
src/cli/babeltrace2-plugins.c
src/plugins/common/param-validation/param-validation.h
src/py-common/py-common.h

index ae03d8d1c225d6c47c1ef9d5d67e9695097b7dcb..37143e19b458149eccf86fae634a4784695d5bd8 100644 (file)
 # error "Please include <babeltrace2/babeltrace.h> instead."
 #endif
 
-#include <stdint.h>
-#include <stdbool.h>
-#include <stddef.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 0093d4cea4fe03d4293d41a584df4749336ab772..42cda686ac587122f64fd9199db7c1ffda372fcd 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "babeltrace2-plugins.h"
 
+#include <stdbool.h>
 #include <babeltrace2/babeltrace.h>
 
 /* Array of bt_plugin * */
index a78f997bb373055cbfbac03c5506bfb9efde3e56..3113ff4debf6b8e5b78ea3b78822687c9c12d97e 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <babeltrace2/babeltrace.h>
 #include <glib.h>
+#include <stdbool.h>
 
 #include <stdio.h> /* For __MINGW_PRINTF_FORMAT. */
 
index 27a3a619c517960a6ba9e22e9d4c0f7500244966..6622438a275c789ba88998fb3a43c96eddf138db 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <glib.h>
 #include <Python.h>
+#include <stdbool.h>
 
 #include "common/macros.h"
 
This page took 0.026014 seconds and 4 git commands to generate.