diff --git a/src/deflatehd.cc b/src/deflatehd.cc index a9086b28..2db89814 100644 --- a/src/deflatehd.cc +++ b/src/deflatehd.cc @@ -373,7 +373,7 @@ OPTIONS: << std::endl; } -static struct option long_options[] = { +constexpr static struct option long_options[] = { {"http1text", no_argument, nullptr, 't'}, {"table-size", required_argument, nullptr, 's'}, {"deflate-table-size", required_argument, nullptr, 'S'}, diff --git a/src/h2load.cc b/src/h2load.cc index 5f0558dd..e7840d25 100644 --- a/src/h2load.cc +++ b/src/h2load.cc @@ -1839,7 +1839,7 @@ int main(int argc, char **argv) { bool nreqs_set_manually = false; while (1) { static int flag = 0; - static option long_options[] = { + constexpr static option long_options[] = { {"requests", required_argument, nullptr, 'n'}, {"clients", required_argument, nullptr, 'c'}, {"data", required_argument, nullptr, 'd'}, diff --git a/src/inflatehd.cc b/src/inflatehd.cc index 7945a0b2..9140e054 100644 --- a/src/inflatehd.cc +++ b/src/inflatehd.cc @@ -251,7 +251,7 @@ OPTIONS: ; } -static struct option long_options[] = { +constexpr static struct option long_options[] = { {"dump-header-table", no_argument, nullptr, 'd'}, {nullptr, 0, nullptr, 0}}; int main(int argc, char **argv) { diff --git a/src/nghttp.cc b/src/nghttp.cc index badbc9ca..f9ba6ce8 100644 --- a/src/nghttp.cc +++ b/src/nghttp.cc @@ -2680,7 +2680,7 @@ int main(int argc, char **argv) { bool color = false; while (1) { static int flag = 0; - static option long_options[] = { + constexpr static option long_options[] = { {"verbose", no_argument, nullptr, 'v'}, {"null-out", no_argument, nullptr, 'n'}, {"remote-name", no_argument, nullptr, 'O'}, diff --git a/src/nghttpd.cc b/src/nghttpd.cc index 43c7e0ba..6080037b 100644 --- a/src/nghttpd.cc +++ b/src/nghttpd.cc @@ -202,7 +202,7 @@ int main(int argc, char **argv) { while (1) { static int flag = 0; - static option long_options[] = { + constexpr static option long_options[] = { {"address", required_argument, nullptr, 'a'}, {"daemon", no_argument, nullptr, 'D'}, {"htdocs", required_argument, nullptr, 'd'},