From b87905ca2645b630470aba9fddcf03312add6cf9 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller Date: Thu, 30 Oct 2025 08:29:20 +0100 Subject: [PATCH] Add missing includes and remove includes that are not needed --- source/examples/relocation/relocation_read.cc | 9 +++++++-- source/examples/relocation/relocation_write.cc | 8 ++++++-- source/examples/simple/simple_read.cc | 8 ++++++-- source/examples/simple/simple_write.cc | 8 ++++++-- source/examples/zlib/zlib_read.cc | 8 ++++++-- source/examples/zlib/zlib_write.cc | 8 ++++++-- source/include/sio/api.h | 4 ++-- source/include/sio/buffer.h | 3 ++- source/include/sio/io_device.h | 3 +++ source/include/sio/version.h | 1 + source/main/sio-dump.cc | 7 ++++--- source/src/api.cc | 9 +++++++-- source/src/block.cc | 4 +++- source/src/buffer.cc | 6 +++++- source/src/compression/zlib.cc | 6 +++--- source/src/io_device.cc | 5 +++++ source/src/memcpy.cc | 2 ++ 17 files changed, 74 insertions(+), 25 deletions(-) diff --git a/source/examples/relocation/relocation_read.cc b/source/examples/relocation/relocation_read.cc index 5de6177d..04168dce 100644 --- a/source/examples/relocation/relocation_read.cc +++ b/source/examples/relocation/relocation_read.cc @@ -2,11 +2,16 @@ #include #include #include - +#include // -- sio examples headers #include #include +#include +#include +#include + + /** * This example illustrate how to read a simple data structure. * The sio block reading function is available in sioexamples/blocks.h @@ -79,4 +84,4 @@ int main( int argc, char **argv ) { } return 0 ; -} \ No newline at end of file +} diff --git a/source/examples/relocation/relocation_write.cc b/source/examples/relocation/relocation_write.cc index db285c24..0b0669a0 100644 --- a/source/examples/relocation/relocation_write.cc +++ b/source/examples/relocation/relocation_write.cc @@ -2,10 +2,14 @@ #include #include #include - +#include // -- sio examples headers #include #include +#include +#include +#include + /** * This example illustrate how to write a simple data structure. @@ -85,4 +89,4 @@ int main( int argc, char **argv ) { } return 0 ; -} \ No newline at end of file +} diff --git a/source/examples/simple/simple_read.cc b/source/examples/simple/simple_read.cc index 05cdce53..eca72757 100644 --- a/source/examples/simple/simple_read.cc +++ b/source/examples/simple/simple_read.cc @@ -2,10 +2,14 @@ #include #include #include - +#include // -- sio examples headers #include #include +#include +#include +#include + /** * This example illustrate how to read a simple data structure. @@ -78,4 +82,4 @@ int main( int argc, char **argv ) { } return 0 ; -} \ No newline at end of file +} diff --git a/source/examples/simple/simple_write.cc b/source/examples/simple/simple_write.cc index e1483c03..0c7dcf05 100644 --- a/source/examples/simple/simple_write.cc +++ b/source/examples/simple/simple_write.cc @@ -2,10 +2,14 @@ #include #include #include - +#include // -- sio examples headers #include #include +#include +#include +#include + /** * This example illustrate how to write a simple data structure. @@ -75,4 +79,4 @@ int main( int argc, char **argv ) { } return 0 ; -} \ No newline at end of file +} diff --git a/source/examples/zlib/zlib_read.cc b/source/examples/zlib/zlib_read.cc index 2a445dbd..5af7115b 100644 --- a/source/examples/zlib/zlib_read.cc +++ b/source/examples/zlib/zlib_read.cc @@ -3,10 +3,14 @@ #include #include #include - +#include // -- sio examples headers #include #include +#include +#include +#include + /** * This example illustrate how to read a simple data structure and @@ -92,4 +96,4 @@ int main( int argc, char **argv ) { } return 0 ; -} \ No newline at end of file +} diff --git a/source/examples/zlib/zlib_write.cc b/source/examples/zlib/zlib_write.cc index e49be845..a631a2a8 100644 --- a/source/examples/zlib/zlib_write.cc +++ b/source/examples/zlib/zlib_write.cc @@ -3,10 +3,14 @@ #include #include #include - +#include // -- sio examples headers #include #include +#include +#include +#include + /** * This example illustrate how to write a simple data structure and @@ -85,4 +89,4 @@ int main( int argc, char **argv ) { } return 0 ; -} \ No newline at end of file +} diff --git a/source/include/sio/api.h b/source/include/sio/api.h index 2f5745f2..1039a80f 100644 --- a/source/include/sio/api.h +++ b/source/include/sio/api.h @@ -3,13 +3,13 @@ // -- sio headers #include #include - // -- std headers -#include #include #include #include #include +#include +#include namespace sio { diff --git a/source/include/sio/buffer.h b/source/include/sio/buffer.h index 304fd4d0..cb57ab6f 100644 --- a/source/include/sio/buffer.h +++ b/source/include/sio/buffer.h @@ -2,9 +2,10 @@ // -- sio headers #include - // -- std headers #include +#include +#include namespace sio { diff --git a/source/include/sio/io_device.h b/source/include/sio/io_device.h index f877bb0e..60a9984b 100644 --- a/source/include/sio/io_device.h +++ b/source/include/sio/io_device.h @@ -3,6 +3,9 @@ // -- sio headers #include #include +#include +#include +#include namespace sio { diff --git a/source/include/sio/version.h b/source/include/sio/version.h index e8e564e2..35a77cc0 100644 --- a/source/include/sio/version.h +++ b/source/include/sio/version.h @@ -2,6 +2,7 @@ // -- sio headers #include +#include namespace sio { diff --git a/source/main/sio-dump.cc b/source/main/sio-dump.cc index 5535f731..8a0da0b2 100644 --- a/source/main/sio-dump.cc +++ b/source/main/sio-dump.cc @@ -1,9 +1,7 @@ // -- sio headers #include -#include #include -#include - +#include // -- std headers #include #include @@ -11,6 +9,9 @@ #include #include #include +#include +#include + constexpr const char *USAGE = R"(Usage: sio-dump [-d/--detailed] [-n NRECORDS] [-m SKIPRECORDS] siofile)"; diff --git a/source/src/api.cc b/source/src/api.cc index 4d109936..8bc464ef 100644 --- a/source/src/api.cc +++ b/source/src/api.cc @@ -7,13 +7,18 @@ #include #include #include - +#include // -- std headers #include #include -#include #include #include +#include +#include +#include +#include +#include + namespace sio { diff --git a/source/src/block.cc b/source/src/block.cc index b213e9ec..fef7c020 100644 --- a/source/src/block.cc +++ b/source/src/block.cc @@ -2,6 +2,8 @@ #include #include +#include + namespace sio { block::block( const std::string &nam, sio::version_type vers ) : @@ -24,4 +26,4 @@ namespace sio { return _version ; } -} \ No newline at end of file +} diff --git a/source/src/buffer.cc b/source/src/buffer.cc index a20fd7aa..f5c82596 100644 --- a/source/src/buffer.cc +++ b/source/src/buffer.cc @@ -1,10 +1,14 @@ // -- sio headers #include #include - +#include // -- std headers #include #include +#include +#include +#include + namespace sio { diff --git a/source/src/compression/zlib.cc b/source/src/compression/zlib.cc index 56f828e8..bee2247f 100644 --- a/source/src/compression/zlib.cc +++ b/source/src/compression/zlib.cc @@ -1,15 +1,15 @@ #include - // -- sio headers #include #include - +#include // -- zlib headers #include - +#include // -- std headers #include + namespace sio { void zlib_compression::set_level( int level ) { diff --git a/source/src/io_device.cc b/source/src/io_device.cc index 420e6365..94f6eb2b 100644 --- a/source/src/io_device.cc +++ b/source/src/io_device.cc @@ -1,6 +1,11 @@ // -- sio headers #include #include +#include +#include +#include +#include + namespace sio { diff --git a/source/src/memcpy.cc b/source/src/memcpy.cc index 60f6a4f9..8f68b301 100644 --- a/source/src/memcpy.cc +++ b/source/src/memcpy.cc @@ -1,5 +1,7 @@ // -- sio headers #include +#include + namespace sio {