comerr-get-rid-of-compile-warnings-20010602
authorNathan Neulinger <nneul@umr.edu>
Sun, 3 Jun 2001 17:26:15 +0000 (17:26 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 3 Jun 2001 17:26:15 +0000 (17:26 +0000)
placate compiler

src/comerr/compile_et.c

index 8452e10..8f7ae12 100644 (file)
@@ -10,6 +10,7 @@
 #undef MEMORYLEAK
 #include <afs/param.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #ifndef AFS_NT40_ENV
 #include <sys/file.h>
@@ -38,12 +39,6 @@ FILE *hfile, *cfile, *msfile;
 int version = 1;
 int use_msf = 0;
 
-/* C library */
-#ifndef AFS_NT40_ENV
-extern char *malloc();
-#endif
-
-
 /* lex stuff */
 extern FILE *yyin;
 extern FILE *yyout;
@@ -108,7 +103,7 @@ static const char warning[] =
     "/*\n * %s:\n * This file is automatically generated; please do not edit it.\n */\n";
 
 static const char msf_warning[] =
-    "$ \n$ %s:\n$ This file is automatically generated; please do not edit it.\n$\n$set 1\n";
+    "$ \n$ %s:\n$ This file is automatically generated; please do not edit it.\n$ \n$set 1\n";
 
 /* pathnames */
 char c_file[MAXPATHLEN];       /* output file */
@@ -341,7 +336,7 @@ int main (argc, argv) int argc; char **argv; {
        fputs ("    0\n};\n\n", cfile);
        fprintf(cfile,
                "static const struct error_table et = { text, %ldL, %d };\n\n",
-               table_number, current);
+               (long int) table_number, current);
        fputs("static struct et_list etlink = { 0, &et};\n\n", cfile);
        fprintf(cfile, "void initialize_%s_error_table (%s) {\n",
                table_name, (language == lang_C) ? "void" : "NOARGS");
@@ -358,7 +353,7 @@ int main (argc, argv) int argc; char **argv; {
     }
 
     fprintf (hfile, "#define ERROR_TABLE_BASE_%s (%ldL)\n",
-            table_name, table_number);
+            table_name, (long int) table_number);
     /* compatibility... */
     fprintf (hfile, "\n/* for compatibility with older versions... */\n");
     fprintf (hfile, "#define init_%s_err_tbl initialize_%s_error_table\n",