Fixed problems on systems using newer GLIB and GCC (2.96) which no

longer allow the -Wp,-lang-c-c++-comments directive.  Also cleaned
up getloadavg support that had problems on Solaris and RedHat 7.1.
Removed unused variables in a number of functions as a result of
warnings when compiled with --enable-debug config option.
This commit is contained in:
ppokorny
2001-05-15 01:55:59 +00:00
parent 3e4ce08d43
commit 3fff6381b0
17 changed files with 110 additions and 60 deletions
+14 -2
View File
@@ -11,12 +11,24 @@
#include <fcntl.h>
#include <string.h>
#include <sys/errno.h>
#include <sys/time.h>
#include <sys/types.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#include "lcd.h"
#include "bayrad.h"
#include "drv_base.h"
#include "../../shared/str.h"
#include "shared/str.h"
//////////////////////////////////////////////////////////////////////////
////////////////////// Base "class" to derive from ///////////////////////
+1 -1
View File
@@ -37,7 +37,7 @@ curses_drv_init (struct lcd_logical_driver *driver, char *args)
{
char *argv[64];
int argc;
int i, j;
int i;
argc = get_args (argv, args, 64);
+15 -2
View File
@@ -5,10 +5,23 @@
#include <fcntl.h>
#include <string.h>
#include <sys/errno.h>
#include <sys/time.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#include "lcd.h"
#include "../../shared/str.h"
#include "shared/str.h"
#include "glk.h"
#include "glkproto.h"
+1 -1
View File
@@ -57,6 +57,6 @@ int glkgetc( GLKDisplay * fd );
int glkpoll( GLKDisplay * fd, int timeout );
int glkflow( GLKDisplay * fd, int full, int empty );
static int glkunget( GLKDisplay * fd, int c );
int glkunget( GLKDisplay * fd, int c );
#endif
+18 -7
View File
@@ -37,6 +37,9 @@
#include <string.h>
#include <errno.h>
#include <sys/perm.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
// Uncomment one of the lines below to select your desired delay generation
// mechanism. If both defines are commented, the original I/O read timing
@@ -45,13 +48,22 @@
#define DELAY_NANOSLEEP
#if defined DELAY_GETTIMEOFDAY
#include <sys/time.h>
#include <unistd.h>
# if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
// Only one alternate delay method at a time, please ;-)
#undef DELAY_NANOSLEEP
# undef DELAY_NANOSLEEP
#elif defined DELAY_NANOSLEEP
#include <sched.h>
#include <time.h>
# include <sched.h>
# include <time.h>
#endif
#include "../../shared/str.h"
@@ -178,7 +190,6 @@ HD44780_init (lcd_logical_driver * driver, char *args)
connIdx = j;
++i;
} else if (0 == strcmp (argv[i], "-v") || 0 == strcmp (argv[i], "--vspan")) {
int j = 0;
if (i + 1 >= argc) {
fprintf (stderr, "HD44780_init: %s requires an argument\n", argv[i]);
return -1;
@@ -810,7 +821,7 @@ parse_span_list (int *spanListArray[], int *spLsize, int *dispOffsets[], int *dO
for (++j; spanlist[j] < '1' || spanlist[j] > '9'; ++j);
} else {
fprintf (stderr, "Error reallocing for span list\n");
retVal - 1;
retVal = -1;
}
} else {
fprintf (stderr, "Error reading spansize\n");
+1 -3
View File
@@ -8,8 +8,6 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#define __u32 unsigned int
#define __u8 unsigned char
#include <linux/joystick.h>
#include "../../shared/debug.h"
@@ -50,7 +48,7 @@ joy_init (struct lcd_logical_driver *driver, char *args)
{
char device[256];
char *argv[64];
int argc, i, j;
int argc, i;
joy = driver;