]> arthur.barton.de Git - netdata.git/commitdiff
Bugfix: Fix clang compiler build fails.
authorSimon Nagl <simonnagl@aim.com>
Mon, 23 May 2016 19:06:25 +0000 (21:06 +0200)
committerSimon Nagl <simonnagl@aim.com>
Mon, 23 May 2016 19:06:25 +0000 (21:06 +0200)
src/main.c

index 2e10356ebd76cb61ec1373a89b55c84423d0f19b..569a15b27f37d94651cf4ad8097444c80ca9b35f 100644 (file)
@@ -244,6 +244,19 @@ void help(int exitcode) {
        exit(exitcode);
 }
 
+// TODO: Remove this function with the nix major release.
+void remove_option(int opt_index, int *argc, char **argv) {
+       int i = opt_index;
+       // remove the options.
+       do {
+               *argc = *argc - 1;
+               for(i = opt_index; i < *argc; i++) {
+                       argv[i] = argv[i+1];
+               }
+               i = opt_index;
+       } while(argv[i][0] != '-' && opt_index >= *argc);
+}
+
 
 int main(int argc, char **argv)
 {
@@ -264,18 +277,6 @@ int main(int argc, char **argv)
        // parse depercated options
        // TODO: Remove this block with the next major release.
        {
-               void remove_option(int opt_index, int *argc, char **argv) {
-                       int i = opt_index;
-                       // remove the options.
-                       do {
-                               *argc = *argc - 1;
-                               for(i = opt_index; i < *argc; i++) {
-                                       argv[i] = argv[i+1];
-                               }
-                               i = opt_index;
-                       } while(argv[i][0] != '-' && opt_index >= *argc);
-               }
-
                i = 1;
                while(i < argc) {
                        if(strcmp(argv[i], "-pidfile") == 0 && (i+1) < argc) {