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

Prevent "variable tracking size limit exceeded" compiler notice. #281

Merged
merged 1 commit into from
Dec 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 13 additions & 4 deletions dbms/src/Server/LocalServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,24 @@ void LocalServer::defineOptions(Poco::Util::OptionSet& _options)
.binding("help")
.callback(Poco::Util::OptionCallback<LocalServer>(this, &LocalServer::handleHelp)));

#define DECLARE_SETTING(TYPE, NAME, DEFAULT) \
_options.addOption(Poco::Util::Option(#NAME, "", "Settings.h").group("Settings").required(false).repeatable(false).binding(#NAME));
/// These arrays prevent "variable tracking size limit exceeded" compiler notice.
static const char * settings_names[] = {
#define DECLARE_SETTING(TYPE, NAME, DEFAULT) #NAME,
APPLY_FOR_SETTINGS(DECLARE_SETTING)
#undef DECLARE_SETTING
nullptr};

#define DECLARE_SETTING(TYPE, NAME, DEFAULT) \
_options.addOption(Poco::Util::Option(#NAME, "", "Limits.h").group("Limits").required(false).repeatable(false).binding(#NAME));
static const char * limits_names[] = {
#define DECLARE_SETTING(TYPE, NAME, DEFAULT) #NAME,
APPLY_FOR_LIMITS(DECLARE_SETTING)
#undef DECLARE_SETTING
nullptr};

for (const char ** name = settings_names; *name; ++name)
_options.addOption(Poco::Util::Option(*name, "", "Settings.h").group("Settings").required(false).repeatable(false).binding(*name));

for (const char ** name = limits_names; *name; ++name)
_options.addOption(Poco::Util::Option(*name, "", "Limits.h").group("Limits").required(false).repeatable(false).binding(*name));
}


Expand Down