From 9f18918b747c4787f291fdcdd67bb1f21ee8efce Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 3 Dec 2019 15:47:24 -0500 Subject: [PATCH] Cleanup: apply `include-what-you-use` guideline for `mbstate_t` I saw that some files use the `mbstate_t` type but there are not including a header for it. The `mbstate_t` type is defined by the following header: So, to follow the best practice of including what is used in a file, I added `#include ` in files using `mbstate_t`. Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I103d144ede1a8488d2662d3b8ba5337accafda99 --- snprintf/various.h | 1 + snprintf/vfprintf.c | 1 + snprintf/wcio.h | 1 + 3 files changed, 3 insertions(+) diff --git a/snprintf/various.h b/snprintf/various.h index 64f1db1f..13d29b7b 100644 --- a/snprintf/various.h +++ b/snprintf/various.h @@ -36,6 +36,7 @@ #include #include #include +#include struct __lttng_ust_sbuf { unsigned char *_base; diff --git a/snprintf/vfprintf.c b/snprintf/vfprintf.c index 896a8840..4ac63c3c 100644 --- a/snprintf/vfprintf.c +++ b/snprintf/vfprintf.c @@ -51,6 +51,7 @@ #include #include #include +#include #include "local.h" #include "fvwrite.h" diff --git a/snprintf/wcio.h b/snprintf/wcio.h index 453a41b1..ddaf9e4b 100644 --- a/snprintf/wcio.h +++ b/snprintf/wcio.h @@ -33,6 +33,7 @@ #define _WCIO_H_ #include +#include /* minimal requirement of SUSv2 */ #define WCIO_UNGETWC_BUFSIZE 1 -- 2.34.1