Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with clang v18 [-Wvla-cxx-extension] #1813

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
RockStore: do not use variable-length arrays
Variable length arrays are legal in C, but not
part of the C++ standard.
Current clang versions emit a warning if
these are used, failing the build in Rock.
  • Loading branch information
kinkie committed May 18, 2024
commit 6ca4fa40810e728d121cb6cdbbe9c652b3f3f32f
2 changes: 0 additions & 2 deletions src/fs/rock/RockSwapDir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include <sys/stat.h>
#endif

const int64_t Rock::SwapDir::HeaderSize = 16*1024;

Rock::SwapDir::SwapDir(): ::SwapDir("rock"),
slotSize(HeaderSize), filePath(nullptr), map(nullptr), io(nullptr),
waitingForPage(nullptr)
Expand Down
2 changes: 1 addition & 1 deletion src/fs/rock/RockSwapDir.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class SwapDir: public ::SwapDir, public IORequestor, public Ipc::StoreMapCleaner
/* configurable options */
DiskFile::Config fileConfig; ///< file-level configuration options

static const int64_t HeaderSize; ///< on-disk db header size
static constexpr int64_t HeaderSize = 16*1024; ///< on-disk db header size
};

/// initializes shared memory segments used by Rock::SwapDir
Expand Down
Loading