From 65c0982cdaa2a31bb3ccc61463e18d8b9f9c066a Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 19 Jun 2024 08:00:33 -0700 Subject: [PATCH 1/5] Directly include system headers Found by `clang-tidy`: https://clang.llvm.org/extra/clang-tidy/checks/misc/include-cleaner.html - cctype --> toupper() - cstddef --> size_t There are several other findings related to `libuv` that I'm omitting here e.g. > no header providing "uv_fs_req_cleanup" is directly included As well as ones that are really not standard for R packages: > no header providing "NULL" is directly included Happy to provide the full output if requested; sticking to a more minimal version of standard system headers here for now. --- src/utils.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.cc b/src/utils.cc index 84824313..731e6190 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -1,3 +1,5 @@ +#include +#include #include #include "utils.h" From fbfe61f042b482e1772a48698ddb7463562ee930 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 19 Jun 2024 08:01:47 -0700 Subject: [PATCH 2/5] string --> std::string --- src/path.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/path.cc b/src/path.cc index 354a75dc..63fa2ff2 100644 --- a/src/path.cc +++ b/src/path.cc @@ -2,6 +2,7 @@ #include #include +#include #include "Rinternals.h" #include "error.h" From 1c8f911713a8d0f1dfefae7332683b55eec143c1 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 19 Jun 2024 08:02:22 -0700 Subject: [PATCH 3/5] another size_t --- src/id.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/id.cc b/src/id.cc index cc4165cb..b07fe723 100644 --- a/src/id.cc +++ b/src/id.cc @@ -1,3 +1,4 @@ +#include #include #include From b419f62cd29bfd7ee1adc68e1c3f1563ec778e8e Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 19 Jun 2024 08:03:33 -0700 Subject: [PATCH 4/5] cstdio --> snprintf --- src/file.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/file.cc b/src/file.cc index 20b898c9..202be46a 100644 --- a/src/file.cc +++ b/src/file.cc @@ -2,6 +2,7 @@ #define __STDC_FORMAT_MACROS 1 #endif +#include #include #include #include From d0276d3413cb39338733239fb837202efe99db12 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 19 Jun 2024 08:03:57 -0700 Subject: [PATCH 5/5] Another std::string --- src/dir.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dir.cc b/src/dir.cc index 2d2c9807..d1f0bb89 100644 --- a/src/dir.cc +++ b/src/dir.cc @@ -1,5 +1,6 @@ #include #include +#include #include #include "getmode.h"