Fixed all warnings.
This commit is contained in:
@@ -43,7 +43,7 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_netload netload;
|
glibtop_netload netload;
|
||||||
unsigned method, count, port, i;
|
unsigned method, count, port;
|
||||||
struct in_addr addr, subnet;
|
struct in_addr addr, subnet;
|
||||||
char *address_string, *subnet_string;
|
char *address_string, *subnet_string;
|
||||||
char buffer [BUFSIZ];
|
char buffer [BUFSIZ];
|
||||||
|
@@ -67,7 +67,7 @@ main (int argc, char *argv [])
|
|||||||
memset (separator, '-', 91);
|
memset (separator, '-', 91);
|
||||||
separator [92] = '\0';
|
separator [92] = '\0';
|
||||||
|
|
||||||
sprintf (buffer, _("Ticks (%d per second):"), frequency);
|
sprintf (buffer, _("Ticks (%ld per second):"), frequency);
|
||||||
|
|
||||||
printf ("\n\n%-26s %12s %12s %12s %12s %12s\n%s\n", buffer,
|
printf ("\n\n%-26s %12s %12s %12s %12s %12s\n%s\n", buffer,
|
||||||
_("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator);
|
_("Total"), _("User"), _("Nice"), _("Sys"), _("Idle"), separator);
|
||||||
|
@@ -38,7 +38,7 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_sysdeps sysdeps;
|
glibtop_sysdeps sysdeps;
|
||||||
unsigned method, count, port, i;
|
unsigned method, count, port;
|
||||||
char buffer [BUFSIZ];
|
char buffer [BUFSIZ];
|
||||||
|
|
||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
@@ -70,14 +70,11 @@ int
|
|||||||
main (int argc, char *argv [])
|
main (int argc, char *argv [])
|
||||||
{
|
{
|
||||||
glibtop_union data;
|
glibtop_union data;
|
||||||
glibtop_sysdeps sysdeps;
|
unsigned c, count, *ptr;
|
||||||
unsigned c, count, port, i, *ptr;
|
|
||||||
struct rusage total_start, total_end;
|
struct rusage total_start, total_end;
|
||||||
struct rusage rusage_start, rusage_end;
|
struct rusage rusage_start, rusage_end;
|
||||||
struct timeval elapsed_utime, elapsed_stime;
|
struct timeval elapsed_utime, elapsed_stime;
|
||||||
char buffer [BUFSIZ];
|
pid_t pid;
|
||||||
pid_t pid, ppid;
|
|
||||||
char *args;
|
|
||||||
|
|
||||||
count = PROFILE_COUNT;
|
count = PROFILE_COUNT;
|
||||||
|
|
||||||
|
@@ -243,7 +243,7 @@ permitted (u_long host_addr, int fd)
|
|||||||
if (enable_debug)
|
if (enable_debug)
|
||||||
syslog_message (LOG_DEBUG, "Trying %lx - %lx",
|
syslog_message (LOG_DEBUG, "Trying %lx - %lx",
|
||||||
host_addr, permitted_hosts [i]);
|
host_addr, permitted_hosts [i]);
|
||||||
if (permitted_hosts [i] == NULL)
|
if (permitted_hosts [i] == 0L)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
if (host_addr == permitted_hosts [i])
|
if (host_addr == permitted_hosts [i])
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@@ -26,12 +26,12 @@
|
|||||||
void
|
void
|
||||||
handle_slave_connection (int input, int output)
|
handle_slave_connection (int input, int output)
|
||||||
{
|
{
|
||||||
glibtop *server = glibtop_global_server;
|
glibtop *server G_GNUC_UNUSED = glibtop_global_server;
|
||||||
int64_t *param_ptr;
|
int64_t *param_ptr G_GNUC_UNUSED;
|
||||||
const void *ptr;
|
const void *ptr G_GNUC_UNUSED;
|
||||||
|
|
||||||
unsigned short max_len;
|
unsigned short max_len G_GNUC_UNUSED;
|
||||||
pid_t pid;
|
pid_t pid G_GNUC_UNUSED;
|
||||||
|
|
||||||
glibtop_response _resp, *resp = &_resp;
|
glibtop_response _resp, *resp = &_resp;
|
||||||
glibtop_command _cmnd, *cmnd = &_cmnd;
|
glibtop_command _cmnd, *cmnd = &_cmnd;
|
||||||
@@ -119,8 +119,8 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
|
|||||||
const void *parameter)
|
const void *parameter)
|
||||||
{
|
{
|
||||||
glibtop *server = glibtop_global_server;
|
glibtop *server = glibtop_global_server;
|
||||||
unsigned device;
|
unsigned device G_GNUC_UNUSED;
|
||||||
pid_t pid;
|
pid_t pid G_GNUC_UNUSED;
|
||||||
|
|
||||||
switch (cmnd->command) {
|
switch (cmnd->command) {
|
||||||
case GLIBTOP_CMND_SYSDEPS:
|
case GLIBTOP_CMND_SYSDEPS:
|
||||||
|
@@ -113,7 +113,6 @@ sub output {
|
|||||||
print 'static SCM';
|
print 'static SCM';
|
||||||
print 'glibtop_guile_types_' . $feature . ' (void)';
|
print 'glibtop_guile_types_' . $feature . ' (void)';
|
||||||
print '{';
|
print '{';
|
||||||
print "\tint i;";
|
|
||||||
print "\tSCM list;";
|
print "\tSCM list;";
|
||||||
print '';
|
print '';
|
||||||
|
|
||||||
|
@@ -88,8 +88,6 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
|||||||
|
|
||||||
if (skfd) {
|
if (skfd) {
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
struct sockaddr_in addr;
|
|
||||||
char *address;
|
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
|
|
||||||
strcpy (ifr.ifr_name, interface);
|
strcpy (ifr.ifr_name, interface);
|
||||||
|
@@ -31,6 +31,8 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_ppp =
|
static const unsigned long _glibtop_sysdeps_ppp =
|
||||||
|
@@ -187,7 +187,7 @@ glibtop_get_proc_data_netload_s (glibtop *server,
|
|||||||
int name [2] = { CTL_LIBGTOP, LIBGTOP_NETLOAD };
|
int name [2] = { CTL_LIBGTOP, LIBGTOP_NETLOAD };
|
||||||
size_t size = sizeof (libgtop_netload_t);
|
size_t size = sizeof (libgtop_netload_t);
|
||||||
|
|
||||||
if (sysctl (name, 2, netload, &size, device, strlen (device)+1)) {
|
if (sysctl (name, 2, netload, &size, (char *) device, strlen (device)+1)) {
|
||||||
glibtop_warn_io_r (server, "sysctl (libgtop/netload)");
|
glibtop_warn_io_r (server, "sysctl (libgtop/netload)");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,8 @@
|
|||||||
#include <glibtop/cpu.h>
|
#include <glibtop/cpu.h>
|
||||||
#include <glibtop/sysinfo.h>
|
#include <glibtop/sysinfo.h>
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_sysinfo =
|
static const unsigned long _glibtop_sysdeps_sysinfo =
|
||||||
(1L << GLIBTOP_SYSINFO_CPUINFO);
|
(1L << GLIBTOP_SYSINFO_CPUINFO);
|
||||||
|
|
||||||
|
@@ -112,8 +112,6 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
|||||||
skfd = socket (AF_INET, SOCK_DGRAM, 0);
|
skfd = socket (AF_INET, SOCK_DGRAM, 0);
|
||||||
if (skfd) {
|
if (skfd) {
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
struct sockaddr_in addr;
|
|
||||||
char *address;
|
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
|
|
||||||
strcpy (ifr.ifr_name, interface);
|
strcpy (ifr.ifr_name, interface);
|
||||||
|
@@ -31,6 +31,8 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
static const unsigned long _glibtop_sysdeps_ppp =
|
static const unsigned long _glibtop_sysdeps_ppp =
|
||||||
|
Reference in New Issue
Block a user