duck-read-cache-fs
duck-read-cache-fs copied to clipboard
Compilation warning for using C++17 features
At the moment, when we compile the extension we get a bunch of compilation warnings, mostly because we're using g++ C++11 standard, but codebase's leveraging C++17 feature (for code simplicity). We need to convert them back to old standard code, suppress known compilation warnings, or fix compilation options into a higher version.
/home/ubuntu/duck-read-cache-fs/src/include/cache_filesystem_config.hpp:14:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
14 | inline const idx_t DEFAULT_CACHE_BLOCK_SIZE = 64_KiB;
| ^~~~~~
/home/ubuntu/duck-read-cache-fs/src/include/cache_filesystem_config.hpp:15:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
15 | inline const std::string DEFAULT_ON_DISK_CACHE_DIRECTORY =
| ^~~~~~
/home/ubuntu/duck-read-cache-fs/src/include/cache_filesystem_config.hpp:20:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
20 | inline const idx_t MIN_DISK_SPACE_FOR_CACHE = 1_MiB;
| ^~~~~~
/home/ubuntu/duck-read-cache-fs/src/include/cache_filesystem_config.hpp:24:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
24 | inline const idx_t DEFAULT_MAX_IN_MEM_CACHE_BLOCK_COUNT = 256;
| ^~~~~~
/home/ubuntu/duck-read-cache-fs/src/include/cache_filesystem_config.hpp:27:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
27 | inline constexpr idx_t CACHE_FILE_STALENESS_SECOND = 24 * 3600; // 1 day
| ^~~~~~
/home/ubuntu/duck-read-cache-fs/src/include/cache_filesystem_config.hpp:32:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
32 | inline idx_t g_cache_block_size = DEFAULT_CACHE_BLOCK_SIZE;
| ^~~~~~
/home/ubuntu/duck-read-cache-fs/src/include/cache_filesystem_config.hpp:33:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
33 | inline std::string g_on_disk_cache_directory = DEFAULT_ON_DISK_CACHE_DIRECTORY;
| ^~~~~~
/home/ubuntu/duck-read-cache-fs/src/include/cache_filesystem_config.hpp:34:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
34 | inline idx_t g_max_in_mem_cache_block_count = DEFAULT_MAX_IN_MEM_CACHE_BLOCK_COUNT;
| ^~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp: In function ‘void duckdb::{anonymous}::BaseLineRead()’:
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:36:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
36 | SetConfig(set_vars, "AWS_DEFAULT_REGION", "s3_region");
| ^~~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:36:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
36 | SetConfig(set_vars, "AWS_DEFAULT_REGION", "s3_region");
| ^~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:37:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
37 | SetConfig(set_vars, "AWS_ACCESS_KEY_ID", "s3_access_key_id");
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:37:44: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
37 | SetConfig(set_vars, "AWS_ACCESS_KEY_ID", "s3_access_key_id");
| ^~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:38:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
38 | SetConfig(set_vars, "AWS_SECRET_ACCESS_KEY", "s3_secret_access_key");
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:38:48: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
38 | SetConfig(set_vars, "AWS_SECRET_ACCESS_KEY", "s3_secret_access_key");
| ^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:39:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
39 | SetConfig(set_vars, "DUCKDB_S3_ENDPOINT", "s3_endpoint");
| ^~~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:39:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
39 | SetConfig(set_vars, "DUCKDB_S3_ENDPOINT", "s3_endpoint");
| ^~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp: In function ‘void duckdb::{anonymous}::ReadUncachedWholeFile(uint64_t)’:
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:75:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
75 | SetConfig(set_vars, "AWS_DEFAULT_REGION", "s3_region");
| ^~~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:75:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
75 | SetConfig(set_vars, "AWS_DEFAULT_REGION", "s3_region");
| ^~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:76:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
76 | SetConfig(set_vars, "AWS_ACCESS_KEY_ID", "s3_access_key_id");
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:76:44: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
76 | SetConfig(set_vars, "AWS_ACCESS_KEY_ID", "s3_access_key_id");
| ^~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:77:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
77 | SetConfig(set_vars, "AWS_SECRET_ACCESS_KEY", "s3_secret_access_key");
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:77:48: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
77 | SetConfig(set_vars, "AWS_SECRET_ACCESS_KEY", "s3_secret_access_key");
| ^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:78:23: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
78 | SetConfig(set_vars, "DUCKDB_S3_ENDPOINT", "s3_endpoint");
| ^~~~~~~~~~~~~~~~~~~~
/home/ubuntu/duck-read-cache-fs/benchmark/read_s3_object.cpp:78:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
78 | SetConfig(set_vars, "DUCKDB_S3_ENDPOINT", "s3_endpoint");
| ^~~~~~~~~~~~~