aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Farina <tfransosi@gmail.com>2010-01-29 19:17:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-29 16:30:44 -0800
commit8fc74498394810e3744518e76d2e73b18c2dce8e (patch)
treefe5561e41946343dd8ba3cf144dc85b851b5ad3b
parentdd5b2fec4e843cc519dfdb0a77ee47435825d3e0 (diff)
downloaduemacs-8fc74498394810e3744518e76d2e73b18c2dce8e.tar.gz
uemacs: fix sparse warnings, making file-local symbols static.
ansi.c:255:6: warning: symbol 'ansihello' was not declared. Should it be static? epath.h:11:6: warning: symbol 'pathname' was not declared. Should it be static? display.c:36:7: warning: symbol 'vscreen' was not declared. Should it be static? display.c:38:7: warning: symbol 'pscreen' was not declared. Should it be static? display.c:927:5: warning: symbol 'updateline' was not declared. Should it be static? evar.h:20:6: warning: symbol 'uv' was not declared. Should it be static? evar.h:24:6: warning: symbol 'envars' was not declared. Should it be static? evar.h:128:7: warning: symbol 'funcs' was not declared. Should it be static? fileio.c:14:6: warning: symbol 'ffp' was not declared. Should it be static? fileio.c:15:5: warning: symbol 'eofflag' was not declared. Should it be static? ibmpc.c:505:6: warning: symbol 'ibmhello' was not declared. Should it be static? isearch.c:36:5: warning: symbol 'saved_get_char' was not declared. Should it be static? isearch.c:37:5: warning: symbol 'eaten_char' was not declared. Should it be static? isearch.c:41:5: warning: symbol 'cmd_buff' was not declared. Should it be static? isearch.c:42:5: warning: symbol 'cmd_offset' was not declared. Should it be static? isearch.c:43:5: warning: symbol 'cmd_reexecute' was not declared. Should it be static? line.c:21:6: warning: symbol 'ykbuf' was not declared. Should it be static? line.c:22:5: warning: symbol 'ykboff' was not declared. Should it be static? lock.c:17:6: warning: symbol 'lname' was not declared. Should it be static? lock.c:18:5: warning: symbol 'numlocks' was not declared. Should it be static? vmsvt.c:521:6: warning: symbol 'hellovms' was not declared. Should it be static? vt52.c:181:6: warning: symbol 'vt52hello' was not declared. Should it be static? Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--ansi.c2
-rw-r--r--display.c6
-rw-r--r--epath.h2
-rw-r--r--evar.h6
-rw-r--r--fileio.c4
-rw-r--r--ibmpc.c2
-rw-r--r--isearch.c14
-rw-r--r--line.c4
-rw-r--r--lock.c4
-rw-r--r--termio.c12
-rw-r--r--vmsvt.c2
-rw-r--r--vt52.c2
12 files changed, 30 insertions, 30 deletions
diff --git a/ansi.c b/ansi.c
index 1658d0d..9b1072c 100644
--- a/ansi.c
+++ b/ansi.c
@@ -252,7 +252,7 @@ int f, n; /* default flag, numeric argument [unused] */
}
#endif
#else
-void ansihello(void)
+static void ansihello(void)
{
}
#endif
diff --git a/display.c b/display.c
index 2129d2b..67a0636 100644
--- a/display.c
+++ b/display.c
@@ -33,9 +33,9 @@ typedef struct VIDEO {
#define VFREQ 0x0008 /* reverse video request */
#define VFCOL 0x0010 /* color change requested */
-VIDEO **vscreen; /* Virtual screen. */
+static VIDEO **vscreen; /* Virtual screen. */
#if MEMMAP == 0 || SCROLLCODE
-VIDEO **pscreen; /* Physical screen. */
+static VIDEO **pscreen; /* Physical screen. */
#endif
static int displaying = TRUE;
@@ -924,7 +924,7 @@ static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
* struct VIDEO *vp1; virtual screen image
* struct VIDEO *vp2; physical screen image
*/
-int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
+static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
{
#if RAINBOW
/* UPDATELINE specific code for the DEC rainbow 100 micro */
diff --git a/epath.h b/epath.h
index 5a3705a..1a6b7fe 100644
--- a/epath.h
+++ b/epath.h
@@ -8,7 +8,7 @@
/* possible names and paths of help files under different OSs */
-char *pathname[] =
+static char *pathname[] =
#if MSDOS
{
"emacs.rc",
diff --git a/evar.h b/evar.h
index d693176..9d9e9f7 100644
--- a/evar.h
+++ b/evar.h
@@ -17,11 +17,11 @@ typedef struct UVAR {
#define MAXVARS 255
-UVAR uv[MAXVARS + 1]; /* user variables */
+static UVAR uv[MAXVARS + 1]; /* user variables */
/* list of recognized environment variables */
-char *envars[] = {
+static char *envars[] = {
"fillcol", /* current fill column */
"pagelen", /* number of lines used by editor */
"curcol", /* current column pos of cursor */
@@ -125,7 +125,7 @@ typedef struct UFUNC {
#define DYNAMIC 2
#define TRINAMIC 3
-UFUNC funcs[] = {
+static UFUNC funcs[] = {
{ "add", DYNAMIC }, /* add two numbers together */
{ "sub", DYNAMIC }, /* subtraction */
{ "tim", DYNAMIC }, /* multiplication */
diff --git a/fileio.c b/fileio.c
index e3b12c7..6860585 100644
--- a/fileio.c
+++ b/fileio.c
@@ -11,8 +11,8 @@
#include "edef.h"
#include "efunc.h"
-FILE *ffp; /* File pointer, all functions. */
-int eofflag; /* end-of-file flag */
+static FILE *ffp; /* File pointer, all functions. */
+static int eofflag; /* end-of-file flag */
/*
* Open a file for reading.
diff --git a/ibmpc.c b/ibmpc.c
index 3c09f4c..f184abc 100644
--- a/ibmpc.c
+++ b/ibmpc.c
@@ -502,7 +502,7 @@ int f, n; /* default flag, numeric argument [unused] */
}
#endif
#else
-void ibmhello(void)
+static void ibmhello(void)
{
}
#endif
diff --git a/isearch.c b/isearch.c
index cf6b9f1..43b5e07 100644
--- a/isearch.c
+++ b/isearch.c
@@ -2,7 +2,7 @@
*
* The functions in this file implement commands that perform incremental
* searches in the forward and backward directions. This "ISearch" command
- * is intended to emulate the same command from the original EMACS
+ * is intended to emulate the same command from the original EMACS
* implementation (ITS). Contains references to routines internal to
* SEARCH.C.
*
@@ -19,7 +19,7 @@
* checknext(), since there were no circumstances where
* it ever equalled FALSE.
*
- * modified by Petri Kutvonen
+ * modified by Petri Kutvonen
*/
#include <stdio.h>
@@ -33,14 +33,14 @@ static int echo_char(int c, int col);
/* A couple of "own" variables for re-eat */
-int (*saved_get_char) (); /* Get character routine */
-int eaten_char = -1; /* Re-eaten char */
+static int (*saved_get_char) (); /* Get character routine */
+static int eaten_char = -1; /* Re-eaten char */
/* A couple more "own" variables for the command string */
-int cmd_buff[CMDBUFLEN]; /* Save the command args here */
-int cmd_offset; /* Current offset into command buff */
-int cmd_reexecute = -1; /* > 0 if re-executing command */
+static int cmd_buff[CMDBUFLEN]; /* Save the command args here */
+static int cmd_offset; /* Current offset into command buff */
+static int cmd_reexecute = -1; /* > 0 if re-executing command */
/*
diff --git a/line.c b/line.c
index f4f9809..ece0093 100644
--- a/line.c
+++ b/line.c
@@ -18,8 +18,8 @@
#include "edef.h"
#include "efunc.h"
-KILL *ykbuf; /* ptr to current kill buffer chunk being yanked */
-int ykboff; /* offset into that chunk */
+static KILL *ykbuf; /* ptr to current kill buffer chunk being yanked */
+static int ykboff; /* offset into that chunk */
/*
* This routine allocates a block of memory large enough to hold a LINE
diff --git a/lock.c b/lock.c
index 117bcd8..628e2ba 100644
--- a/lock.c
+++ b/lock.c
@@ -14,8 +14,8 @@
#if BSD | SVR4
#include <sys/errno.h>
-char *lname[NLOCKS]; /* names of all locked files */
-int numlocks; /* # of current locks active */
+static char *lname[NLOCKS]; /* names of all locked files */
+static int numlocks; /* # of current locks active */
/*
* lockchk:
diff --git a/termio.c b/termio.c
index fb58672..3588256 100644
--- a/termio.c
+++ b/termio.c
@@ -97,7 +97,7 @@ char tobuf[TBUFSIZ]; /* terminal output buffer */
* On VMS, it translates TT until it finds the terminal, then assigns
* a channel to it and sets it raw. On CPM it is a no-op.
*/
-ttopen()
+void ttopen(void)
{
#if VMS
struct dsc$descriptor idsc;
@@ -168,7 +168,7 @@ ttopen()
ntermio.c_line = otermio.c_line;
ntermio.c_cc[VMIN] = 1;
ntermio.c_cc[VTIME] = 0;
-#if PKCODE
+#if PKCODE
ioctl(0, TCSETAW, &ntermio); /* and activate them */
#else
ioctl(0, TCSETA, &ntermio); /* and activate them */
@@ -222,7 +222,7 @@ ttopen()
* interpreter. On VMS it puts the terminal back in a reasonable state.
* Another no-operation on CPM.
*/
-ttclose()
+void ttclose(void)
{
#if VMS
int status;
@@ -269,7 +269,7 @@ ttclose()
* On CPM terminal I/O unbuffered, so we just write the byte out. Ditto on
* MS-DOS (use the very very raw console output routine).
*/
-ttputc(c)
+void ttputc(c)
{
#if VMS
if (nobuf >= NOBUF)
@@ -290,7 +290,7 @@ ttputc(c)
* Flush terminal buffer. Does real work where the terminal output is buffered
* up. A no-operation on systems where byte at a time terminal I/O is done.
*/
-ttflush()
+int ttflush(void)
{
#if VMS
int status;
@@ -305,7 +305,7 @@ ttflush()
status = iosb[0] & 0xFFFF;
nobuf = 0;
}
- return (status);
+ return status;
#endif
#if MSDOS
diff --git a/vmsvt.c b/vmsvt.c
index 338831d..9eaaf11 100644
--- a/vmsvt.c
+++ b/vmsvt.c
@@ -518,7 +518,7 @@ spal()
*
* Nothing returned
***/
-void hellovms(void)
+static void hellovms(void)
{
}
diff --git a/vt52.c b/vt52.c
index 6e17683..190526e 100644
--- a/vt52.c
+++ b/vt52.c
@@ -178,7 +178,7 @@ int f, n; /* default flag, numeric argument [unused] */
#endif
#else
-void vt52hello(void)
+static void vt52hello(void)
{
}