@cryptotaxi247 / netdata-1 / commits / 31193268a

Bugfix: Fix clang compiler build fails.

Simon Nagl committed May 23, 2016 at 21:06 UTC 31193268a6ab2ac9436adbe10832c09d7c6ffa54
1 file changed +13 -12
src/main.c
+13 -12
@@ -244,6 +244,19 @@ void help(int exitcode) {
244 exit(exitcode);
245 }
246
247 +// TODO: Remove this function with the nix major release.
248 +void remove_option(int opt_index, int *argc, char **argv) {
249 + int i = opt_index;
250 + // remove the options.
251 + do {
252 + *argc = *argc - 1;
253 + for(i = opt_index; i < *argc; i++) {
254 + argv[i] = argv[i+1];
255 + }
256 + i = opt_index;
257 + } while(argv[i][0] != '-' && opt_index >= *argc);
258 +}
259 +
260
261 int main(int argc, char **argv)
262 {
@@ -264,18 +277,6 @@ int main(int argc, char **argv)
277 // parse depercated options
278 // TODO: Remove this block with the next major release.
279 {
267 - void remove_option(int opt_index, int *argc, char **argv) {
268 - int i = opt_index;
269 - // remove the options.
270 - do {
271 - *argc = *argc - 1;
272 - for(i = opt_index; i < *argc; i++) {
273 - argv[i] = argv[i+1];
274 - }
275 - i = opt_index;
276 - } while(argv[i][0] != '-' && opt_index >= *argc);
277 - }
278 -
280 i = 1;
281 while(i < argc) {
282 if(strcmp(argv[i], "-pidfile") == 0 && (i+1) < argc) {