wmc: Fix symbol was not declared and using plain integer as NULL pointer sparse warnings.
diff --git a/tools/wmc/wmc.c b/tools/wmc/wmc.c
index 910a654..4c4ba28 100644
--- a/tools/wmc/wmc.c
+++ b/tools/wmc/wmc.c
@@ -101,7 +101,7 @@
 /*
  * Debugging flag (-D option)
  */
-int dodebug = 0;
+static int dodebug = 0;
 
 char *output_name = NULL;	/* The name given by the -o option */
 char *input_name = NULL;	/* The name given on the command-line */
@@ -115,6 +115,8 @@
 
 int mcy_debug;
 
+FILE *yyin;
+
 int getopt (int argc, char *const *argv, const char *optstring);
 static void segvhandler(int sig);
 
@@ -242,8 +244,8 @@
 	mcy_debug = dodebug;
 	if(dodebug)
 	{
-		setbuf(stdout, 0);
-		setbuf(stderr, 0);
+		setbuf(stdout, NULL);
+		setbuf(stderr, NULL);
 	}
 
 	/* Check for input file on command-line */
diff --git a/tools/wmc/wmc.h b/tools/wmc/wmc.h
index 86ccd6f..cf6d430 100644
--- a/tools/wmc/wmc.h
+++ b/tools/wmc/wmc.h
@@ -65,7 +65,7 @@
 extern lan_blk_t *lanblockhead;
 
 int mcy_lex(void);
-FILE *yyin;
+extern FILE *yyin;
 void set_codepage(int cp);
 
 void add_token(tok_e type, const WCHAR *name, int tok, int cp, const WCHAR *alias, int fix);