Skip to content

Commit 50c0198

Browse files
authored
Merge pull request ClickHouse#79286 from ClickHouse/fix-nixos-build
Fix build on NixOS
2 parents 90c5a7e + 3e7c27a commit 50c0198

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Common/logger_useful.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,19 @@ constexpr bool constexprContains(std::string_view haystack, std::string_view nee
118118
} \
119119
catch (const Poco::Exception & logger_exception) \
120120
{ \
121-
::write(STDERR_FILENO, static_cast<const void *>(MESSAGE_FOR_EXCEPTION_ON_LOGGING), sizeof(MESSAGE_FOR_EXCEPTION_ON_LOGGING)); \
121+
(void)::write(STDERR_FILENO, static_cast<const void *>(MESSAGE_FOR_EXCEPTION_ON_LOGGING), sizeof(MESSAGE_FOR_EXCEPTION_ON_LOGGING)); \
122122
const std::string & logger_exception_message = logger_exception.message(); \
123-
::write(STDERR_FILENO, static_cast<const void *>(logger_exception_message.data()), logger_exception_message.size()); \
123+
(void)::write(STDERR_FILENO, static_cast<const void *>(logger_exception_message.data()), logger_exception_message.size()); \
124124
} \
125125
catch (const std::exception & logger_exception) \
126126
{ \
127-
::write(STDERR_FILENO, static_cast<const void *>(MESSAGE_FOR_EXCEPTION_ON_LOGGING), sizeof(MESSAGE_FOR_EXCEPTION_ON_LOGGING)); \
127+
(void)::write(STDERR_FILENO, static_cast<const void *>(MESSAGE_FOR_EXCEPTION_ON_LOGGING), sizeof(MESSAGE_FOR_EXCEPTION_ON_LOGGING)); \
128128
const char * logger_exception_message = logger_exception.what(); \
129-
::write(STDERR_FILENO, static_cast<const void *>(logger_exception_message), strlen(logger_exception_message)); \
129+
(void)::write(STDERR_FILENO, static_cast<const void *>(logger_exception_message), strlen(logger_exception_message)); \
130130
} \
131131
catch (...) \
132132
{ \
133-
::write(STDERR_FILENO, static_cast<const void *>(MESSAGE_FOR_EXCEPTION_ON_LOGGING), sizeof(MESSAGE_FOR_EXCEPTION_ON_LOGGING)); \
133+
(void)::write(STDERR_FILENO, static_cast<const void *>(MESSAGE_FOR_EXCEPTION_ON_LOGGING), sizeof(MESSAGE_FOR_EXCEPTION_ON_LOGGING)); \
134134
} \
135135
ProfileEvents::incrementLoggerElapsedNanoseconds(_logger_watch.elapsedNanoseconds()); \
136136
} while (false)

src/Storages/FileLog/DirectoryWatcherBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void DirectoryWatcherBase::start()
156156
void DirectoryWatcherBase::stop()
157157
{
158158
stopped = true;
159-
::write(event_pipe.fds_rw[1], "\0", 1);
159+
(void)::write(event_pipe.fds_rw[1], "\0", 1);
160160
if (watch_task)
161161
watch_task->deactivate();
162162
}

0 commit comments

Comments
 (0)