From: Steven Schubiger Date: Mon, 13 Jun 2022 20:15:59 +0000 (+0200) Subject: Omit declaration of optind/optarg X-Git-Url: http://git.refcnt.org/?p=colorize.git;a=commitdiff_plain;h=HEAD Omit declaration of optind/optarg fixes: warning: ‘optind’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] fixes: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] https://github.com/stsc/colorize/issues/1 Thanks Stephan Jauernick --- diff --git a/colorize.c b/colorize.c index 4566112..a1e1398 100644 --- a/colorize.c +++ b/colorize.c @@ -359,8 +359,6 @@ static void vfprintf_fail (const char *, ...); static void stack (struct var_list **, unsigned int *, unsigned int, void *, enum var_type); static void release (struct var_list *, unsigned int, void **); -extern int optind; - int main (int argc, char **argv) { @@ -513,8 +511,6 @@ print_tstamp (FILE *log) print_version (); \ exit (EXIT_SUCCESS); -extern char *optarg; - static void process_opts (int argc, char **argv, char **conf_file) {