Cleanup: apply `include-what-you-use` guideline for `uint*_t`
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 3 Dec 2019 22:17:42 +0000 (17:17 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 13 Feb 2020 17:10:51 +0000 (12:10 -0500)
I saw that some files use `uint*_t` types but there are not including a
header for it. The `uint*_t` types is defined by the following header:
  <stdint.h>

So, to follow the best practice of including what is used in a file, I
added `#include <stdint.h>` in files using `uint*_t`.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I5da13744858a57fc8c9bf6a6cf1b29299c2211cc

34 files changed:
doc/examples/clock-override/lttng-ust-clock-override-example.c
include/lttng/ust-ctl.h
include/lttng/ust-tracepoint-event.h
include/ust-comm.h
liblttng-ust-comm/lttng-ust-comm.c
liblttng-ust-ctl/ustctl.c
liblttng-ust-dl/lttng-ust-dl.c
liblttng-ust/filter-bytecode.h
liblttng-ust/jhash.h
liblttng-ust/lttng-clock.c
liblttng-ust/lttng-context-perf-counters.c
liblttng-ust/lttng-context-provider.c
liblttng-ust/lttng-filter-specialize.c
liblttng-ust/lttng-filter-validator.c
liblttng-ust/lttng-filter.c
liblttng-ust/lttng-rb-clients.h
liblttng-ust/lttng-tracer-core.h
liblttng-ust/lttng-ust-abi.c
liblttng-ust/lttng-ust-comm.c
liblttng-ust/lttng-ust-elf.c
liblttng-ust/ust-core.c
libringbuffer/backend_internal.h
libringbuffer/backend_types.h
libringbuffer/frontend.h
libringbuffer/frontend_internal.h
libringbuffer/frontend_types.h
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/shm.c
tests/test-app-ctx/hello.c
tests/ust-basic-tracing/ust-basic-tracing.c
tests/ust-elf/ust-elf.c
tests/ust-multi-test/ust-multi-test.c
tests/ust-variant/ust-variant.c

index ab29787cb69163f3e739cbc7c635263bd2147b1b..aed7aac82c9d2cff50ad4131dc9b41609c2a1d8c 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include <stdlib.h>
+#include <stdint.h>
 #include <time.h>
 #include <string.h>
 #include <stdio.h>
index 56128490173059bdfbae4308bf3e10212f417de5..4b254efac37d458025379116c73151070ec77458 100644 (file)
 #ifndef _LTTNG_UST_CTL_H
 #define _LTTNG_UST_CTL_H
 
+#include <limits.h>
 #include <stddef.h>
-#include <lttng/ust-abi.h>
+#include <stdint.h>
 #include <sys/types.h>
-#include <limits.h>
+
+#include <lttng/ust-abi.h>
 
 #ifndef LTTNG_PACKED
 #error "LTTNG_PACKED should be defined"
index 7890c247453e93c0c4b0ee9038ce6531b1a49757..0360bb6c6226ec0e81e780bb0c40b15b0da1fb9d 100644 (file)
@@ -20,6 +20,7 @@
  * SOFTWARE.
  */
 
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <urcu/compiler.h>
index 10dbca2148c9e3f178c97517aa6cd501516b8099..a5e0957235ff2503e73ec8f8dfd3f17356e05735 100644 (file)
@@ -26,6 +26,7 @@
  * These declarations should NOT be considered stable API.
  */
 
+#include <stdint.h>
 #include <limits.h>
 #include <unistd.h>
 #include <lttng/ust-abi.h>
index 92d86d4ecbfb0c2309a7126366ae5da6fdd7272b..543465edf2fe2e2ee703a0d62e1b4c800d5d2f0d 100644 (file)
@@ -19,6 +19,7 @@
 
 #define _GNU_SOURCE
 #include <limits.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index c2b761a1b7cccba3fea0fd0dfad2cc074036b45e..39c8baa4b4fea4b586a9323290b6287acd4e86f4 100644 (file)
  */
 
 #define _GNU_SOURCE
+#include <byteswap.h>
+#include <stdint.h>
 #include <string.h>
+#include <sys/mman.h>
+
 #include <lttng/ust-config.h>
 #include <lttng/ust-ctl.h>
 #include <lttng/ust-abi.h>
 #include <lttng/ust-events.h>
-#include <sys/mman.h>
-#include <byteswap.h>
-
 #include <usterr-signal-safe.h>
 #include <ust-comm.h>
 #include <helper.h>
index 231e9ec38ae86481f74cb4aa2d8dcbf0a47a8b2e..e38eaf1e7d8f5cda4011d887940519111f61163f 100644 (file)
@@ -22,6 +22,7 @@
 #define _LGPL_SOURCE
 #include <limits.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <sys/types.h>
 #include <unistd.h>
 
index 7df0288ae071c46ecd6edb016b77a32fbd61d2c8..59e84555a0076b35941b8030f2eebde7649c66cc 100644 (file)
@@ -27,6 +27,7 @@
  * SOFTWARE.
  */
 
+#include <stdint.h>
 #include <lttng/ust-abi.h>
 
 #ifndef LTTNG_PACKED
index 416836adbf294c997414a292e60596dbf1045ec9..ace743bfa5438fe33937075e5d3c51e70d4a2482 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include <stddef.h>
+#include <stdint.h>
 #include <urcu/compiler.h>
 #include <lttng/ust-endian.h>
 
index 877b5d61955d3f081c0e3f6bdcd85172fb17e59c..5c33de0c477d5b46a77c25a6a19f27d7b346d9b2 100644 (file)
@@ -21,6 +21,7 @@
 #include <error.h>
 #include <dlfcn.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <usterr-signal-safe.h>
 #include <lttng/ust-clock.h>
 #include <urcu/system.h>
index 90f9db1944baba037974b50a1846c0dfcb4a7746..12d4ab3b2a1a2760f4da5bc29fbd83424aea896e 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <stdbool.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <sys/mman.h>
 #include <sys/syscall.h>
 #include <lttng/ust-events.h>
index edb1e9b2e076a4297653b010b87978e5eb67c07d..50f73c6253cf340d90485540ce154dfdafd24d72 100644 (file)
 
 #define _LGPL_SOURCE
 #include <stddef.h>
+#include <stdint.h>
 #include <sys/types.h>
 #include <unistd.h>
+
 #include <lttng/ust-context-provider.h>
 #include "lttng-tracer-core.h"
 #include "jhash.h"
index 21e35923859e37f7a3a7a4e68aaa14cc7b4470c0..39730f8cd954a0428ff419fe1d9114a70caf7a33 100644 (file)
@@ -26,6 +26,7 @@
 
 #define _LGPL_SOURCE
 #include <stddef.h>
+#include <stdint.h>
 
 #include "lttng-filter.h"
 #include <lttng/align.h>
index 49e2e43dc3d4d72817dbb96953209d198322fa8a..953bbdd7c8fb710364bb2c052fdcf9fbae752bd2 100644 (file)
 
 #define _LGPL_SOURCE
 #include <stddef.h>
-#include <urcu-bp.h>
+#include <stdint.h>
 #include <time.h>
-#include "lttng-filter.h"
 
+#include <urcu-bp.h>
 #include <urcu/rculfhash.h>
+
+#include "lttng-filter.h"
 #include "lttng-hash-helper.h"
 #include "string-utils.h"
 
index fb8eefdd9111ecb7ab0e875a722d5b7fbc9c4118..c0e93b65c7395973e4a90612b21e9019188cecb2 100644 (file)
 
 #define _LGPL_SOURCE
 #include <stddef.h>
+#include <stdint.h>
+
 #include <urcu/rculist.h>
+
 #include "lttng-filter.h"
 
 static const char *opnames[] = {
index e54decbe68b1779e6de53590ac42d27a78985e3a..db75dec64cbf91846d5a7ea64e2e7e4825567bb7 100644 (file)
@@ -19,6 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <stdint.h>
+
 struct lttng_ust_client_lib_ring_buffer_client_cb {
        struct lttng_ust_lib_ring_buffer_client_cb parent;
 
index bd837237590201f89b2fcd3eaa6363964037e1c1..1a0f03a181657c18ccebbdf8ed81070c57dbedd6 100644 (file)
@@ -21,7 +21,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#include <stdint.h>
 #include <stddef.h>
 #include <urcu/arch.h>
 #include <urcu/list.h>
index 24769a7d6571f5fe49ea90ab4f1dcc7443b822ba..0459d7a3f29bf22fcef79f12605834b877feeb10 100644 (file)
  */
 
 #define _LGPL_SOURCE
-#include <lttng/ust-abi.h>
-#include <lttng/ust-error.h>
+#include <stdint.h>
+
 #include <urcu/compiler.h>
 #include <urcu/list.h>
+
+#include <helper.h>
+#include <lttng/tracepoint.h>
+#include <lttng/ust-abi.h>
+#include <lttng/ust-error.h>
 #include <lttng/ust-events.h>
 #include <lttng/ust-version.h>
-#include <lttng/tracepoint.h>
 #include <ust-fd.h>
-#include "tracepoint-internal.h"
 #include <usterr-signal-safe.h>
-#include <helper.h>
+
+#include "../libringbuffer/frontend_types.h"
+#include "../libringbuffer/shm.h"
 #include "lttng-tracer.h"
 #include "string-utils.h"
-#include "../libringbuffer/shm.h"
-#include "../libringbuffer/frontend_types.h"
 
 #define OBJ_NAME_LEN   16
 
index 838bf08bfea43d609fb749814ab2ae68e758b468..900a0e840861f78d7a826abc0ed176b0960a0435 100644 (file)
@@ -22,6 +22,7 @@
 #define _LGPL_SOURCE
 #define _GNU_SOURCE
 #include <stddef.h>
+#include <stdint.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/mman.h>
index 3d6a9379f7a5e44b6837c01fbb5c72a92bd32162..5de3561fbeefcc71a56522f8763fb628dbdcede3 100644 (file)
 
 #define _GNU_SOURCE
 #define _LGPL_SOURCE
+#include <fcntl.h>
 #include <helper.h>
-#include <string.h>
 #include <lttng/align.h>
 #include <lttng/ust-elf.h>
-#include <sys/types.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
 #include <sys/stat.h>
-#include <fcntl.h>
+#include <sys/types.h>
 #include <unistd.h>
-#include <stdbool.h>
+
 #include <ust-fd.h>
+
 #include "lttng-tracer-core.h"
 
 #define BUF_LEN        4096
index 255ad96371d8b63c6bfcb1275140ac9050b1bb40..abea7bbdffb137fdbbae86e2d1c7c4f2422372bb 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <stdint.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <lttng/ust-events.h>
index f492cc3eaff18cb36197f8cf0b0ed0161964cc60..fe8f6eb611ebb5b11e59d3611e2b20956652bf97 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <stddef.h>
+#include <stdint.h>
 #include <unistd.h>
 #include <urcu/compiler.h>
 
index 83fe04871dd26f0885b8859065b8d14cf277a552..3432ef078c25071be7ba6dcb216bc0afb44c23ae 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <limits.h>
+#include <stdint.h>
 #include "shm_internal.h"
 #include "vatomic.h"
 
index 016fc530685cd572602fef5cb67d00dbd01fc743..838f88e8eecf50d836dafb52b833e3aa103c65b4 100644 (file)
@@ -29,6 +29,7 @@
  * See ring_buffer_frontend.c for more information on wait-free algorithms.
  */
 #include <stddef.h>
+#include <stdint.h>
 
 #include <urcu/compiler.h>
 #include <urcu/uatomic.h>
index 7233ed6d91e7529c6af2aaa509f1d7e6e06532fc..f6d91bde2bf63f0917b9bd27b90e73ed54429bcc 100644 (file)
@@ -34,6 +34,7 @@
 #include <urcu/compiler.h>
 #include <urcu/tls-compat.h>
 #include <signal.h>
+#include <stdint.h>
 #include <pthread.h>
 
 #include <lttng/ringbuffer-config.h>
index d0890408eb9bfa4965fda6f1326d00693530a6d8..43300f6a74ddec2324fbfb9f0d0c6dd8bcbb1786 100644 (file)
@@ -28,6 +28,7 @@
  * See ring_buffer_frontend.c for more information on wait-free algorithms.
  */
 
+#include <stdint.h>
 #include <string.h>
 #include <time.h>      /* for timer_t */
 
index b69dc5e6b32dc95c70803e29aec87ad79ab38bfa..f75adbcef1204b017a16e5e4ea3be4eb0023f2e6 100644 (file)
@@ -21,6 +21,7 @@
 #define _GNU_SOURCE
 #define _LGPL_SOURCE
 #include <stddef.h>
+#include <stdint.h>
 #include <unistd.h>
 #include <urcu/arch.h>
 #include <limits.h>
index ce759ff18aa76ce638596b6f25d59d779a868edf..7f73d03c0e94712d2e5ce2b5245fb15bb254ecef 100644 (file)
@@ -61,6 +61,7 @@
 #include <signal.h>
 #include <time.h>
 #include <stdbool.h>
+#include <stdint.h>
 #include <urcu/compiler.h>
 #include <urcu/ref.h>
 #include <urcu/tls-compat.h>
index 909991ed27c6f1ada4a04426e396d232d126df8e..44a830af20446142f8e21177b5187e8dfd6d4af0 100644 (file)
@@ -34,6 +34,7 @@
 #include <lttng/align.h>
 #include <limits.h>
 #include <stdbool.h>
+#include <stdint.h>
 #ifdef HAVE_LIBNUMA
 #include <numa.h>
 #include <numaif.h>
index 85064846ab60ca449ac17045df97c12e0ee2566b..e9e45ec7c51db46aae588276d14085322136ac06 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <stdio.h>
 #include <string.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 /*
  * Work-around inet.h missing struct mmsghdr forward declaration, with
  * triggers a warning when system files warnings are enabled.
index 15368ed73b4a2e7b3ff97fa0d18f0844c4976c84..e9b9ea6d17a5697e640d5ae7f3a18bdb1ba9effd 100644 (file)
 
 #define _LARGEFILE64_SOURCE
 #define _GNU_SOURCE
+#include <assert.h>
 #include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <signal.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/resource.h>
+#include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/time.h>
-#include <sys/resource.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <limits.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
 #include <urcu/futex.h>
 #include <urcu/uatomic.h>
-#include <assert.h>
-#include <sys/socket.h>
 
 #include <ust-comm.h>
 #include <lttng/ust-error.h>
index 4036563ae44b9fa6dd8a7f32a8c1b63b41b1e23d..af9b1239187eb59ea584852526c12217a67ecce9 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include <limits.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 011374395fc4ef5350ff728783f31db8839755e9..eb047655ac68402b89be269f4834728e1a7c6186 100644 (file)
 
 #define _LARGEFILE64_SOURCE
 #define _GNU_SOURCE
+#include <assert.h>
 #include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <signal.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <sys/time.h>
+#include <sys/mman.h>
 #include <sys/resource.h>
+#include <sys/socket.h>
 #include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <limits.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
 #include <urcu/futex.h>
 #include <urcu/uatomic.h>
-#include <assert.h>
-#include <sys/socket.h>
 
 #include <ust-comm.h>
 #include <lttng/ust-error.h>
index 3d97c1a30f6d46f771b8b05fe73f77e0885a918a..9079c26ffd4ca82e12df12909eb529bf78f56025 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include <stdint.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <string.h>
+#include <unistd.h>
 
 /* Internal UST API: ust-variant.h */
 #include <lttng/ust-variant.h>
This page took 0.039359 seconds and 4 git commands to generate.