changeset 2af63cac1360 in /z/repo/encumbered
details: http://repo.gem5.org/encumbered?cmd=changeset;node=2af63cac1360
summary: eio: fix warnings
diffstat:
eio/EioProcess.py | 1 +
eio/eio.cc | 12 ++++++------
eio/exolex.cc | 1 -
eio/libexo.cc | 11 ++---------
eio/libexo.h | 8 ++++++++
5 files changed, 17 insertions(+), 16 deletions(-)
diffs (141 lines):
diff --git a/eio/EioProcess.py b/eio/EioProcess.py
--- a/eio/EioProcess.py
+++ b/eio/EioProcess.py
@@ -5,6 +5,7 @@
class EioProcess(Process):
type = 'EioProcess'
+ cxx_header = "eio/eio.hh"
chkpt = Param.String('', "EIO checkpoint file name (optional)")
file = Param.String("EIO trace file name")
input = 'None' # All input redirected from EIO trace
diff --git a/eio/eio.cc b/eio/eio.cc
--- a/eio/eio.cc
+++ b/eio/eio.cc
@@ -94,7 +94,7 @@
/* same semantics as fopen() except that filenames ending with a ".gz" or ".Z"
will be automagically get compressed */
-FILE *
+static FILE *
gzopen(const char *fname, const char *type)
{
int i;
@@ -135,7 +135,7 @@
}
/* close compressed stream */
-void
+static void
gzclose(FILE *fd)
{
/* attempt pipe close, otherwise file close */
@@ -164,7 +164,7 @@
)
*/
-FILE *
+static FILE *
eio_open(const string &fname)
{
FILE *fd;
@@ -209,7 +209,7 @@
/* returns non-zero if file FNAME has a valid EIO header */
-int
+static int
eio_valid(const string &fname)
{
FILE *fd;
@@ -235,7 +235,7 @@
}
-void
+static void
eio_close(FILE * fd)
{
gzclose(fd);
@@ -579,7 +579,7 @@
}
/* fast forward EIO trace EIO_FD to the transaction just after ICNT */
-void
+static void
eio_fast_forward(FILE * eio_fd, Counter icnt)
{
struct exo_term_t *exo;
diff --git a/eio/exolex.cc b/eio/exolex.cc
--- a/eio/exolex.cc
+++ b/eio/exolex.cc
@@ -264,7 +264,6 @@
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
-extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
diff --git a/eio/libexo.cc b/eio/libexo.cc
--- a/eio/libexo.cc
+++ b/eio/libexo.cc
@@ -84,7 +84,7 @@
#define ULL_MAX (ULL(9223372036854775807) * ULL(2) + 1)
/* convert a string to a unsigned result */
-uint64_t
+static uint64_t
myatoq(char *nptr, char **endp, int base)
{
char *s, *save;
@@ -844,7 +844,7 @@
}
/* print an EXO term */
-void
+static void
exo_print(struct exo_term_t *exo, ostream &stream)
{
switch (exo->ec) {
@@ -937,12 +937,6 @@
}
}
-/* (f)lex external defs */
-extern int yylex(void);
-extern int yy_nextchar(void);
-extern char *yytext;
-extern FILE *yyin;
-
static void
exo_err(const char *err)
{
@@ -959,7 +953,6 @@
int tok;
char tok_buf[1024], *endp;
struct exo_term_t *ent = NULL;
- extern void yy_setstream(FILE *);
/* make sure we have a valid stream */
if (!stream)
diff --git a/eio/libexo.h b/eio/libexo.h
--- a/eio/libexo.h
+++ b/eio/libexo.h
@@ -235,8 +235,16 @@
lex_eof
};
+/* (f)lex external defs */
+int yylex(void);
+int yy_nextchar(void);
+void yy_setstream(FILE *);
+
#ifdef __cplusplus
} // extern "C"
#endif
+extern char *yytext;
+extern FILE *yyin;
+
#endif // __LIBEXO_H__
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev