35 Commits
Author SHA1 Message Date
Alexey MilovidovandGitHub 842b133f8d Merge pull request #100399 from ClickHouse/clang-tidy-init-variables
Enable clang-tidy check for uninitialized variables
2026-05-31 21:56:29 -07:00
Alexey Milovidov ebd75640c0 Fix -Wdisabled-macro-expansion in compressor.cpp for musl build
`musl` libc defines `stdout` and `stderr` as recursive macros
`#define stdout (stdout)` / `#define stderr (stderr)`, which trigger
`-Wdisabled-macro-expansion` when these are passed to the `usage`
function in `utils/self-extracting-executable/compressor.cpp`.

Suppress the warning around the affected calls, the same way it is
already handled in `BaseDaemon.cpp` and `ReplxxLineReader.cpp`.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/PRs/100976/859778b0ce54bc48ac37aac52390a1e997124fe7/build_amd_musl/build_clickhouse/build_clickhouse.log
PR: https://github.com/ClickHouse/ClickHouse/pull/100976
2026-04-29 15:01:56 +00:00
Alexey MilovidovandClaude Opus 4.6 f41bf1d609 Fix CI failures: add static to functions missing prototypes, fix double-promotion warnings
- `Server.cpp`: Make `checkForUsersNotInMainConfig` static (removes need for style-violating forward declaration)
- `LibSSHLogger.cpp`: Include header in `#else` branch to provide prototype for `initialize`
- `Lexer.cpp`: Include `clickhouse_lexer.h` in standalone build to provide prototypes for `extern "C"` functions
- `compressor.cpp`/`decompressor.cpp`: Make all file-local functions static
- `phdr_cache.cpp`: Add NOLINT for intentional reserved identifier `__lsan_ignore_object`
- BuzzHouse: Add `static` to `CONV_FN`/`CONV_FN_QUOTE` macros and individual functions
- Test/example files: Add `static` to helper functions across ~50 files
- Fix `double-promotion` in `compressor.cpp`, `gtest_compressionCodec.cpp`, `FuzzConfig.cpp`

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-28 14:57:32 +00:00
Alexey MilovidovandClaude Opus 4.6 f5ee191db8 Initialize variables in utils/self-extracting-executable
Fix clang-tidy `cppcoreguidelines-init-variables` and
`cppcoreguidelines-pro-type-member-init` warnings in compressor.cpp
and decompressor.cpp.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-23 18:48:47 +00:00
Antonio Andelic d27229d5cf Better casting 2026-01-21 15:35:51 +01:00
Raúl Marín d6ac63c8d2 Style: Forbid the use of quotes for includes (partial) 2025-06-24 13:20:10 +02:00
Nikita Mikhaylov 3f33597b61 Fix FreeBSD build 2024-12-23 10:58:20 +00:00
Nikita Mikhaylov 11292be5e0 Fix self-extracting executable util 2024-12-22 00:48:16 +01:00
Nikita Taranov 0b3f7d18ef fix 2024-12-11 16:46:02 +01:00
Robert Schulze 7b585da613 Fix clang-tidy 2023-09-22 10:12:11 +00:00
Robert Schulze 50c51c2854 Fix new clang-tidy-s 2023-09-20 22:17:39 +00:00
Azat Khuzhin 6587d11885 Check return value of close() in self-extracting-executable
And also add description into perror() over callign simply
perror(nullptr).

Signed-off-by: Azat Khuzhin <[email protected]>
2023-02-07 11:28:22 +01:00
Azat Khuzhin 8414ea0691 Fix -Wshorten-64-to-32 in self extracting executable
Signed-off-by: Azat Khuzhin <[email protected]>
2022-10-21 13:25:42 +02:00
Yakov Olkhovskiy 088a969500 comments added 2022-08-22 12:14:29 +00:00
Yakov Olkhovskiy 32717a844e allow empty --exec to signify no executable to run, add some stats printout 2022-08-21 21:39:24 +00:00
Yakov Olkhovskiy d4facec3fa typo 2022-08-20 14:03:03 +00:00
Yakov Olkhovskiy 151afb16e2 add EOL 2022-08-19 20:57:12 +00:00
Yakov Olkhovskiy d81ec25027 add --exec param, allow compressed to be renamed 2022-08-19 20:43:10 +00:00
Yakov Olkhovskiy 250f19378d free compression and decompression contexts 2022-07-25 15:22:48 -04:00
Yakov Olkhovskiy a85818f654 some refactoring 2022-07-24 21:13:00 -04:00
Yakov Olkhovskiy c8ea6783dc clang tidy suggestions 2022-07-21 10:27:56 -04:00
Yakov Olkhovskiy 15496c63b9 __APPLE__->OS_DARWIN, __FreeBSD__->OS_FREEBSD 2022-07-21 10:14:53 -04:00
Yakov Olkhovskiy bdd11f671d different path of endian.h for FreeBSD 2022-07-21 02:08:07 -04:00
Yakov OlkhovskiyandGitHub e7438cc433 Merge branch 'master' into cmake-self-extracting-executable 2022-07-21 00:25:08 -04:00
Yakov Olkhovskiy 29ed2083d1 endian.h in different path on __APPLE__ and __FreeBSD__ 2022-07-21 00:20:23 -04:00
Jordi Villar c63512d255 Use CH custom platform macro for OS Darwin 2022-07-18 09:59:02 +02:00
Jordi Villar d86abba2c6 Fix macosx compilation due to endian.h 2022-07-17 14:58:27 +02:00
Yakov Olkhovskiy 7c437c3f9b some optimizations 2022-07-12 09:56:09 -04:00
Yakov Olkhovskiy 3432768dc3 Parameter --decompressor added, architecture-agnostic metadata, bugs fixed, some improvements 2022-07-09 16:05:12 -04:00
Robert Schulze c22038d48b More clang-tidy fixes 2022-06-28 11:50:05 +00:00
Robert SchulzeandGitHub 8fef6e7fa3 Add missing ":" to error msg 2022-06-15 14:37:58 +02:00
Robert Schulze 50748a94bd Fix a compile errors in self-extracting-executable (de)compressor
E.g.

utils/self-extracting-executable/compressor.cpp:257:31: format specifies type 'ptrdiff_t' (aka 'long') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
        printf("Size: %td\n", info_in.st_size);
                      ~~~     ^~~~~~~~~~~~~~~
                      %lld

Not sure though if it's a hard requirement to use only C.

Avoided usage of fmt::format() to keep link dependencies to a minimum.
Also not using C++20 std::format() as it's only available in Clang >=14.
2022-06-15 13:41:28 +02:00
Yakov Olkhovskiy 539100fc4a some refactoring, cleaning, types fixed in fprintf 2022-06-13 20:25:19 -04:00
Yakov Olkhovskiy ce395dc68d resolving conflicts 2022-06-13 11:41:32 -04:00
Yakov Olkhovskiy 0bae6c037a bugs fixed, process EINTR, rename to self-extracting-executable 2022-06-12 23:27:56 -04:00