mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Eliminate some -Wall warnings.
This commit is contained in:
parent
e2f9d9afab
commit
340ff9deae
15 changed files with 76 additions and 40 deletions
|
|
@ -40,6 +40,7 @@ int header = FALSE, printing;
|
|||
time_t ltoday;
|
||||
char from[MAX_DATA_LEN], labels[MAX_DATA_LEN], data[MAX_DATA_LEN], *p, *today;
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
|
|
@ -117,4 +118,5 @@ main (argc, argv)
|
|||
if (printing)
|
||||
puts (data);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,10 +36,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
|
||||
char *malloc ();
|
||||
char *realloc ();
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
char *getenv ();
|
||||
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
void skip_to_lf ();
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
|
|
@ -53,7 +56,7 @@ main (argc, argv)
|
|||
FILE *mddf;
|
||||
FILE *mfilef;
|
||||
FILE *cff;
|
||||
char pre[10], post[100];
|
||||
char pre[10];
|
||||
char name[14];
|
||||
int c;
|
||||
|
||||
|
|
@ -103,6 +106,7 @@ main (argc, argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
skip_to_lf (stream)
|
||||
FILE *stream;
|
||||
{
|
||||
|
|
@ -111,6 +115,26 @@ skip_to_lf (stream)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
error (s1, s2)
|
||||
char *s1, *s2;
|
||||
{
|
||||
fprintf (stderr, "cvtmail: ");
|
||||
fprintf (stderr, s1, s2);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
/* Print error message and exit. */
|
||||
|
||||
void
|
||||
fatal (s1, s2)
|
||||
char *s1, *s2;
|
||||
{
|
||||
error (s1, s2);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
char *
|
||||
xmalloc (size)
|
||||
unsigned size;
|
||||
|
|
@ -131,20 +155,3 @@ xrealloc (ptr, size)
|
|||
fatal ("virtual memory exhausted");
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Print error message and exit. */
|
||||
|
||||
fatal (s1, s2)
|
||||
char *s1, *s2;
|
||||
{
|
||||
error (s1, s2);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
error (s1, s2)
|
||||
char *s1, *s2;
|
||||
{
|
||||
fprintf (stderr, "cvtmail: ");
|
||||
fprintf (stderr, s1, s2);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
but in texinfo format and sorted by function/variable name. */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
register int ch;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ main (argc, argv)
|
|||
extern char *strerror ();
|
||||
extern int errno;
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
|
|
@ -167,7 +168,7 @@ main (argc, argv)
|
|||
while (str = fgets (string, BUFSIZ, out))
|
||||
printf ("%s", str);
|
||||
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else /* This is the SYSV IPC section */
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ char pot_etags_version[] = "@(#) pot revision number is 10.32";
|
|||
#include "getopt.h"
|
||||
|
||||
extern char *getenv ();
|
||||
char *malloc (), *realloc ();
|
||||
|
||||
/* Define CTAGS to make the program "ctags" compatible with the usual one.
|
||||
Let it undefined to make the program "etags", which makes emacs-style
|
||||
|
|
@ -161,6 +162,9 @@ char *etags_getcwd ();
|
|||
char *relative_filename (), *absolute_filename (), *absolute_dirname ();
|
||||
char *xmalloc (), *xrealloc ();
|
||||
int total_size_of_entries ();
|
||||
int string_numeric_p ();
|
||||
int substr ();
|
||||
int prestr ();
|
||||
long readline ();
|
||||
|
||||
void Asm_labels ();
|
||||
|
|
|
|||
|
|
@ -23,11 +23,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
|
||||
#if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
|
||||
/* This program isnot used in BSD, so just avoid loader complaints. */
|
||||
void
|
||||
main ()
|
||||
{
|
||||
}
|
||||
#else /* not BSD 4.2 (or newer) */
|
||||
#ifdef MSDOS
|
||||
void
|
||||
main ()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ int base = DEFAULT_BASE, un_flag = FALSE, iso_flag = FALSE, endian = 1;
|
|||
int group_by = DEFAULT_GROUPING;
|
||||
char *progname;
|
||||
|
||||
void usage();
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
|
|
@ -231,6 +234,7 @@ main (argc, argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
usage ()
|
||||
{
|
||||
fprintf (stderr, "usage: %s [-de] [-iso]\n", progname);
|
||||
|
|
|
|||
|
|
@ -44,8 +44,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#define READ_BINARY "r"
|
||||
#endif /* not MSDOS */
|
||||
|
||||
int scan_file ();
|
||||
int scan_lisp_file ();
|
||||
int scan_c_file ();
|
||||
|
||||
FILE *outfile;
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
|
|
@ -83,11 +88,13 @@ main (argc, argv)
|
|||
#ifndef VMS
|
||||
exit (err_count); /* see below - shane */
|
||||
#endif /* VMS */
|
||||
return err_count;
|
||||
}
|
||||
|
||||
/* Read file FILENAME and output its doc strings to outfile. */
|
||||
/* Return 1 if file is not found, 0 if it is found. */
|
||||
|
||||
int
|
||||
scan_file (filename)
|
||||
char *filename;
|
||||
{
|
||||
|
|
@ -109,6 +116,7 @@ char buf[128];
|
|||
Convert escape sequences \n and \t to newline and tab;
|
||||
discard \ followed by newline. */
|
||||
|
||||
int
|
||||
read_c_string (infile, printflag)
|
||||
FILE *infile;
|
||||
int printflag;
|
||||
|
|
@ -156,6 +164,7 @@ read_c_string (infile, printflag)
|
|||
/* Write to file OUT the argument names of function FUNC, whose text is in BUF.
|
||||
MINARGS and MAXARGS are the minimum and maximum number of arguments. */
|
||||
|
||||
void
|
||||
write_c_args (out, func, buf, minargs, maxargs)
|
||||
FILE *out;
|
||||
char *func, *buf;
|
||||
|
|
@ -240,6 +249,7 @@ write_c_args (out, func, buf, minargs, maxargs)
|
|||
Looks for DEFUN constructs such as are defined in ../src/lisp.h.
|
||||
Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED. */
|
||||
|
||||
int
|
||||
scan_c_file (filename, mode)
|
||||
char *filename, *mode;
|
||||
{
|
||||
|
|
@ -486,7 +496,7 @@ read_lisp_symbol (infile, buffer)
|
|||
skip_white (infile);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
scan_lisp_file (filename, mode)
|
||||
char *filename, *mode;
|
||||
{
|
||||
|
|
@ -504,7 +514,6 @@ scan_lisp_file (filename, mode)
|
|||
while (!feof (infile))
|
||||
{
|
||||
char buffer [BUFSIZ];
|
||||
char *fillp = buffer;
|
||||
char type;
|
||||
|
||||
if (c != '\n')
|
||||
|
|
|
|||
|
|
@ -546,11 +546,13 @@ popmail (user, outfile)
|
|||
* directories have lost mail when over quota because these checks were
|
||||
* not made in previous versions of movemail. */
|
||||
|
||||
#ifdef BSD
|
||||
if (fsync (mbfi) < 0)
|
||||
{
|
||||
error ("Error in fsync: %s", strerror (errno));
|
||||
return (1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (close (mbfi) == -1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static char time_string[30];
|
|||
|
||||
/* Reset the stopwatch to zero. */
|
||||
|
||||
int
|
||||
void
|
||||
reset_watch ()
|
||||
{
|
||||
EMACS_GET_TIME (TV1);
|
||||
|
|
|
|||
|
|
@ -35,17 +35,9 @@ struct docstr /* Allocated thing for an entry. */
|
|||
};
|
||||
|
||||
|
||||
/* Print error message and exit. */
|
||||
|
||||
fatal (s1, s2)
|
||||
char *s1, *s2;
|
||||
{
|
||||
error (s1, s2);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* Print error message. `s1' is printf control string, `s2' is arg for it. */
|
||||
|
||||
void
|
||||
error (s1, s2)
|
||||
char *s1, *s2;
|
||||
{
|
||||
|
|
@ -54,6 +46,16 @@ error (s1, s2)
|
|||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
/* Print error message and exit. */
|
||||
|
||||
void
|
||||
fatal (s1, s2)
|
||||
char *s1, *s2;
|
||||
{
|
||||
error (s1, s2);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* Like malloc but get fatal error if memory is exhausted. */
|
||||
|
||||
char *
|
||||
|
|
@ -67,7 +69,7 @@ xmalloc (size)
|
|||
}
|
||||
|
||||
char *
|
||||
strsav (str)
|
||||
xstrdup (str)
|
||||
char * str;
|
||||
{
|
||||
char *buf = xmalloc (strlen (str) + 1);
|
||||
|
|
@ -98,12 +100,12 @@ char *states[] =
|
|||
"WAITING", "BEG_NAME", "NAME_GET", "BEG_DESC", "DESC_GET"
|
||||
};
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
register DOCSTR *dp = NULL; /* allocated DOCSTR */
|
||||
register LINE *lp = NULL; /* allocated line */
|
||||
register char *bp; /* ptr inside line buffer */
|
||||
int notfirst = 0; /* set after read something */
|
||||
register enum state state = WAITING; /* state at start */
|
||||
int cnt = 0; /* number of DOCSTRs read */
|
||||
|
||||
|
|
@ -169,7 +171,7 @@ main ()
|
|||
else /* saving and changing state */
|
||||
{
|
||||
*bp = NUL;
|
||||
bp = strsav (buf);
|
||||
bp = xstrdup (buf);
|
||||
|
||||
if (state == NAME_GET)
|
||||
dp->name = bp;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ cool_read (fd, buf, size)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
|
|
@ -63,7 +64,6 @@ have been corrupted in the files of Emacs, and it will not work.\n",
|
|||
close (fd);
|
||||
#ifdef VMS
|
||||
exit (1); /* On VMS, success is 1. */
|
||||
#else
|
||||
exit (0);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,6 @@ void
|
|||
getevent ()
|
||||
{
|
||||
int i;
|
||||
int n_events;
|
||||
|
||||
/* In principle the itimer should be disabled on entry to this
|
||||
function, but it really doesn't make any important difference
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
struct tm *localtime ();
|
||||
|
||||
void
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
&res;})
|
||||
#endif
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
|
|
@ -58,7 +59,7 @@ main (argc, argv)
|
|||
setup_yow(fp);
|
||||
yow(fp);
|
||||
fclose(fp);
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long len = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue