Skip to content

Commit 8c0a79c

Browse files
committed
main usage: fix GCC 15 warning
fix the warning: ``` /usr/include/c++/15.2.1/bits/new_allocator.h:172:66: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘__result’ with nonzero offset 32 [-Wfree-nonheap-object] 172 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n)); ``` full warning: <https://gist.github.com/MartinPulec/976f020990831e40de4dc206f2cebf30> Most likely false positive.
1 parent 0fa5186 commit 8c0a79c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
#include <cstring> // for strcmp, strlen, strtok_r, strchr
7373
#include <exception> // for exception
7474
#include <getopt.h>
75+
#include <initializer_list> // for initializer_list
7576
#include <iostream>
7677
#include <map> // for map
7778
#include <memory>
@@ -199,7 +200,9 @@ static void signal_handler(int signum)
199200
exit_uv(0);
200201
}
201202

202-
static void print_help_item(const string &name, const vector<string> &help) {
203+
static void
204+
print_help_item(const string &name, initializer_list<string> help)
205+
{
203206
int help_lines = 0;
204207

205208
col() << "\t" << TBOLD(<< name <<);

0 commit comments

Comments
 (0)