From 4c7dd8c3b994c9eac8016c501d82eafff15057dc Mon Sep 17 00:00:00 2001 From: Mandrake Date: Mon, 18 Oct 1999 20:43:03 +0000 Subject: [PATCH] Mon Oct 18 19:33:26 PDT 1999 Mandrake Warnings begone! Eterm/src/command.c still has two warnings but I don't know why I didn't get rid fo them. there are still warnings in Esetroot.c and in Etbg, but I'll fix those later. SVN revision: 866 --- ChangeLog | 8 ++++++++ src/actions.c | 2 ++ src/command.c | 10 ++++------ src/e.c | 1 + src/options.c | 8 ++++++-- src/screen.c | 19 +++++++++++++++---- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1158376..2c9d685 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2587,3 +2587,11 @@ Tue Oct 12 16:24:20 PDT 1999 Michael Jennings . ------------------------------------------------------------------------------- +Mon Oct 18 19:33:26 PDT 1999 Mandrake + + Warnings begone! + Eterm/src/command.c still has two warnings but I don't know why + I didn't get rid fo them. there are still warnings in + Esetroot.c and in Etbg, but I'll fix those later. + +------------------------------------------------------------------------------- diff --git a/src/actions.c b/src/actions.c index 4871223..17e80f2 100644 --- a/src/actions.c +++ b/src/actions.c @@ -56,6 +56,7 @@ action_t *action_list = NULL; unsigned char action_handle_string(event_t *ev, action_t *action) { + ev = NULL; REQUIRE_RVAL(action->param.string != NULL, 0); cmd_write(action->param.string, strlen(action->param.string)); return 1; @@ -63,6 +64,7 @@ action_handle_string(event_t *ev, action_t *action) { unsigned char action_handle_echo(event_t *ev, action_t *action) { + ev = NULL; REQUIRE_RVAL(action->param.string != NULL, 0); tt_write(action->param.string, strlen(action->param.string)); return 1; diff --git a/src/command.c b/src/command.c index 4616b85..a2b4033 100644 --- a/src/command.c +++ b/src/command.c @@ -43,14 +43,8 @@ static const char cvs_ident[] = "$Id$"; /* System Headers */ #include #include -#ifdef HAVE_UNISTD_H -# include -#endif #include #include -#ifdef HAVE_UNISTD_H -# include -#endif #ifdef HAVE_FCNTL_H # include #endif @@ -112,6 +106,8 @@ static const char cvs_ident[] = "$Id$"; #if defined(linux) # include /* For strsep(). -vendu */ #endif +/* I don't know why this doesn't seem to grab setresgid -mandrake */ +#include /* Eterm-specific Headers */ #include "command.h" @@ -1216,6 +1212,7 @@ svr_get_pty(void) #define PTYCHAR1 "pqrstuvwxyz" #define PTYCHAR2 "0123456789abcdefghijklmnopqrstuvwxyz" +inline int gen_get_pty(void); inline int gen_get_pty(void) { @@ -1654,6 +1651,7 @@ create_fontset(const char *font1, const char *font2) strcat(fontname, font2); } #else + font2 = NULL; fontname = MALLOC(strlen(font1) + sizeof(fs_base) + 1); if (fontname) { strcpy(fontname, font1); diff --git a/src/e.c b/src/e.c index 29637c6..2dc4a21 100644 --- a/src/e.c +++ b/src/e.c @@ -331,6 +331,7 @@ void eterm_ipc_send(char *str) { + str = NULL; } char * diff --git a/src/options.c b/src/options.c index 66eefd2..f93e5b7 100644 --- a/src/options.c +++ b/src/options.c @@ -1284,7 +1284,9 @@ char * builtin_version(char *param) { - D_PARSE(("builtin_version(%s) called\n", param)); + if(param) { + D_PARSE(("builtin_version(%s) called\n", param)); + } return (StrDup(VERSION)); } @@ -1293,7 +1295,9 @@ char * builtin_appname(char *param) { - D_PARSE(("builtin_appname(%s) called\n", param)); + if(param) { + D_PARSE(("builtin_appname(%s) called\n", param)); + } return (StrDup(APL_NAME "-" VERSION)); } diff --git a/src/screen.c b/src/screen.c index 62827d9..18394ad 100644 --- a/src/screen.c +++ b/src/screen.c @@ -103,7 +103,7 @@ void blank_line(text_t * et, rend_t * er, int width, rend_t efs) { /* int i = width; */ - register int i = width; + register unsigned int i = width; rend_t *r = er, fs = efs; MEMSET(et, ' ', i); @@ -1347,7 +1347,7 @@ void scr_set_tab(int mode) { if (mode < 0) - MEMSET(tabs, 0, TermWin.ncol); + MEMSET(tabs, 0, (unsigned int) TermWin.ncol); else if (screen.col < TermWin.ncol) tabs[screen.col] = (mode ? 1 : 0); @@ -1520,6 +1520,8 @@ set_multichar_encoding(const char *str) multichar_decode = big5dummy; } } +#else + str = NULL; #endif /* MULTI_CHARSET */ } @@ -1921,7 +1923,7 @@ scr_refresh(int type) #endif /* single stepping - `normal' mode */ for (; ++col < ncols - 1;) { - if (rend != srp[col]) + if ((unsigned int)rend != srp[col]) break; if ((stp[col] == dtp[col]) && (srp[col] == drp[col])) break; @@ -3066,17 +3068,26 @@ mouse_report(XButtonEvent * ev) } /* ------------------------------------------------------------------------- */ + void mouse_tracking(int report, int x, int y, int firstrow, int lastrow) { + report = 0; + x = 0; + y = 0; + firstrow = 0; + lastrow = 0; /* TODO */ -} +} + /* ------------------------------------------------------------------------- * * DEBUG ROUTINES * * ------------------------------------------------------------------------- */ void debug_PasteIt(unsigned char *data, int nitems) { + data = NULL; + nitems = 0; /* TODO */ }