Fix compiler warnings, strictly use long int and %lx for options.
This commit is contained in:
parent
d6b70ed6f8
commit
3c5655f59e
8 changed files with 20 additions and 20 deletions
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: connection.c,v 1.1.2.28 2002/02/18 16:25:16 guus Exp $
|
$Id: connection.c,v 1.1.2.29 2002/03/22 13:31:18 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -116,7 +116,7 @@ cp
|
||||||
for(node = connection_tree->head; node; node = node->next)
|
for(node = connection_tree->head; node; node = node->next)
|
||||||
{
|
{
|
||||||
c = (connection_t *)node->data;
|
c = (connection_t *)node->data;
|
||||||
syslog(LOG_DEBUG, _(" %s at %s options %ld socket %d status %04x"),
|
syslog(LOG_DEBUG, _(" %s at %s options %lx socket %d status %04x"),
|
||||||
c->name, c->hostname, c->options, c->socket, c->status);
|
c->name, c->hostname, c->options, c->socket, c->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: edge.c,v 1.1.2.8 2002/03/22 11:43:46 guus Exp $
|
$Id: edge.c,v 1.1.2.9 2002/03/22 13:31:18 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -201,7 +201,7 @@ cp
|
||||||
from_udp = sockaddr2hostname(&e->from.udpaddress);
|
from_udp = sockaddr2hostname(&e->from.udpaddress);
|
||||||
// to_tcp = sockaddr2hostname(&e->to.tcpaddress);
|
// to_tcp = sockaddr2hostname(&e->to.tcpaddress);
|
||||||
to_udp = sockaddr2hostname(&e->to.udpaddress);
|
to_udp = sockaddr2hostname(&e->to.udpaddress);
|
||||||
syslog(LOG_DEBUG, _(" %s at %s - %s at %s options %ld weight %d"),
|
syslog(LOG_DEBUG, _(" %s at %s - %s at %s options %lx weight %d"),
|
||||||
e->from.node->name, from_udp,
|
e->from.node->name, from_udp,
|
||||||
e->to.node->name, to_udp,
|
e->to.node->name, to_udp,
|
||||||
e->options, e->weight);
|
e->options, e->weight);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: node.c,v 1.1.2.10 2002/02/18 16:25:16 guus Exp $
|
$Id: node.c,v 1.1.2.11 2002/03/22 13:31:18 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -163,7 +163,7 @@ cp
|
||||||
for(node = node_tree->head; node; node = node->next)
|
for(node = node_tree->head; node; node = node->next)
|
||||||
{
|
{
|
||||||
n = (node_t *)node->data;
|
n = (node_t *)node->data;
|
||||||
syslog(LOG_DEBUG, _(" %s at %s cipher %d digest %d maclength %d compression %d options %ld status %04x nexthop %s via %s"),
|
syslog(LOG_DEBUG, _(" %s at %s cipher %d digest %d maclength %d compression %d options %lx status %04x nexthop %s via %s"),
|
||||||
n->name, n->hostname, n->cipher?n->cipher->nid:0, n->digest?n->digest->type:0, n->maclength, n->compression, n->options,
|
n->name, n->hostname, n->cipher?n->cipher->nid:0, n->digest?n->digest->type:0, n->maclength, n->compression, n->options,
|
||||||
n->status, n->nexthop?n->nexthop->name:"-", n->via?n->via->name:"-");
|
n->status, n->nexthop?n->nexthop->name:"-", n->via?n->via->name:"-");
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: protocol.c,v 1.28.4.125 2002/03/22 11:43:48 guus Exp $
|
$Id: protocol.c,v 1.28.4.126 2002/03/22 13:31:18 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -74,7 +74,7 @@ cp
|
||||||
|
|
||||||
if(len < 0 || len > MAXBUFSIZE-1)
|
if(len < 0 || len > MAXBUFSIZE-1)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, _("Output buffer overflow while sending request to %s (%s)"), request_name[request], c->name, c->hostname);
|
syslog(LOG_ERR, _("Output buffer overflow while sending request to %s (%s)"), c->name, c->hostname);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: protocol_auth.c,v 1.1.4.4 2002/03/22 11:43:48 guus Exp $
|
$Id: protocol_auth.c,v 1.1.4.5 2002/03/22 13:31:18 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -473,7 +473,7 @@ cp
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
c->estimated_weight = (now.tv_sec - c->start.tv_sec) * 1000 + (now.tv_usec - c->start.tv_usec) / 1000;
|
c->estimated_weight = (now.tv_sec - c->start.tv_sec) * 1000 + (now.tv_usec - c->start.tv_usec) / 1000;
|
||||||
sockaddr2str(&c->address, &address, &port);
|
sockaddr2str(&c->address, &address, &port);
|
||||||
x = send_request(c, "%d %s %s %s %d %d", ACK, myport, address, port, c->estimated_weight, c->options);
|
x = send_request(c, "%d %s %s %s %d %lx", ACK, myport, address, port, c->estimated_weight, c->options);
|
||||||
free(address);
|
free(address);
|
||||||
free(port);
|
free(port);
|
||||||
cp
|
cp
|
||||||
|
@ -519,12 +519,12 @@ int ack_h(connection_t *c)
|
||||||
char hisport[MAX_STRING_SIZE];
|
char hisport[MAX_STRING_SIZE];
|
||||||
char *hisaddress, *dummy;
|
char *hisaddress, *dummy;
|
||||||
int weight;
|
int weight;
|
||||||
int options;
|
long int options;
|
||||||
node_t *n;
|
node_t *n;
|
||||||
connection_t *other;
|
connection_t *other;
|
||||||
avl_node_t *node;
|
avl_node_t *node;
|
||||||
cp
|
cp
|
||||||
if(sscanf(c->buffer, "%*d "MAX_STRING" "MAX_STRING" %d %d", hisport, myaddress, &weight, &options) != 4)
|
if(sscanf(c->buffer, "%*d "MAX_STRING" "MAX_STRING" %d %lx", hisport, myaddress, &weight, &options) != 4)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "ACK", c->name, c->hostname);
|
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "ACK", c->name, c->hostname);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: protocol_edge.c,v 1.1.4.5 2002/03/22 12:41:54 guus Exp $
|
$Id: protocol_edge.c,v 1.1.4.6 2002/03/22 13:31:18 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -90,7 +90,7 @@ int add_edge_h(connection_t *c)
|
||||||
int weight;
|
int weight;
|
||||||
avl_node_t *node;
|
avl_node_t *node;
|
||||||
cp
|
cp
|
||||||
if(sscanf(c->buffer, "%*d %*lx "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" %lx %d",
|
if(sscanf(c->buffer, "%*d %*x "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" %lx %d",
|
||||||
from_name, from_address, from_udpport,
|
from_name, from_address, from_udpport,
|
||||||
to_name, to_address, to_udpport,
|
to_name, to_address, to_udpport,
|
||||||
&options, &weight) != 8)
|
&options, &weight) != 8)
|
||||||
|
@ -226,7 +226,7 @@ int del_edge_h(connection_t *c)
|
||||||
connection_t *other;
|
connection_t *other;
|
||||||
avl_node_t *node;
|
avl_node_t *node;
|
||||||
cp
|
cp
|
||||||
if(sscanf(c->buffer, "%*d %*lx "MAX_STRING" "MAX_STRING"", from_name, to_name) != 2)
|
if(sscanf(c->buffer, "%*d %*x "MAX_STRING" "MAX_STRING"", from_name, to_name) != 2)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_EDGE",
|
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_EDGE",
|
||||||
c->name, c->hostname);
|
c->name, c->hostname);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: protocol_key.c,v 1.1.4.5 2002/03/21 23:11:53 guus Exp $
|
$Id: protocol_key.c,v 1.1.4.6 2002/03/22 13:31:18 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -75,7 +75,7 @@ int key_changed_h(connection_t *c)
|
||||||
connection_t *other;
|
connection_t *other;
|
||||||
node_t *n;
|
node_t *n;
|
||||||
cp
|
cp
|
||||||
if(sscanf(c->buffer, "%*d %*lx "MAX_STRING, name) != 1)
|
if(sscanf(c->buffer, "%*d %*x "MAX_STRING, name) != 1)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "KEY_CHANGED",
|
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "KEY_CHANGED",
|
||||||
c->name, c->hostname);
|
c->name, c->hostname);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: protocol_subnet.c,v 1.1.4.2 2002/03/21 23:11:53 guus Exp $
|
$Id: protocol_subnet.c,v 1.1.4.3 2002/03/22 13:31:18 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -66,7 +66,7 @@ int add_subnet_h(connection_t *c)
|
||||||
subnet_t *s;
|
subnet_t *s;
|
||||||
avl_node_t *node;
|
avl_node_t *node;
|
||||||
cp
|
cp
|
||||||
if(sscanf(c->buffer, "%*d %*lx "MAX_STRING" "MAX_STRING, name, subnetstr) != 2)
|
if(sscanf(c->buffer, "%*d %*x "MAX_STRING" "MAX_STRING, name, subnetstr) != 2)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_SUBNET", c->name, c->hostname);
|
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_SUBNET", c->name, c->hostname);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -158,7 +158,7 @@ int del_subnet_h(connection_t *c)
|
||||||
subnet_t *s, *find;
|
subnet_t *s, *find;
|
||||||
avl_node_t *node;
|
avl_node_t *node;
|
||||||
cp
|
cp
|
||||||
if(sscanf(c->buffer, "%*d %*lx "MAX_STRING" "MAX_STRING, name, subnetstr) != 2)
|
if(sscanf(c->buffer, "%*d %*x "MAX_STRING" "MAX_STRING, name, subnetstr) != 2)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_SUBNET", c->name, c->hostname);
|
syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_SUBNET", c->name, c->hostname);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue